CN101286991B - Implementing method and device for dynamic host configuring protocol Option82 - Google Patents

Implementing method and device for dynamic host configuring protocol Option82 Download PDF

Info

Publication number
CN101286991B
CN101286991B CN 200810108516 CN200810108516A CN101286991B CN 101286991 B CN101286991 B CN 101286991B CN 200810108516 CN200810108516 CN 200810108516 CN 200810108516 A CN200810108516 A CN 200810108516A CN 101286991 B CN101286991 B CN 101286991B
Authority
CN
China
Prior art keywords
dynamic host
configuration protocol
host configuration
port
0ption82
Prior art date
Application number
CN 200810108516
Other languages
Chinese (zh)
Other versions
CN101286991A (en
Inventor
练忠华
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to CN 200810108516 priority Critical patent/CN101286991B/en
Publication of CN101286991A publication Critical patent/CN101286991A/en
Application granted granted Critical
Publication of CN101286991B publication Critical patent/CN101286991B/en

Links

Abstract

The invention discloses a realization method for a dynamic host configuration protocol Option82 and a device thereof, wherein, the method comprises the steps that: ports used for receiving DHCP messages are configured with the DHCP Option82 function; according to the connection objects of the ports, the ports are divided into various types comprising a server port, a user port and an uplink port;access equipment receives the DHCP messages, wherein, in the situation that the server port receives the DHCP messages carrying the options of the Option82, the DHCP messages are transmitted to the uplink port or the corresponding user port according to the options of the Option82; in the situation that the client end port receives the DHCP messages, according to the identification information ofuser equipment corresponding to the DHCP messages, the options of the Option82 are formed and added into the DHCP messages, and the DHCP messages added with the options of the Option82 are transmitted to the server port; in the situation that the uplink port receives the DHCP messages, the DHCP messages are transmitted to the server port. The method and the device can solve the problem that in the situation of cascading access equipment, users can not be positioned and differentiated according to the Option82.

Description

动态主机配置协议0ption82实现方法及装置 Dynamic Host Configuration Protocol implementation method and apparatus 0ption82

技术领域 FIELD

[0001] 本发明涉及计算机网络领域,具体而言,涉及一种动态主机配置协议(Dynamic Host Configure Protocol,简称为DHCP) 0ption82 实现方法及装置。 , To a dynamic host configuration protocol (Dynamic Host Configure Protocol, referred to as DHCP) 0ption82 implemented method and apparatus [0001] The present invention relates to the field of computer networks, in particular.

背景技术 Background technique

[0002] 随着接入技术的发展,对接入用户定位和识别的要求也不断提高。 [0002] With the development of access technologies, the requirements for access to user location and identification is also rising. 用户定位和识别是指接入服务器及业务网关等对用户物理定位信息的可获知能力。 Positioning means and user identification and an access service gateway server to the user's physical location information may be learned capacity. DHCP 0ption82是向接入服务器等设备提供识别接入用户信息的一种技术。 DHCP 0ption82 provide a technique to identify the access information of the user access server equipment. 为使接入设备掌握接入的用户设备的信息,在接入设备实现DHCP 0ption82技术越来越普遍。 To access device control user access to information equipment, implement DHCP 0ption82 technology becomes more prevalent in the access equipment.

[0003] 随着接入用户数量增长,一个接入点接入一台用户设备已不能满足应用需求,随之产生了接入设备级联的组网应用。 [0003] With the growing number of users accessing an access point, a user access equipment can not meet the application requirements, the consequent application of a network access device cascade. 但是,对于一个接入设备其向下的级联端口对应了多个接入用户,而接入用户定位和识别信息是与接入设备上用户连接端口相对应的,现有技术无法区别出级联端口下行对应的多个接入用户,从而使多个用户设备的接入信息相同。 However, the access device for a downward cascade access port corresponding to a plurality of users, and access to user location and identification information to the user port on the access equipment corresponding to the prior art can not distinguish stage plurality of users with access port corresponding to downlink, so that multiple users access the same device information.

[0004] 在实现本发明过程中,发明人发现现有技术中至少存在如下问题:多个接入设备级联时无法准确定位和区分用户设备。 [0004] In implementing the present invention, the inventor finds at least the following problems in the prior art: and accurate positioning can not distinguish between multiple access user equipment cascaded devices.

发明内容 SUMMARY

[0005] 本发明旨在提供一种动态主机配置协议0ption82实现方法及装置,以解决多个接入设备级联时无法准确定位和区分用户设备的问题。 [0005] The present invention aims to provide a dynamic host configuration protocol 0ption82 implemented method and apparatus to address the user equipment can not distinguish accurately positioning and a plurality of access devices are cascaded.

[0006] 根据本发明的一个方面,提供了一种动态主机配置协议0ption82实现方法,用于接入设备级联。 [0006] In accordance with one aspect of the invention, there is provided a dynamic host configuration protocol 0ption82 implemented method for accessing cascading devices.

[0007] 根据本发明实施例的动态主机配置协议0ption82实现方法包括:对用于接收动态主机配置协议报文的端口配置动态主机配置协议0ption82功能,并根据端口的连接对象将端口分为以下类型:服务器端口、用户端口、级联端口;接入设备接收动态主机配置协议报文;其中,在服务器端口接收到动态主机配置协议报文、并且动态主机配置协议报文携带有0ption82选项的情况下,根据0ption82选项将动态主机配置协议报文转发到级联端口或相应的用户端口;在用户端口接收到动态主机配置协议报文的情况下,根据动态主机配置协议报文对应的用户设备的标识信息构造0ption82选项并添加到动态主机配置协议报文中,并将添加了0ption82选项的动态主机配置协议报文转发到服务器端口;在级联端口接收到动态主机配置协议报文的情况下,将动态主机配置协议报文转发到 [0007] 0ption82 dynamic host configuration protocol implemented according to an embodiment of the present invention, the method comprising: means for receiving a Dynamic Host Configuration Protocol packet port configuration 0ption82 dynamic host configuration protocol functions, and classified into the following types according to the port connection destination port : server port, user interface, cascade port; access device receiving a dynamic host protocol packets; wherein the receiving port in the server to the dynamic host configuration protocol packets, and dynamic host configuration protocol packets carrying case options 0ption82 the forward option 0ption82 dynamic host configuration protocol packet to the cascade port or ports a respective user; when the user interface receives the dynamic host configuration protocol packet, identifying the dynamic host configuration protocol packet corresponding to the user equipment 0ption82 option configuration information and added to the dynamic host configuration protocol packets, and adds a dynamic host configuration protocol packet 0ption82 option forwarded to the server port; in the case of the cascade port receiving the dynamic host configuration protocol packet, the dynamic host configuration protocol packets forwarded to 服务器端口。 Server port.

[0008] 优选地,在服务器端口接收到动态主机配置协议报文的情况下,将动态主机配置协议报文转发到级联端口或相应的用户端口的处理具体包括:判断动态主机配置协议报文携带的0ption82选项是否为用户端口添加;在判断为是的情况下,解析并摘除0ption82选项,并将动态主机配置协议报文转发到相应的用户端口;否则,将动态主机配置协议报文转发到级联端口。 In the case [0008] Preferably, the server port receiving a dynamic host configuration protocol packets, the dynamic host configuration protocol packet forwarding treatment corresponding to the cascade port or user port comprises: determining a dynamic host configuration protocol message whether carried 0ption82 option to add user ports; in the case of a YES determination, resolve and removal 0ption82 options and forwards dynamic host configuration protocol packets to the appropriate user interface; otherwise, the dynamic host configuration protocol packets forwarded to cascade port.

[0009] 优选地,在服务器端口接收到动态主机配置协议报文的情况下,如果动态主机配置协议报文不携带0ption82选项,上述方法还包括:根据动态主机配置协议报文的报文头字段判断动态主机配置协议报文要求的转发方式;在动态主机配置协议报文要求广播转发的情况下,将动态主机配置协议报文转发到级联端口和用户端口;在动态主机配置协议报文要求单播转发的情况下,将动态主机配置协议报文转发到相应地址的端口。 The [0009] Preferably, the server port receives the dynamic host configuration protocol packet, if the Dynamic Host Configuration Protocol packet carrying 0ption82 option, said method further comprising: according to a dynamic host configuration protocol packet of the packet header field Analyzing forwarding mode dynamic host configuration protocol packets required; the case where the dynamic host configuration protocol packet of a broadcast forwarding, forwarding dynamic host configuration protocol packet to the cascade port and user port; the dynamic host configuration protocol packet of a unicast forwarding the dynamic host configuration protocol packets forwarded to the appropriate port addresses.

[0010] 优选地,在用户端口接收到动态主机配置协议报文的情况下,上述方法进一步包括:判断添加了构造的0ption82选项的动态主机配置协议报文的长度是否超过预定长度; 在判断为是的情况下,不在动态主机配置协议报文中添加0ption82选项,直接将动态主机配置协议报文转发到服务器端口;否则在动态主机配置协议报文中添加0ption82,并将添加了0ption82的动态主机配置协议报文转发至服务器端口。 In the case [0010] Preferably, in the user port receiving the dynamic host configuration protocol packet, said method further comprising: determining adding whether the length of the dynamic host configuration protocol packet 0ption82 option configuration exceeds a predetermined length; is determined the case of Yes, is not dynamic host configuration protocol messages. It 0ption82 options directly forwards dynamic host configuration protocol packet to the server port; otherwise add 0ption82 in dynamic host configuration protocol packets and add the dynamic host 0ption82 configuration protocol packet forwarding to the server port.

[0011] 优选地,服务器端口为上行连接服务器的端口;用户端口为与用户设备连接的端口;级联端口为下行级联接入设备的端口。 [0011] Preferably, the server port of the upstream connection port of the server; user port to connect the port of the user equipment; cascade port cascade downstream port access device.

[0012] 根据本发明的另一方面,还提供了一种动态主机配置协议0ption82实现装置,用于级联接入设备。 [0012] According to another aspect of the present invention, there is provided a dynamic host configuration protocol implemented 0ption82 means for cascading the access device.

[0013] 根据本发明实施例的动态主机配置协议0ption82实现装置包括:一种用于级联接入设备的动态主机配置协议0ption82实现装置,设置于接入设备,其特征在于,包括:服务器端口,用于接收来自服务器的动态主机配置协议报文、并且动态主机配置协议报文携带有0ption82选项的情况下,根据0ption82选项将动态主机配置协议报文转发到级联端口或相应的用户端口;用户端口,用于接收来自用户设备的动态主机配置协议报文,根据动态主机配置协议报文对应的用户设备的标识信息构造0ption82选项并添加到动态主机配置协议报文中,并将添加了0ption82选项的动态主机配置协议报文转发到服务器端口;级联端口,用于接收来自下行级联接入设备的动态主机配置协议报文,并将动态主机配置协议报文转发到服务器端口。 [0013] 0ption82 dynamic host configuration protocol implemented according to an embodiment of the present invention apparatus comprising: a dynamic host configuration protocol access device for cascading 0ption82 implement means disposed in the access device, characterized by comprising: a server port , for receiving a dynamic host configuration protocol message from the server, and the case where the dynamic host configuration protocol message carries 0ption82 option, packets forwarded to the cascade port or ports a corresponding user according to the dynamic host configuration option 0ption82; user port for receiving a dynamic host configuration protocol message from the user equipment, according to the identification information of the option configuration 0ption82 dynamic host configuration protocol packets corresponding to user equipment and added to the dynamic host configuration protocol packets, and adds a 0ption82 dynamic host configuration protocol option port packets forwarded to the server; cascade port, for receiving a dynamic host configuration protocol message from the downstream cascade access device, and the dynamic host configuration protocol packets forwarded to the server port.

[0014] 优选地,该装置可进一步包括:判断模块,用于判断动态主机配置协议报文携带的0ption82选项是否为用户端口添加;转发模块,用于在判断模块判断的结构为是的情况下,解析并摘除0ption82选项,并将动态主机配置协议报文转发到相应的用户端口;否则, 将动态主机配置协议报文转发到级联端口。 The forwarding module, for determining module determines that the configuration is YES; determining module, for determining whether the dynamic host configuration protocol message carries the user the option of the ports 0ption82: [0014] Preferably, the apparatus may further comprise , parsed and removed 0ption82 options, and dynamic host configuration protocol packets forwarded to the appropriate user interface; otherwise, the dynamic host configuration protocol packets forwarded to the cascade port.

[0015] 优选地,该装置可进一步包括:确定模块,用于在服务器端口接收来自服务器的动态主机配置协议报文不携带0ption82选项的情况下,根据动态主机配置协议报文的报文头字段判断动态主机配置协议报文要求的转发方式;广播模块,用于在动态主机配置协议报文要求广播转发的情况下,将动态主机配置协议报文转发到级联端口和用户端口;单播模块,用于在动态主机配置协议报文要求单播转发的情况下,将动态主机配置协议报文转发到相应地址的端口。 [0015] Preferably, the apparatus may further comprise: determining means for receiving a dynamic host configuration protocol message from a server in the server port carrying case 0ption82 option, based on the packet header dynamic host configuration protocol packet field Analyzing forwarding mode dynamic host configuration protocol packets requested; broadcasting module, used in the case of a dynamic host configuration protocol packet of a broadcast forwarding, forwarding dynamic host configuration protocol packet to the cascade port and user port; unicast module for the case where the dynamic host configuration protocol packet of a unicast forwarding the dynamic host configuration protocol packet forwarding to the appropriate port addresses.

[0016] 优选地,用户端口还用于:在添加0ption82选项后的动态主机配置协议报文超过预定长度的情况下,不在动态主机配置协议报文中添加0ption82选项,直接将动态主机配置协议报文转发到服务器端口。 [0016] Preferably, the user interface is further configured to: Dynamic Host Configuration Protocol packets after the addition 0ption82 options exceeds a predetermined length, not a dynamic host configuration protocol message option 0ption82 added directly to Dynamic Host Configuration Protocol packets forwarded to the server port.

[0017] 通过本发明提出的动态主机配置协议0ption82实现方法及装置,能够解决接入设备级联的情况下无法根据0ption82定位和区分用户的问题。 [0017] The problem can not distinguish users 0ption82 positioning and in the case where dynamic host configuration protocol proposed by the present invention is to realize a method and apparatus 0ption82, cascade device access can be solved.

5附图说明 BRIEF DESCRIPTION OF 5

[0018] 此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。 [0018] The drawings described herein are provided for further understanding of the present invention, constitute a part of this application, exemplary embodiments of the present invention are used to explain the present invention without unduly limiting the present invention. 在附图中: In the drawings:

[0019] 图1示出了根据本发明实施例的组网应用示意图; [0019] FIG. 1 shows a network according to embodiments of the present invention is applied a schematic view;

[0020] 图2示出了根据本发明实施例的DHCP 0ption82实现方法的流程图; [0020] FIG. 2 shows a flowchart of an embodiment of the DHCP 0ption82 implementation of the method according to the present invention;

[0021] 图3示出了根据本发明优选实施例的DHCP 0ption82实现方法的流程图; [0021] FIG. 3 shows a flowchart DHCP 0ption82 embodiment of the present invention according to a preferred embodiment implementation of the method;

[0022] 图4示出了根据本发明装置实施例的DHCP 0ption82实现装置的框图。 [0022] FIG. 4 shows a block diagram of an embodiment of the DHCP 0ption82 apparatus of the present invention to achieve the device.

具体实施方式 Detailed ways

[0023] 以下结合附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。 [0023] Hereinafter, the preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, it should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention.

[0024] 方法实施例 Example [0024] Method

[0025] 图1示出了本发明的网络应用场景,将接入设备的端口分为三类:用户端口、级联端口和服务器端口。 [0025] FIG. 1 shows a network application scenario of the present invention, the access port device divided into three categories: user interface, cascade port and the server port. 在端口属性基础上实现DHCP 0ption82功能。 Implement DHCP 0ption82 features at the port property basis.

[0026] 如图1所示,该网络包括接入设备1和接入设备2。101为接入设备1的服务器端口,该端口是上行连接服务器的;102为接入设备1的用户端口,该端口是直连用户设备; 103为接入设备1的级联端口,该端口下行级联了接入设备2。104为接入设备2的服务器端口,该端口是上行连接服务器;105为接入设备2的用户端口,该端口直连用户设备。 [0026] As shown in FIG. 1, the network access device comprising 2.101 to 1 and the access device server port access device 1, the port is an uplink connection to the server; user port access device 102 to 1, the port is directly connected user equipment; access device 103 is a cascade port 1, the port access device cascaded downlink 2.104 to 2 access device server port, the port is an uplink connection to the server; 105 is connected the user interface device 2, the port directly connected to the user equipment.

[0027] 如图2所示,根据本发明实施例的DHCP 0ption82实现方法,包括以下处理: [0027] 2, DHCP 0ption82 embodiment of the present invention implemented method comprising the following processes:

[0028] 步骤S202,对用于接收DHCP报文的端口配置DHCP 0ption82功能,并根据端口的连接对象将端口分为以下类型:服务器端口、用户端口、级联端口; [0028] Step S202, the DHCP packet to a port configured for receiving the DHCP 0ption82 functions, and classified into the following types according to the port connection destination port: the port server, the user interface, cascade port;

[0029] 步骤S204,接入设备接收DHCP报文; [0029] step S204, the access device receives a DHCP message;

[0030] 步骤S206,其中,在服务器端口接收到DHCP报文、并且DHCP报文携带有0ption82 选项的情况下,根据0ption82选项将DHCP报文转发到级联端口或相应的用户端口; [0030] step S206, wherein the server receives the DHCP message port, and is carried in the DHCP message option has 0ption82 case, according 0ption82 option to forward DHCP packets to a user respective cascade port or ports;

[0031] 步骤S208,在用户端口接收到DHCP报文的情况下,根据DHCP报文对应的用户设备的标识信息构造0ption82选项并添加到DHCP报文中,并将添加了0ption82选项的DHCP 报文转发到服务器端口; [0031] step S208, in a case where the user port receiving the DHCP message, constructed in accordance with the identification information corresponding to the DHCP message option and a user equipment 0ption82 added to the DHCP packets, and adds a DHCP message option 0ption82 forwarded to the server port;

[0032] 步骤S210,在级联端口接收到DHCP报文的情况下,将DHCP报文转发到服务器端□。 [0032] step S210, at cascade port receives the DHCP message, the DHCP server forwards packets to □.

[0033] 其中,在服务器端口接收到DHCP报文的情况下,将DHCP报文转发到级联端口或相应的用户端口的处理具体包括:判断DHCP报文携带的0ption82选项是否为用户端口添加; 在判断为是的情况下,解析并摘除0ption82选项,并将DHCP报文转发到相应的用户端口; 否则,将DHCP报文转发到级联端口。 [0033] wherein, in the case where the DHCP server port receives the packet, the DHCP packets forwarded to the cascade port or handle a corresponding user port comprises: determining whether the message carried in DHCP option 0ption82 add user ports; in the case of a YES determination, resolve and removal 0ption82 options, and forwards DHCP packets to the appropriate user interface; otherwise, forwards DHCP packets to the cascade port.

[0034] 并且,在服务器端口接收到DHCP报文的情况下,如果DHCP报文不携带0ption82 选项,则上述方法还包括:根据DHCP报文的报文头字段判断DHCP报文要求的转发方式;在DHCP报文要求广播转发的情况下,将DHCP报文转发到级联端口和用户端口;在DHCP报文要求单播转发的情况下,将DHCP报文转发到相应地址的端口。 The [0034] Further, in the server port receives the DHCP message, if the DHCP packet does not carry 0ption82 option, the method further comprises: determining forwarding manner DHCP packets requested in accordance with DHCP packet header fields; in the case where the DHCP packet of a broadcast forwarding the DHCP message is forwarded to the cascade port and user port; in the case of DHCP messages claim unicast forwarding, the forwarding DHCP packets to the appropriate port addresses.

[0035] 通过该实施例,根据端口属性将报文进行转发,减少了广播洪泛影响。 [0035] By this embodiment, according to a port attribute packet forwarding broadcast flooding reduces impact.

[0036] 此外,在用户端口接收到DHCP报文的情况下,上述方法进一步包括:判断添加了构造的0ption82选项的DHCP报文的长度是否超过预定长度;在判断为是的情况下,不在DHCP报文中添加0ption82选项,直接将DHCP报文转发到服务器端口;否则在DHCP报文中添加0ption82,并将添加了0ption82的DHCP报文转发至服务器端口。 [0036] Further, in a case where the user interface receiving a DHCP packet, said method further comprising: determining adding whether DHCP packet length 0ption82 option configuration exceeds a predetermined length; the case where the determination is YES, not DHCP Add message 0ption82 options directly forwards DHCP packets to the server port; otherwise add 0ption82 in DHCP packets and add a 0ption82 DHCP message forwarded to the server port.

[0037] 通过上述实施例,能够解决接入设备级联的情况下无法根据0ption82定位和区分用户的问题。 The case where [0037] the above embodiment, it is possible to solve the problem can not access the cascade apparatus according 0ption82 positioning and distinguish users.

[0038] 如图3所示,根据本发明优选实施例的DHCP 0ption82实现方法,包括以下处理: [0038] As shown in FIG 3, DHCP 0ption82 according to a preferred embodiment of the present invention implemented method comprising the following processes:

[0039] 步骤S302,接入设备收到DHCP报文,匹配接收报文端口属性; [0039] In step S302, the access equipment receives a DHCP packet, the packet attribute matches the receiving port;

[0040] 步骤S304,接收报文的端口为用户端口,根据端口对应的用户设备的信息构造0ption82选项,并添加到DHCP报文; [0040] step S304, the received packet is user port of the port according to the port information corresponding to the user equipment 0ption82 configuration options, and added to the DHCP packets;

[0041] 步骤S306,判断添加构造的0ption82选项后的DHCP报文是否超长:如果是,则不添加0ption82选项,直接将该DHCP报文转发到服务器端口;否则,插入0ption82选项,并将DHCP报文转发到服务器端口; [0041] Step S306, the DHCP message option 0ption82 determined whether to add a configuration of long text: If, 0ption82 option is not added directly forward the packet to the DHCP server port; otherwise, inserting 0ption82 option and DHCP forwards the packet to the server port;

[0042] 步骤S308,接收报文的端口为级联端口,DHCP报文已经由下行接入设备添加了0ption82选项,直接向服务器端口转发; [0042] In step S308, the received message is a port cascade port, the DHCP message option has been added by the downlink access 0ption82 are forwarded directly to the server port;

[0043] 步骤S310,接收报文的端口为服务器端口,判断DHCP报文是否携带0ption82选项; [0043] step S310, the received message is a port server port, determines whether DHCP packet carries 0ption82 option;

[0044] 步骤S312,DHCP报文没有携带0ption82选项,根据DHCP报文头广播字段确定转发策略:如果该字段要求广播转发,则将该报文转发到所有用户端口和级联端口;如果该字段要求单播转发,则由接入设备完成单播寻址转发; [0044] step S312, DHCP packets do not carry 0ption82 options, determine a forwarding policy based on DHCP broadcast packet header field: If the field requires a broadcaster, the packet is forwarded to all ports and cascading user interface; if the field It requires unicast forwarding, by the access device forwards the unicast addressing;

[0045] 步骤S314,DHCP报文携带有0ption82选项,判断该0ption82选项是否为本设备添加:如果不是,则为下行接入设备添加的,因此将报文转发到级联端口,由下行接入设备处理; [0045] Step S314, DHCP message carries 0ption82 option determines whether to add the option 0ption82 present apparatus: if not, was added a downlink access device, thus forwards the packet to the cascade port, the downlink access processing equipment;

[0046] 步骤S316,DHCP报文携带的Option82选项识别为本设备添加,解析并摘除0ption82选项后转发到对应的用户端口。 [0046] Step S316, DHCP option Option82 carried in the packet recognizes that the device is added, is forwarded to the user port corresponding to the parsed and removed 0ption82 option.

[0047] 装置实施例 [0047] Example apparatus

[0048] 如图4所示,根据本发明实施例的动态主机配置协议0ption82实现装置,包括: 服务器端口10,用于接收来自服务器的DHCP报文、并且DHCP报文携带有0ption82选项的情况下,根据0ption82选项将DHCP报文转发到级联端口或相应的用户端口;用户端口20,用于接收来自用户设备的DHCP报文,根据DHCP报文对应的用户设备的标识信息构造0ption82选项并添加到DHCP报文中,并将添加了0ption82选项的DHCP报文转发到服务器端口;级联端口30,用于接收来自下行级联接入设备的DHCP报文,并将DHCP报文转发到服务器端口。 [0048] As shown, the dynamic host configuration protocol embodiment of the present invention is implemented 0ption82 means 4, comprising: if the server port 10, for receiving a message from the DHCP server and DHCP message option carries 0ption82 the 0ption82 option to forward DHCP packets to a corresponding cascade port or user port; user port 20, for receiving the DHCP message from the user equipment, according to the identification information of the DHCP packet corresponding user equipment configuration options and add 0ption82 the DHCP packet, and adds the DHCP option 0ption82 message forwarded to the server port; cascade port 30 for receiving the DHCP message from the downstream cascade access device, and forward the packet to the DHCP server port .

[0049] 其中,该装置可进一步包括:判断模块(图中未示出),用于判断DHCP报文携带的0ption82选项是否为用户端口添加;转发模块(图中未示出),用于在判断模块判断的结构为是的情况下,解析并摘除0ption82选项,并将DHCP报文转发到相应的用户端口;否则,将DHCP报文转发到级联端口。 [0049] wherein, the apparatus may further comprise: a determining module (not shown), for determining whether the DHCP message carrying the user the option 0ption82 the ports; forwarding module (not shown), for the determination module determines a configuration is YES, parse and extraction 0ption82 option, and forwards the DHCP packets to the appropriate user interface; otherwise, forward DHCP packets to cascade ports.

[0050] 并且,该装置可以进一步包括:确定模块(图中未示出),用于在服务器端口接收来自服务器的动态主机配置协议报文不携带0ption82选项的情况下,根据动态主机配置协议报文的报文头字段判断动态主机配置协议报文要求的转发方式;广播模块(图中未示出),用于在DHCP报文要求广播转发的情况下,将DHCP报文转发到级联端口和用户端口; 单播模块(图中未示出),用于在DHCP报文要求单播转发的情况下,将DHCP报文转发到相应地址的端口。 [0050] Further, the apparatus may further comprise: a determining module (not shown) for receiving a dynamic host configuration protocol message from a server in the server port carrying case 0ption82 option, according to a Dynamic Host Configuration Protocol packets header field of a packet determines the forwarding mode dynamic host configuration protocol packets requested; broadcasting module (not shown), is used in the case of DHCP messages broadcast forwarding requirements, forwarding DHCP packet to the cascade port and a user interface; unicast module (not shown), is used in the case of unicast DHCP message forwarding requirements, the DHCP packets forwarded to the appropriate port addresses.

[0051] 此外,用户端口20还用于:在添加0ption82选项后的DHCP报文超过预定长度的情况下,不在DHCP报文中添加0ption82选项,直接将DHCP报文转发到服务器端口。 [0051] In addition, the user interface 20 further configured to: after the addition of DHCP messages 0ption82 options exceeds a predetermined length, is not added 0ption82 DHCP option packet, forwarding DHCP packet directly to the server port.

[0052] 本发明的技术方案与DHCP Snooping技术没有冲突,可以结合实现,服务器端口对应信任端口,级联端口和用户端口可以看作是非信任端口的细分,无需对现有协议进行改动。 [0052] The aspect of the present invention is not in conflict with the DHCP Snooping technique can be implemented in combination, corresponding to a trusted port server port, the port and user port cascade segments can be viewed as non-trusted port without the need for changes to the existing protocol.

[0053] 综上所述,通过本发明提出的DHCP 0ption82实现方法及装置,能够解决接入设备级联的情况下无法根据0ption82定位和区分用户的问题。 [0053] In summary, the problem can not be distinguished according to the user location and 0ption82 case where the present invention provides a method and apparatus implemented DHCP 0ption82, cascade device access can be solved.

[0054] 显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。 [0054] Obviously, those skilled in the art should understand that the modules or steps of the present invention described above can be used general-purpose computing device, they can be integrated in a single computing device or distributed across multiple computing devices available on the Internet, optionally, they can be implemented with program codes executable by a computing device, so that, to be performed by a computing device stored in a storage device, or they are made into integrated circuit modules, or they plurality of modules or steps are manufactured into a single integrated circuit module. 这样,本发明不限制于任何特定的硬件和软件结合。 Thus, the present invention is not limited to any particular hardware and software combination.

[0055] 以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。 [0055] The above description is only preferred embodiments of the present invention, it is not intended to limit the invention to those skilled in the art, the present invention may have various changes and variations. 凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 Any modification within the spirit and principle of the present invention, made, equivalent substitutions, improvements, etc., should be included within the scope of the present invention.

Claims (9)

1. 一种用于接入设备级联的动态主机配置协议0ption82实现方法,其特征在于,包括:对用于接收动态主机配置协议报文的端口配置动态主机配置协议0ption82功能,并根据所述端口的连接对象将所述端口分为以下类型:服务器端口、用户端口、级联端口; 接入设备接收所述动态主机配置协议报文;其中,在所述服务器端口接收到下行的所述动态主机配置协议报文、并且所述动态主机配置协议报文携带有0ption82选项的情况下,根据所述0ption82选项将所述动态主机配置协议报文转发到所述级联端口或相应的所述用户端口;在所述用户端口接收到上行的所述动态主机配置协议报文的情况下,根据所述动态主机配置协议报文对应的用户设备的标识信息构造0ption82选项并添加到所述动态主机配置协议报文中,并将添加了所述0ption82选项的所述动态主机配置协议报文 A dynamic host configuration protocol for accessing cascading devices 0ption82 implemented method, comprising, comprising: means for receiving a Dynamic Host Configuration Protocol packet port configuration 0ption82 dynamic host configuration protocol functions, and according to the the connection destination port port into the following types: server port, user interface, cascade port; wherein said dynamic, receiving the downlink port on the server; access device receiving the dynamic host configuration protocol packet host configuration protocol packets, and the dynamic host configuration protocol message carries 0ption82 options, the option according to the 0ption82 the dynamic host configuration protocol packet is forwarded to the cascade port or the respective user port; in a case where the user receives the uplink port the dynamic host configuration protocol message, according to the dynamic host configuration protocol identifier corresponding to the packet information of user equipment configured 0ption82 option and added to the dynamic host configuration protocol message, adds the option 0ption82 the dynamic host configuration protocol packets 转发到所述服务器端口;在所述级联端口接收到上行的所述动态主机配置协议报文的情况下,将所述动态主机配置协议报文转发到所述服务器端口。 Forwarded to the server port; protocol packets in the case of the dynamic host in the cascade receives the uplink port of the dynamic host configuration protocol packet is forwarded to the server port.
2.根据权利要求1所述的方法,其特征在于,在所述服务器端口接收到所述动态主机配置协议报文、并且所述动态主机配置协议报文携带有0ption82选项的情况下,将所述动态主机配置协议报文转发到所述级联端口或相应的所述用户端口的处理具体包括:判断所述动态主机配置协议报文携带的所述0ption82选项是否为所述用户端口添加;在判断为是的情况下,解析并摘除所述0ption82选项,并将所述动态主机配置协议报文转发到相应的所述用户端口;否则,将所述动态主机配置协议报文转发到所述级联端口。 2. The method according to claim 1, characterized in that the port receiving the dynamic host configuration protocol message to the server, and the dynamic host configuration protocol message carrying the option has 0ption82 case, the said dynamic host configuration protocol packets forwarded to the cascade port or the processing of the respective user port comprises: determining whether the dynamic host configuration protocol option 0ption82 carried in the packet port is added to the user; in When it is determined yes, the parsing and extraction 0ption82 option, and the dynamic host configuration protocol packets forwarded to the respective user port; otherwise, the dynamic host configuration protocol packet forwarding to the stage Union ports.
3.根据权利要求1所述的方法,其特征在于,在所述服务器端口接收到所述动态主机配置协议报文的情况下,如果所述动态主机配置协议报文不携带0ption82选项,则所述方法还包括:根据所述动态主机配置协议报文的报文头字段判断所述动态主机配置协议报文要求的转发方式;在所述动态主机配置协议报文要求广播转发的情况下,将所述动态主机配置协议报文转发到所述级联端口和所述用户端口;在所述动态主机配置协议报文要求单播转发的情况下,将所述动态主机配置协议报文转发到相应地址的端口。 3. The method according to claim 1, characterized in that the lower port when receiving the dynamic host configuration protocol packet at the server, if the dynamic host configuration protocol packet carrying 0ption82 option, the said method further comprising: determining the packet header field according to the dynamic host configuration protocol packet forwarding mode of the dynamic host configuration protocol packets requested; in the case where the dynamic host configuration protocol packet of a broadcast forwarding will the dynamic host configuration protocol message is forwarded to the cascade port and said user ports; in the case of the dynamic host configuration protocol packet of a unicast forwarding, the dynamic host configuration protocol packet forwarding to the appropriate port address.
4.根据权利要求1所述的方法,其特征在于,在所述用户端口接收到所述动态主机配置协议报文的情况下,进一步包括:判断添加了构造的所述0ption82选项的所述动态主机配置协议报文的长度是否超过预定长度;在判断为是的情况下,不在所述动态主机配置协议报文中添加所述0ption82选项,直接将所述动态主机配置协议报文转发到所述服务器端口;否则在所述动态主机配置协议报文中添加所述0ption82选项,并将添加了所述0ption82选项的动态主机配置协议报文转发至所述服务器端口。 4. The method according to claim 1, characterized in that, in the case of the port receiving the dynamic host configuration protocol packet of the user, further comprising: dynamically determining said configuration is added to the options 0ption82 whether the length host configuration protocol packets exceeds a predetermined length; in the case of a YES determination, not the dynamic host configuration protocol message to add the option 0ption82, directly forwarding the dynamic host configuration protocol packets to the server port; otherwise, add the 0ption82 option in the dynamic host configuration protocol packets and add the dynamic host configuration protocol 0ption82 option of forwarding packets to the server port.
5.根据权利要求1至4中任一项所述的方法,其特征在于,所述服务器端口为上行连接服务器的端口;所述用户端口为与用户设备连接的端口;所述级联端口为下行级联接入设备的端口。 A method according to any one of claim 4 to claim, characterized in that said server is a port connected to an uplink port of the server; user port with the port of the connected user equipment; the cascade port downstream cascade port access device.
6. 一种用于级联接入设备的动态主机配置协议0ption82实现装置,设置于接入设备, 其特征在于,包括:服务器端口,用于接收来自所述服务器的动态主机配置协议报文、并且所述动态主机配置协议报文携带有0ption82选项的情况下,根据所述0ption82选项将所述动态主机配置协议报文转发到级联端口或相应的用户端口;所述用户端口,用于接收来自用户设备的所述动态主机配置协议报文,根据所述动态主机配置协议报文对应的用户设备的标识信息构造0ption82选项并添加到所述动态主机配置协议报文中,并将添加了所述0ption82选项的所述动态主机配置协议报文转发到所述服务器端口;所述级联端口,用于接收来自下行级联接入设备的所述动态主机配置协议报文,并将所述动态主机配置协议报文转发到所述服务器端口。 A dynamic host configuration protocol access device for cascading 0ption82 implemented means disposed in the access device, characterized by comprising: a server port for receiving a dynamic host configuration protocol message from the server, and a case where the dynamic host configuration protocol message carries 0ption82 option based on the option 0ption82 the dynamic host configuration protocol packets forwarded to the cascade port or respective user port; the user port to receive the dynamic host configuration protocol message from the user equipment, according to the dynamic host configuration protocol identifier corresponding to the packet information of user equipment configured 0ption82 option and added to the dynamic host configuration protocol message, and adding the 0ption82 said options of the dynamic host configuration protocol packet is forwarded to the server port; the cascade port for receiving the dynamic host configuration protocol message from the downstream cascade access device, and the dynamic host configuration protocol packets forwarded to the server port.
7.根据权利要求6所述的装置,其特征在于,还包括:判断模块,用于在所述服务器端口接收到所述动态主机配置协议报文、并且所述动态主机配置协议报文携带有0ption82选项的情况下,判断所述动态主机配置协议报文携带的所述0ption82选项是否为所述用户端口添加;转发模块,用于在判断模块判断的结构为是的情况下,解析并摘除所述0ption82选项,并将所述动态主机配置协议报文转发到相应的所述用户端口;否则,将所述动态主机配置协议报文转发到所述级联端口。 7. The device according to claim 6, characterized in that, further comprising: a determining module, a port for receiving the dynamic host configuration protocol message to the server, and the dynamic host configuration protocol message carries 0ption82 case option, determines the dynamic host configuration protocol message carries the 0ption82 option is to add the user port; forwarding module, the determination module for the determination of structure is the case, and removal of the parse said 0ption82 option, and the dynamic host configuration protocol packets forwarded to the respective user port; otherwise, the dynamic host configuration protocol message is forwarded to the cascade port.
8.根据权利要求7所述的装置,其特征在于,还包括:确定模块,用于在所述服务器端口接收来自所述服务器的所述动态主机配置协议报文不携带所述0ption82选项的情况下,根据所述动态主机配置协议报文的报文头字段判断所述动态主机配置协议报文要求的转发方式;广播模块,用于在所述动态主机配置协议报文要求广播转发的情况下,将所述动态主机配置协议报文转发到所述级联端口和所述用户端口;单播模块,用于在所述动态主机配置协议报文要求单播转发的情况下,将所述动态主机配置协议报文转发到相应地址的端口。 Determined module, the server port for receiving the dynamic host configuration protocol message from the server does not carry the 0ption82 options: 8. Apparatus according to claim 7, characterized in that, further comprising the case where the broadcast module, the message for the dynamic host configuration protocol broadcast forwarding requirements; in packet header field is determined according to the dynamic host configuration protocol packet forwarding mode of the dynamic host configuration protocol packet of a , the dynamic host configuration protocol message is forwarded to the cascade port and said user ports; unicast module for a case where the dynamic host configuration protocol packet of a unicast forwarding, the dynamic host configuration protocol packet forwarding port to the appropriate address.
9.根据权利要求6所述的装置,其特征在于,所述用户端口还用于:在添加所述0ption82选项后的所述动态主机配置协议报文超过预定长度的情况下, 不在所述动态主机配置协议报文中添加所述0ption82选项,直接将所述动态主机配置协议报文转发到所述服务器端口。 9. The apparatus according to claim 6, wherein said user interface further configured to: the dynamic host configuration protocol packet after adding the option 0ption82 case exceeds a predetermined length, not a dynamic host configuration protocol messages. It is the 0ption82 option, directly to the dynamic host configuration protocol packets forwarded to the server port.
CN 200810108516 2008-05-23 2008-05-23 Implementing method and device for dynamic host configuring protocol Option82 CN101286991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810108516 CN101286991B (en) 2008-05-23 2008-05-23 Implementing method and device for dynamic host configuring protocol Option82

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810108516 CN101286991B (en) 2008-05-23 2008-05-23 Implementing method and device for dynamic host configuring protocol Option82

Publications (2)

Publication Number Publication Date
CN101286991A CN101286991A (en) 2008-10-15
CN101286991B true CN101286991B (en) 2011-06-22

Family

ID=40058958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810108516 CN101286991B (en) 2008-05-23 2008-05-23 Implementing method and device for dynamic host configuring protocol Option82

Country Status (1)

Country Link
CN (1) CN101286991B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102487396B (en) * 2010-12-02 2015-04-01 中兴通讯股份有限公司 User position determining method and system
CN103634844A (en) * 2012-08-24 2014-03-12 中兴通讯股份有限公司 Method and system for realizing distributed multi-port DHCP relay
CN103297562A (en) * 2013-05-31 2013-09-11 深圳市共进电子股份有限公司 Method, equipment and system for realizing Option82 processing based on kernel

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1613023A2 (en) 2004-07-01 2006-01-04 Fujitsu Limited Network system, network bridge device, network management apparatus, network address assignment method and network address resolution method
CN101009635A (en) 2006-01-27 2007-08-01 上海贝尔阿尔卡特股份有限公司 A message forwarding method for the dynamic host configuration protocol and its network device
CN101043280A (en) 2006-06-24 2007-09-26 华为技术有限公司 Method and system for positioning user location
CN101075962A (en) 2007-06-26 2007-11-21 中兴通讯股份有限公司 Method and apparatus for realizing DHCP repeater in two-layer network exchanger
EP1876754A1 (en) 2005-04-29 2008-01-09 Huawei Technologies Co., Ltd. Method system and server for implementing dhcp address security allocation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1613023A2 (en) 2004-07-01 2006-01-04 Fujitsu Limited Network system, network bridge device, network management apparatus, network address assignment method and network address resolution method
EP1876754A1 (en) 2005-04-29 2008-01-09 Huawei Technologies Co., Ltd. Method system and server for implementing dhcp address security allocation
CN101009635A (en) 2006-01-27 2007-08-01 上海贝尔阿尔卡特股份有限公司 A message forwarding method for the dynamic host configuration protocol and its network device
CN101043280A (en) 2006-06-24 2007-09-26 华为技术有限公司 Method and system for positioning user location
CN101075962A (en) 2007-06-26 2007-11-21 中兴通讯股份有限公司 Method and apparatus for realizing DHCP repeater in two-layer network exchanger

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙力芾等.DHCP及Option82安全机制的原理与实现.《信息技术》.2005,29-32.

Also Published As

Publication number Publication date
CN101286991A (en) 2008-10-15

Similar Documents

Publication Publication Date Title
JP6144783B2 (en) Increase name / prefix-based routing protocol with the trust anchor in the information center of the network
US9992107B2 (en) Processing data packets using a policy based network path
US7852774B2 (en) User datagram protocol traceroute probe extension
CN1972297B (en) Computerized system and method for policy-based content filtering
KR101624474B1 (en) Network system and method of controlling path
US6389532B1 (en) Method and apparatus for using digital signatures to filter packets in a network
US9985994B2 (en) Enforcing compliance with a policy on a client
US7996894B1 (en) MAC address modification of otherwise locally bridged client devices to provide security
US20070022474A1 (en) Portable firewall
CN101019405B (en) Method and system for mitigating denial of service in a communication network
US7643487B2 (en) System and method for delivering the magic packet to wake up a node in remote subnet
JP2009510815A (en) Search reassembly method and system of the previous packet
WO1998026554A1 (en) Method and apparatus for assignment of ip addresses
JPH10210068A (en) Network and network control method
JP2006203904A (en) Method, content based router, and content based network
CN101656677B (en) Message diversion processing method and device
CN100481832C (en) Communication device, edge router device, server device, communication system and communication method
JP4054007B2 (en) Communication system, a router device, a communication method, routing method, a communication program and routing program
CN1514625A (en) Detecting of network attack
US8073936B2 (en) Providing support for responding to location protocol queries within a network node
JP2004104544A (en) Rsvp representative response router, rsvp representative response system and rsvp representative responding method used for the same
WO2009128881A1 (en) Intrusion detection system (ids) and intrusion prevention system (ips) rule processing
CN1406351A (en) System, device and method for rapid packet filtering and preocessing
CN101094236A (en) Method for processing message in address resolution protocol, communication system, and forwarding planar process portion
CN103812770B (en) Cloud service packet redirection method, system and cloud gateway

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
CF01