CN102255814A - Method, device and system for selecting transfer path - Google Patents
Method, device and system for selecting transfer path Download PDFInfo
- Publication number
- CN102255814A CN102255814A CN2011102198225A CN201110219822A CN102255814A CN 102255814 A CN102255814 A CN 102255814A CN 2011102198225 A CN2011102198225 A CN 2011102198225A CN 201110219822 A CN201110219822 A CN 201110219822A CN 102255814 A CN102255814 A CN 102255814A
- Authority
- CN
- China
- Prior art keywords
- path information
- address
- preferred path
- response message
- client
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种选择传送路径的方法、装置和系统。采用本发明实施例提供的技术方案,通过解析DHCP应答报文中客户端IP地址等信息,生成优选路径信息表,指导客户端数据报文的转发,可以解决现有技术中数据报文传送路径与接入网络的认证路径不一致,客户端无法访问网络的问题。
The embodiment of the invention discloses a method, device and system for selecting a transmission path. Adopting the technical solution provided by the embodiment of the present invention, by analyzing information such as the client IP address in the DHCP response message, generating an optimal path information table to guide the forwarding of the client data message, the data message transmission path in the prior art can be solved. The authentication path of the access network is inconsistent, and the client cannot access the network.
Description
技术领域 technical field
本发明涉及网络通信领域,尤其涉及一种选择传送路径的方法、装置和系统。The invention relates to the field of network communication, in particular to a method, device and system for selecting a transmission path.
背景技术 Background technique
动态主机配置协议(Dynamic Host Configuration Protocol,简称为DHCP)中存在三个角色:DHCP客户端,DHCP服务器和DHCP中继。当DHCP客户端与DHCP服务器处于不同子网时,可以通过DHCP中继将DHCP协议报文跨网段中继到目的DHCP服务器,使得不同网络上的DHCP客户端可以共用一个DHCP服务器。There are three roles in the Dynamic Host Configuration Protocol (DHCP for short): DHCP client, DHCP server and DHCP relay. When the DHCP client and the DHCP server are in different subnets, the DHCP relay agent can relay the DHCP protocol packets to the destination DHCP server across network segments, so that the DHCP clients on different networks can share one DHCP server.
宽带远程接入服务器(Broadband Remote Access Server,简称为BRAS)是面向宽带网络应用的新型接入网关,位于骨干网的边缘,完成各种宽带接入方式的用户接入、认证、计费、控制、管理,实现多种业务的汇聚与转发。BRAS同时可充当DHCP服务器,在完成用户的认证后,给DHCP中继发送DHCP回应报文,用来给DHCP客户端分配网际协议(Internet Protocol,简称为IP)地址和域名服务器(Domain Name Server,简称为DNS)等配置信息,并在BRAS上生成用户的转发检查表,对用户的源IP,虚拟局域网(Virtual Local AreaNetwork,简称为VLAN)等信息进行检查,防止仿冒用户的流量从BRAS设备转发。Broadband Remote Access Server (BRAS for short) is a new type of access gateway for broadband network applications. It is located at the edge of the backbone network and completes user access, authentication, billing, and control of various broadband access methods , management, and realize the aggregation and forwarding of various services. The BRAS can act as a DHCP server at the same time. After completing the user authentication, it sends a DHCP response message to the DHCP relay agent, which is used to assign an Internet Protocol (Internet Protocol, referred to as IP) address and a Domain Name Server (Domain Name Server, Domain Name Server) to the DHCP client. DNS) and other configuration information, and generate a user forwarding checklist on the BRAS, check the user's source IP, virtual local area network (Virtual Local Area Network, referred to as VLAN) and other information, and prevent counterfeit user traffic from being forwarded from the BRAS device .
如果DHCP中继同时连接多台BRAS,或者DHCP中继到一个BRAS存在多条虚拟链路,当客户端的数据报文传送路径与客户端接入网络的认证路径不一致时,由于根据转发检查表,对客户端数据报文的有效性检查失败,导致客户端无法访问网络。If the DHCP relay agent is connected to multiple BRASs at the same time, or there are multiple virtual links between the DHCP relay agent and a BRAS, when the data packet transmission path of the client is inconsistent with the authentication path of the client accessing the network, due to the forwarding check table, The validity check of the data packet of the client fails, causing the client to fail to access the network.
发明内容 Contents of the invention
本发明实施例提供了一种选择传送路径的方法、装置和系统,以解决现有技术中客户端的数据报文传送路径与客户端接入网络的认证路径不一致,客户端无法访问网络的问题。Embodiments of the present invention provide a method, device and system for selecting a transmission path to solve the problem in the prior art that the data message transmission path of the client is inconsistent with the authentication path for the client to access the network, and the client cannot access the network.
根据本发明的一个方面,本发明提供了一种选择传送路径的方法,包括:According to one aspect of the present invention, the present invention provides a method for selecting a transmission path, comprising:
接收动态主机配置协议DHCP应答报文,所述DHCP应答报文中包括客户端的网际协议IP地址;Receiving a Dynamic Host Configuration Protocol DHCP response message, the DHCP response message including the client's Internet Protocol IP address;
根据所述DHCP应答报文获取优选路径信息,所述优选路径信息包括所述客户端的IP地址和接收所述DHCP应答报文的端口的端口标识的对应关系;Acquire preferred path information according to the DHCP response message, where the preferred path information includes a correspondence between the IP address of the client and the port identifier of the port receiving the DHCP response message;
在优选路径信息表中记录所述优选路径信息;Recording the preferred route information in the preferred route information table;
接收数据报文;receive datagrams;
根据所述数据报文的源IP地址查询所述优选路径信息表,当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息中端口标识对应的端口转发所述数据报文。Query the preferred path information table according to the source IP address of the data message, when the source IP address of the data message is the same as the IP address of an existing preferred path information in the preferred path information table, from The port corresponding to the port identifier in the existing preferred path information forwards the data message.
根据本发明的另一个方面,本发明提供了一种选择传送路径的装置,包括接收器,获取单元,记录单元,查询单元和发送器,其中:According to another aspect of the present invention, the present invention provides a device for selecting a transmission path, including a receiver, an acquisition unit, a recording unit, an inquiry unit and a transmitter, wherein:
所述接收器,用于接收来自服务器的动态主机配置协议DHCP应答报文,所述DHCP应答报文中包括客户端的网际协议IP地址;所述接收器还用于接收数据报文;The receiver is configured to receive a DHCP response message from the server, the DHCP response message includes the client's Internet Protocol IP address; the receiver is also used to receive a data message;
所述获取单元,用于根据所述DHCP应答报文获取优选路径信息,所述优选路径信息包括所述客户端的IP地址和接收所述DHCP应答报文的端口的端口标识的对应关系;The obtaining unit is configured to obtain preferred path information according to the DHCP response message, the preferred path information including the correspondence between the IP address of the client and the port identifier of the port receiving the DHCP response message;
所述记录单元,用于在优选路径信息表中记录所述优选路径信息;The recording unit is configured to record the preferred route information in the preferred route information table;
所述查询单元,用于根据所述数据报文的源IP地址查询所述优选路径信息表;The query unit is configured to query the preferred path information table according to the source IP address of the data message;
所述发送器,用于当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息中端口标识对应的端口转发所述数据报文。The sender is configured to, when the source IP address of the data message is the same as the IP address of an existing preferred path information in the preferred path information table, corresponding to the port identifier from the existing preferred path information The port forwards the data packet.
根据本发明的另一个方面,本发明提供了一种选择传送路径的系统,包括网络设备和服务器,其中:According to another aspect of the present invention, the present invention provides a system for selecting a transmission path, including a network device and a server, wherein:
所述网络设备,用于接收来自所述服务器的DHCP应答报文,所述DHCP应答报文中包括客户端的IP地址,根据所述DHCP应答报文获取优选路径信息,所述优选路径信息包括所述客户端的IP地址和所述DHCP应答报文的端口标识;在优选路径信息表中记录所述优选路径信息;所述网络设备还用于接收数据报文,根据所述数据报文的源IP地址查询所述优选路径信息表,当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息的端口标识对应的端口转发所述数据报文。The network device is configured to receive a DHCP response message from the server, the DHCP response message includes the IP address of the client, obtains preferred path information according to the DHCP response message, and the preferred path information includes the The IP address of the client and the port identification of the DHCP response message; record the preferred path information in the preferred path information table; the network device is also used to receive data packets, according to the source IP of the data packets address query the preferred path information table, when the source IP address of the data message is the same as the IP address of an existing preferred path information in the preferred path information table, from the port of the existing preferred path information Identify the corresponding port to forward the data packet.
采用本发明提供的技术方案,通过解析DHCP应答报文中客户端IP地址等信息,生成优选路径信息表,指导客户端数据报文的转发,可以解决现有技术中客户端的数据报文传送路径与客户端接入网络的认证路径不一致,客户端无法访问网络的问题。Adopting the technical solution provided by the present invention, by analyzing information such as the client IP address in the DHCP response message, generating an optimal path information table to guide the forwarding of the client data message, the data message transmission path of the client in the prior art can be solved The authentication path for the client to access the network is inconsistent, and the client cannot access the network.
附图说明Description of drawings
图1是本发明实施例提供的一种选择传送路径的方法流程图;FIG. 1 is a flow chart of a method for selecting a transmission path provided by an embodiment of the present invention;
图2是本发明实施例提供的一种选择传送路径的信息交互图;Fig. 2 is an information interaction diagram for selecting a transmission path provided by an embodiment of the present invention;
图3是本发明实施例提供的另一种选择传送路径的信息交互图;Fig. 3 is another information interaction diagram for selecting a transmission path provided by an embodiment of the present invention;
图4是本发明实施例提供的另一种选择传送路径的方法流程图;FIG. 4 is a flow chart of another method for selecting a transmission path provided by an embodiment of the present invention;
图5是本发明实施例提供的一种选择传送路径的装置框图;Fig. 5 is a block diagram of a device for selecting a transmission path provided by an embodiment of the present invention;
图6是本发明实施例提供的一种选择传送路径的系统框图。Fig. 6 is a block diagram of a system for selecting a transmission path provided by an embodiment of the present invention.
具体实施方式 Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.
本发明实施例提供了一种选择传送路径的方法、装置和系统。所述方法,包括:接收DHCP应答报文,所述DHCP应答报文中包括客户端的IP地址;根据所述DHCP应答报文获取优选路径信息,所述优选路径信息包括所述客户端的IP地址和接收所述DHCP应答报文的端口的端口标识的对应关系;在优选路径信息表中记录所述优选路径信息;接收数据报文;根据所述数据报文的源IP地址查询所述优选路径信息表,当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息中端口标识对应的端口转发所述数据报文。采用本发明实施例提供的技术方案,通过解析DHCP应答报文中客户端IP地址等信息,生成优选路径信息表,指导客户端数据报文的转发,保证客户端的数据报文传送路径与客户端接入网络的认证路径一致,实现客户端正常访问网络。Embodiments of the present invention provide a method, device and system for selecting a transmission path. The method includes: receiving a DHCP response message, the DHCP response message including the IP address of the client; obtaining preferred path information according to the DHCP response message, the preferred path information including the client's IP address and Receive the corresponding relationship of the port identification of the port of the DHCP response message; record the preferred path information in the preferred path information table; receive the data message; query the preferred path information according to the source IP address of the data message table, when the source IP address of the data message is the same as the IP address of an existing preferred path information in the preferred path information table, forward the datagram. Adopt the technical scheme that the embodiment of the present invention provides, by analyzing information such as client IP address in the DHCP response message, generate preferred path information table, guide the forwarding of client data message, guarantee the data message transmission path of client and client The authentication path for accessing the network is the same, enabling the client to access the network normally.
参见图1,是本发明实施例提供的一种选择传送路径的方法流程图,所述方法包括:Referring to FIG. 1 , it is a flow chart of a method for selecting a transmission path provided by an embodiment of the present invention, and the method includes:
101:网络设备接收来自客户端的DHCP请求报文,并向服务器转发所述DHCP请求报文;所述服务器为所述客户端分配IP地址,并回应DHCP应答报文;所述网络设备接收所述DHCP应答报文,所述DHCP应答报文中包括客户端的IP地址。101: The network device receives the DHCP request message from the client, and forwards the DHCP request message to the server; the server assigns an IP address to the client, and responds to a DHCP response message; the network device receives the A DHCP response message, where the DHCP response message includes the IP address of the client.
所述网络设备包括具有DHCP中继功能的路由器。The network device includes a router with a DHCP relay function.
所述服务器包括具有DHCP服务器功能的路由器,例如BRAS。The server includes a router with a DHCP server function, such as a BRAS.
102:所述网络设备获取优选路径信息,所述优选路径信息包括所述客户端的IP地址和接收所述DHCP应答报文的端口的端口标识的对应关系;102: The network device acquires preferred path information, where the preferred path information includes a correspondence between the IP address of the client and the port identifier of the port receiving the DHCP response message;
所述网络设备可以解析所述DHCP应答报文,获取所述客户端的IP地址。The network device can parse the DHCP response message to obtain the IP address of the client.
所述端口标识可以是端口号;还可以是端口号和VLAN标识。The port identifier may be a port number; it may also be a port number and a VLAN identifier.
所述网络设备还可以根据所述DHCP应答报文获取所述VLAN标识。The network device may also acquire the VLAN identifier according to the DHCP response message.
103:所述网络设备在优选路径信息表中记录所述优选路径信息。103: The network device records the preferred path information in a preferred path information table.
可选的,所述网络设备根据所述DHCP应答报文建立所述优选路径信息表。Optionally, the network device establishes the preferred path information table according to the DHCP response message.
所述网络设备向客户端转发所述DHCP应答报文。The network device forwards the DHCP response message to the client.
104:所述网络设备接收数据报文;104: The network device receives a data packet;
105:所述网络设备根据所述数据报文的源IP地址查询所述优选路径信息表;105: The network device queries the preferred path information table according to the source IP address of the data packet;
106:当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息中端口标识对应的端口转发所述数据报文。106: When the source IP address of the data message is the same as the IP address of an existing preferred path information in the preferred path information table, forward the datagram.
当所述数据报文的源IP地址与所述优选路径信息表中任意一条已有优选路径信息的IP地址都不相同时,所述网络设备根据路由表转发所述数据报文。When the source IP address of the data message is different from the IP address of any existing preferred path information in the preferred path information table, the network device forwards the data message according to the routing table.
举例来说,如图2所示,客户端A通过DHCP中继同时连接到BRAS1和BRAS2,其中DHCP中继的端口Port1连接BRAS1,DHCP中继的端口Port2连接BRAS2。For example, as shown in FIG. 2 , client A is simultaneously connected to BRAS1 and BRAS2 through a DHCP relay agent, wherein port Port1 of the DHCP relay agent is connected to BRAS1, and port Port2 of the DHCP relay agent is connected to BRAS2.
客户端A接入网络时,通过DHCP中继向DHCP服务器发送DHCP请求报文,请求分配IP地址;When client A accesses the network, it sends a DHCP request message to the DHCP server through the DHCP relay agent, requesting to assign an IP address;
DHCP中继收到客户端A发送的DHCP请求报文后,将客户端A发送的DHCP请求报文转发给BRAS1;After the DHCP relay agent receives the DHCP request message sent by client A, it forwards the DHCP request message sent by client A to BRAS1;
BRAS1收到所述DHCP请求报文后,为客户端A分配IP地址及配置信息等,并封装到DHCP应答报文中发送给DHCP中继;After receiving the DHCP request message, BRAS1 allocates an IP address and configuration information, etc. for client A, and encapsulates them in a DHCP response message and sends them to the DHCP relay agent;
DHCP中继收到所述DHCP应答报文后,解析所述DHCP应答报文获取分配给客户端A的IP地址IP-A,将接收所述DHCP应答报文的端口号Port1和IP-A记录到优选路径信息表中;例如表1所示:After the DHCP relay agent receives the DHCP response message, it parses the DHCP response message to obtain the IP address IP-A assigned to client A, and records the port number Port1 and IP-A that received the DHCP response message to the preferred path information table; for example, as shown in Table 1:
表1优选路径信息表Table 1 Optimal route information table
DHCP中继向客户端A转发所述DHCP应答报文;The DHCP relay forwards the DHCP response message to the client A;
客户端A收到所述DHCP应答报文,从所述DHCP应答报文中获取IP地址IP-A和配置信息,例如DNS等。Client A receives the DHCP response message, and obtains the IP address IP-A and configuration information, such as DNS, from the DHCP response message.
客户端A访问网络时,发送的数据报文的源IP地址即为IP-A;When client A accesses the network, the source IP address of the data packet sent is IP-A;
DHCP中继收到所述数据报文后,优先根据数据报文的源IP地址,即IP-A查询优选路径信息表;After the DHCP relay receives the data message, it preferentially searches the optimal path information table according to the source IP address of the data message, namely IP-A;
当所述优选路径信息表存在一条已有优选路径信息的IP地址为IP-A时,从所述已有优选路径信息的端口标识对应的端口,即Port1转发所述数据报文。从而保证客户端的数据报文传送路径与客户端接入网络的认证路径一致。When the preferred path information table contains an IP address of IP-A with existing preferred path information, the corresponding port is identified from the port of the existing preferred path information, that is, Port1, and the data message is forwarded. In this way, it is ensured that the transmission path of the data packet of the client is consistent with the authentication path of the client accessing the network.
再举例来说,如图3所示,DHCP中继的端口Port1连接BRAS1,DHCP中继与BRAS1之间存在虚拟链路1和虚拟链路2,其中虚拟链路1对应VLAN1(Virtual Local Area Network,虚拟局域网,简称VLAN),虚拟链路1对应VLAN2。For another example, as shown in Figure 3, port Port1 of the DHCP relay is connected to BRAS1, and there are virtual link 1 and virtual link 2 between the DHCP relay and BRAS1, wherein virtual link 1 corresponds to VLAN1 (Virtual Local Area Network , virtual local area network, referred to as VLAN), virtual link 1 corresponds to VLAN2.
客户端A接入网络时,通过VLAN1向BRAS1发送DHCP请求报文;When client A accesses the network, it sends a DHCP request message to BRAS1 through VLAN1;
BRAS1收到DHCP请求报文后,为客户端A分配IP地址及配置信息等,并封装到DHCP应答报文中发送给DHCP中继;After BRAS1 receives the DHCP request message, it allocates an IP address and configuration information for client A, and encapsulates them in a DHCP response message and sends it to the DHCP relay agent;
DHCP中继收到所述DHCP应答报文后,解析DHCP应答报文获取分配给客户端A的IP地址IP-A,将接收所述DHCP应答报文的端口标识Port1和VLAN1,及IP-A记录到优选路径信息表中;例如表2所示:After the DHCP relay receives the DHCP response message, it parses the DHCP response message to obtain the IP address IP-A assigned to client A, and will receive the port identifier Port1 and VLAN1 of the DHCP response message, and IP-A Record it in the preferred path information table; for example, as shown in Table 2:
表2优选路径信息表Table 2 Optimal route information table
DHCP中继向客户端A转发所述DHCP应答报文;The DHCP relay forwards the DHCP response message to the client A;
客户端A收到所述DHCP应答报文,获得IP地址IP-A,配置信息等。Client A receives the DHCP response message, and obtains the IP address IP-A, configuration information, and so on.
客户端A访问网络时,发送的数据报文的源IP地址即为IP-A;When client A accesses the network, the source IP address of the data packet sent is IP-A;
DHCP中继收到所述数据报文后,优先根据IP-A查询优选路径信息表;After the DHCP relay receives the data message, it preferentially inquires the optimal path information table according to IP-A;
当所述优选路径信息表存在一条已有优选路径信息的IP地址为IP-A时,从端口标识对应的端口Port1和VLAN1转发所述数据报文。从而保证客户端的数据报文传送路径与客户端接入网络的认证路径一致。When there is an IP address of IP-A in the preferred path information table, the data message is forwarded from the port Port1 and VLAN1 corresponding to the port identifier. In this way, it is ensured that the transmission path of the data packet of the client is consistent with the authentication path of the client accessing the network.
如图4所示,是本发明实施例提供的另一种选择传送路径的方法流程图,所述方法包括:As shown in FIG. 4, it is a flow chart of another method for selecting a transmission path provided by an embodiment of the present invention, and the method includes:
所述网络设备可以配置传送路径选择策略,并设置所述传送路径选择策略的状态。The network device may configure a transmission path selection policy and set a state of the transmission path selection policy.
网络设备接收来自DHCP客户端的DHCP请求报文,并向DHCP服务器转发所述DHCP请求报文;所述DHCP服务器为所述DHCP客户端分配IP地址,并回应DHCP应答报文;所述网络设备接收所述DHCP应答报文,所述DHCP应答报文中包括DHCP客户端的IP地址。The network device receives the DHCP request message from the DHCP client, and forwards the DHCP request message to the DHCP server; the DHCP server assigns an IP address for the DHCP client, and responds to the DHCP response message; the network device receives The DHCP response message includes the IP address of the DHCP client.
当将所述传送路径选择策略的状态设置为使能Enable时,所述网络设备获取DHCP客户端接入网络时的优选路径信息,在优选路径信息表中记录所述优选路径信息,然后向DHCP客户端转发所述DHCP应答报文;当将所述传送路径选择策略的状态设置为去使能disable时,所述网络设备向DHCP客户端转发所述DHCP应答报文。When the state of the transmission path selection strategy is set to enable Enable, the network device obtains the preferred path information when the DHCP client accesses the network, records the preferred path information in the preferred path information table, and then sends the DHCP The client forwards the DHCP response message; when the state of the transmission path selection policy is set to disable, the network device forwards the DHCP response message to the DHCP client.
所述网络设备接收数据报文。The network device receives the data packet.
当将所述传送路径选择策略的状态设置为使能Enable时,所述网络设备根据所述数据报文的源IP地址查询所述优选路径信息表,当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息中端口标识对应的端口转发所述数据报文;当所述数据报文的源IP地址与所述优选路径信息表中任意一条已有优选路径信息的IP地址都不相同时,所述网络设备根据路由表转发所述数据报文。当将所述传送路径选择策略的状态设置为去使能disable时,所述网络设备根据路由表转发所述数据报文。When the state of the transmission path selection policy is set to Enable, the network device queries the preferred path information table according to the source IP address of the data message, when the source IP address of the data message is the same as When the IP address of an existing preferred path information in the preferred path information table is the same, the data packet is forwarded from the port corresponding to the port identifier in the existing preferred path information; when the source IP address of the data packet is When the address is different from the IP address of any existing preferred path information in the preferred path information table, the network device forwards the data packet according to the routing table. When the state of the transmission path selection policy is set to disable, the network device forwards the data message according to the routing table.
所述网络设备为DHCP中继。The network device is a DHCP relay.
参见图5,是本发明实施例提供的一种选择传送路径的装置框图,所述装置包括接收器501,获取单元502,记录单元503,查询单元504和发送器505,其中:Referring to FIG. 5 , it is a block diagram of a device for selecting a transmission path provided by an embodiment of the present invention. The device includes a
所述接收器501,用于接收来自服务器的DHCP应答报文,所述DHCP应答报文中包括客户端的IP地址;所述接收器501还用于接收数据报文;The
所述获取单元502,用于根据所述DHCP应答报文获取优选路径信息,所述优选路径信息包括所述客户端的IP地址和接收所述DHCP应答报文的端口的端口标识的对应关系;The obtaining
所述记录单元503,用于在优选路径信息表中记录所述优选路径信息;The recording unit 503 is configured to record the preferred route information in the preferred route information table;
所述查询单元504,用于根据所述数据报文的源IP地址查询所述优选路径信息表;The query unit 504 is configured to query the preferred path information table according to the source IP address of the data packet;
所述发送器505,用于当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息中端口标识对应的端口转发所述数据报文。The
所述装置包括具有DHCP中继功能的路由器。The device includes a router with a DHCP relay function.
可选的,所述获取单元502还用于获取所述客户端接入网络的VLAN标识。Optionally, the acquiring
所述端口标识可以是端口号;还可以是端口号和VLAN标识。The port identifier may be a port number; it may also be a port number and a VLAN identifier.
所述装置还可以包括:The device may also include:
建立单元,用于在优选路径信息表中记录所述优选路径信息之前,建立所述优选路径信息表。The establishing unit is configured to establish the preferred route information table before recording the preferred route information in the preferred route information table.
所述发送器505还用于向客户端转发所述DHCP应答报文。The
当所述数据报文的源IP地址与所述优选路径信息表中任意一条已有优选路径信息的IP地址都不相同时,所述查询单元504还用于根据所述数据报文的目的地址查询路由表,获得下一跳出端口标识,所述发送器505用于从所述下一跳出端口标识对应的端口转发所述数据报文。When the source IP address of the data message is different from the IP address of any existing preferred path information in the preferred path information table, the query unit 504 is further configured to Querying the routing table to obtain a next-hop egress port identifier, and the
可选的,所述装置还包括:Optionally, the device also includes:
策略单元,用于配置传送路径选择策略,并设置所述传送路径选择策略的状态为使能Enable或去使能Disable。The policy unit is configured to configure a transmission path selection policy, and set the state of the transmission path selection policy to Enable or Disable.
当所述传送路径选择策略的状态为使能Enable时,所述获取单元502,记录单元503,查询单元504和发送器505执行上述相应的操作。When the state of the transmission path selection policy is Enable, the acquiring
当所述传送路径选择策略的状态为去使能Disable时,所述查询单元504用于根据所述数据报文的目的地址查询路由表,获得下一跳出端口标识,所述发送器505用于从所述下一跳出端口标识对应的端口转发所述数据报文。When the state of the transmission path selection policy is disabled, the query unit 504 is used to query the routing table according to the destination address of the data message to obtain the next hop exit port identifier, and the
参见图6,是本发明实施例提供的一种选择传送路径的系统框图,所述系统包括网络设备601和服务器602。其中:Referring to FIG. 6 , it is a block diagram of a system for selecting a transmission path provided by an embodiment of the present invention. The system includes a network device 601 and a server 602 . in:
所述网络设备601,用于接收来自所述服务器602的DHCP应答报文,所述DHCP应答报文中包括客户端的IP地址,根据所述DHCP应答报文获取优选路径信息,所述优选路径信息包括所述客户端的IP地址和所述DHCP应答报文的端口标识;在优选路径信息表中记录所述优选路径信息;所述网络设备还用于接收数据报文,根据所述数据报文的源IP地址查询所述优选路径信息表,当所述数据报文的源IP地址与所述优选路径信息表存在的一条已有优选路径信息的IP地址相同时,从所述已有优选路径信息的端口标识对应的端口转发所述数据报文。The network device 601 is configured to receive a DHCP response message from the server 602, the DHCP response message includes the IP address of the client, and obtains preferred path information according to the DHCP response message, and the preferred path information Including the IP address of the client and the port identifier of the DHCP response message; recording the preferred path information in the preferred path information table; the network device is also used to receive data packets, according to the data packet The source IP address queries the preferred path information table, and when the source IP address of the data message is the same as the IP address of an existing preferred path information in the preferred route information table, the preferred path information from the existing preferred path information The port corresponding to the port identifier forwards the data packet.
所述端口标识可以是端口号;还可以是端口号和VLAN标识。The port identifier may be a port number; it may also be a port number and a VLAN identifier.
所述网络设备601还用于当所述数据报文的源IP地址与所述优选路径信息表中的任意一条已有优选路径信息的IP地址都不相同时,根据路由表转发所述数据报文。The network device 601 is further configured to forward the datagram according to the routing table when the source IP address of the datagram is different from the IP address of any existing preferred path information in the preferred path information table arts.
所述网络设备包括具有DHCP中继功能的路由器。The network device includes a router with a DHCP relay function.
所述服务器包括具有DHCP服务器功能的路由器,例如BRAS。The server includes a router with a DHCP server function, such as a BRAS.
所述网络设备601还用于接收来自客户端的DHCP请求报文,并向所述服务器602转发所述DHCP请求报文。The network device 601 is further configured to receive a DHCP request message from a client, and forward the DHCP request message to the server 602 .
所述服务器602用于接收所述DHCP请求报文,为所述客户端分配IP地址,并向所述网络设备601发送所述DHCP应答报文。The server 602 is configured to receive the DHCP request message, assign an IP address to the client, and send the DHCP response message to the network device 601 .
所述网络设备601还用于向所述客户端转发所述DHCP应答报文。The network device 601 is further configured to forward the DHCP response message to the client.
采用本发明实施例提供的技术方案,通过解析DHCP应答报文中客户端IP地址等信息,生成优选路径信息表,指导客户端数据报文的转发,可以解决现有技术中客户端的数据报文传送路径与客户端接入网络的认证路径不一致,客户端无法访问网络的问题。Adopting the technical solution provided by the embodiment of the present invention, by analyzing information such as the client IP address in the DHCP response message, generating an optimal path information table to guide the forwarding of the client data message, the data message of the client in the prior art can be solved. The transmission path is inconsistent with the authentication path for the client to access the network, and the client cannot access the network.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于计算机可读存储介质中,所述存储介质可以是ROM/RAM,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can be a ROM /RAM, disk or CD, etc.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102198225A CN102255814A (en) | 2011-08-02 | 2011-08-02 | Method, device and system for selecting transfer path |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102198225A CN102255814A (en) | 2011-08-02 | 2011-08-02 | Method, device and system for selecting transfer path |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102255814A true CN102255814A (en) | 2011-11-23 |
Family
ID=44982817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011102198225A Pending CN102255814A (en) | 2011-08-02 | 2011-08-02 | Method, device and system for selecting transfer path |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102255814A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309950A (en) * | 2013-05-22 | 2013-09-18 | 苏州雄立科技有限公司 | Searching method for key value |
WO2014117615A1 (en) * | 2013-02-01 | 2014-08-07 | 华为技术有限公司 | Method and apparatus for obtaining ip address by dhcp client |
CN110011919A (en) * | 2019-03-27 | 2019-07-12 | 新华三技术有限公司 | Message forwarding method, device, the network equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1713629A (en) * | 2004-06-25 | 2005-12-28 | 杭州华为三康技术有限公司 | Realization of user login name and IP address binding |
CN1744612A (en) * | 2005-08-19 | 2006-03-08 | 杭州华为三康技术有限公司 | DHCP address allocation method |
CN1750512A (en) * | 2005-09-27 | 2006-03-22 | 杭州华为三康技术有限公司 | Single broadcast reverse path repeating method |
CN101047633A (en) * | 2006-05-17 | 2007-10-03 | 华为技术有限公司 | Method, device and system for implementing multi-route transmission |
WO2008003241A1 (en) * | 2006-06-28 | 2008-01-10 | Huawei Technologies Co., Ltd. | Method for allocating ip address, dynamic host configuration protocol server and relay method for allocating ip address |
CN101699801A (en) * | 2009-10-30 | 2010-04-28 | 孙喜明 | Data transmission method and virtual peer-to-peer network for data transmission |
CN101883160A (en) * | 2010-07-09 | 2010-11-10 | 杭州华三通信技术有限公司 | Multi-interface network equipment and message transmitting method of multi-interface network equipment |
-
2011
- 2011-08-02 CN CN2011102198225A patent/CN102255814A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1713629A (en) * | 2004-06-25 | 2005-12-28 | 杭州华为三康技术有限公司 | Realization of user login name and IP address binding |
CN1744612A (en) * | 2005-08-19 | 2006-03-08 | 杭州华为三康技术有限公司 | DHCP address allocation method |
CN1750512A (en) * | 2005-09-27 | 2006-03-22 | 杭州华为三康技术有限公司 | Single broadcast reverse path repeating method |
CN101047633A (en) * | 2006-05-17 | 2007-10-03 | 华为技术有限公司 | Method, device and system for implementing multi-route transmission |
WO2008003241A1 (en) * | 2006-06-28 | 2008-01-10 | Huawei Technologies Co., Ltd. | Method for allocating ip address, dynamic host configuration protocol server and relay method for allocating ip address |
CN101699801A (en) * | 2009-10-30 | 2010-04-28 | 孙喜明 | Data transmission method and virtual peer-to-peer network for data transmission |
CN101883160A (en) * | 2010-07-09 | 2010-11-10 | 杭州华三通信技术有限公司 | Multi-interface network equipment and message transmitting method of multi-interface network equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014117615A1 (en) * | 2013-02-01 | 2014-08-07 | 华为技术有限公司 | Method and apparatus for obtaining ip address by dhcp client |
US9736110B2 (en) | 2013-02-01 | 2017-08-15 | Huawei Technologies Co., Ltd. | Method and apparatus for acquiring IP address by DHCP client |
CN103309950A (en) * | 2013-05-22 | 2013-09-18 | 苏州雄立科技有限公司 | Searching method for key value |
CN110011919A (en) * | 2019-03-27 | 2019-07-12 | 新华三技术有限公司 | Message forwarding method, device, the network equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2364543B1 (en) | Broadband network access | |
EP1693996B1 (en) | Automatic discovery of psuedo-wire peer addresses in ethernet-based networks | |
US20110026537A1 (en) | Method and Apparatus for Communication of Data Packets between Local Networks | |
JP5816293B2 (en) | Private device identification in the public network | |
US20180183755A1 (en) | System and methods for direct connections between previously unconnected network devices across one or more unknown networks | |
WO2011041967A1 (en) | Method for anonymous communication, method for registration, method and system for trasmitting and receiving information | |
US10298616B2 (en) | Apparatus and method of securing network communications | |
CN101515882B (en) | Method, device and system for communication between local area network and public network | |
KR20090064431A (en) | Method and device for managing route information and resending data at an access device | |
US9769113B1 (en) | Socket-based internet protocol for wireless networks | |
CN101729500A (en) | Method, device and system for identifying IP session | |
CN102420774B (en) | Method for realizing intranet penetration by using Internet group management protocol (IGMP) and intranet penetration system | |
CN103227787B (en) | Automatic 4over6 tunnel establishment method based on ARP proxy | |
US20140032782A1 (en) | Method and apparatus for route selection of host in multihoming site | |
CN101494669B (en) | Method and apparatus for distributing IP address for user terminal | |
CN101984636A (en) | Prefix distribution method, device and system | |
CN102082837A (en) | Method and device for distributing public network address for IP (Internet protocol) terminal | |
US8559431B2 (en) | Multiple label based processing of frames | |
US8612626B2 (en) | Group member detection among nodes of a network | |
CN107135118B (en) | A unicast communication method, gateway and VXLAN access device | |
CN104468467A (en) | Dynamic host configuration protocol (DHCP) message transmitting method and device | |
CN102255814A (en) | Method, device and system for selecting transfer path | |
Templin | Asymmetric Extended Route Optimization (AERO) | |
US10715431B2 (en) | Methods and apparatuses for routing data packets in a network topology | |
CN102694684A (en) | Multi-gateway-based control entry configuration method, equipment and network system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20111123 |