DHCP proxy in a subscriber environment
09847967 · 2017-12-19
Assignee
Inventors
- Peter Arberg (Hojbjerg, DK)
- Arunkumar M. Desigan (Santa Clara, CA, US)
- Kishore Krishna Seshadri (Saratoga, CA, US)
- Robert G. Kilfoyle (Campbell, CA, US)
- Ganesan Vivekanandan (San Jose, CA, US)
Cpc classification
H04L61/5014
ELECTRICITY
International classification
Abstract
Methods and apparatuses for a network element having DHCP proxy functionality are described. According to one embodiment, an exemplary method includes receiving, at a network element, a request for an IP address from a subscriber, in response to the request, on behalf of the subscriber, communicating with one or more IP address providers over a network to process the request, and responding to the subscriber with respect to the request as if the network element is an IP address provider, on behalf of the one or more IP address providers.
Claims
1. A method implemented by a network element serving as a proxy for an Internet Protocol (IP) address provider, comprising: receiving, at a first interface of the network element, a request for an IP address from a client; modifying the request including substituting a source IP address of the request with a first IP address of the network element; transmitting, from a second interface of the network element, the modified request to an IP address provider; receiving, from the IP address provider, a reply packet having an offered assigned IP address in response to the modified request; modifying the reply packet including substituting a source IP address in a first field of the reply packet with a second IP address of the network element and specifying in a second field of the reply packet an identity of the first interface of the network element that indicates to the client that the first interface of the network element is the IP address provider with respect to the client; and transmitting the modified reply packet to the client.
2. The method of claim 1, wherein the request is a DHCP compatible request and the IP address provider is a DHCP server.
3. The method of claim 1, further comprising: storing, in a database within the network element, lease time of the IP address for the client.
4. The method of claim 1, further comprising: receiving a release request for releasing the IP address from the client; modifying the release request including substituting a source IP address of the release request with the first IP address of the network element; and transmitting the modified release request to the IP address provider to release the IP address.
5. The method of claim 4, further comprising updating a database within the network element to indicate that the IP address has been released by the client, wherein the network element determines whether the client is active after the IP address is released without monitoring traffic associated with the IP address.
6. The method of claim 1, wherein the first IP address of the network element is assigned to the second interface of the network element.
7. The method of claim 6, wherein the request is a DHCP compatible request and wherein modifying the request further comprises: specifying in a GI address field an address of the first interface of the network element; and specifying in an option 54 field an identity of the IP address provider.
8. The method of claim 6, wherein the reply packet is a DHCP compatible reply, wherein the second field of the reply packet is an option 54 field, and wherein modifying the reply packet further comprises: specifying in a GI address field an address of the first interface of the network element.
9. The method of claim 1, wherein modifying the reply packet further comprises: specifying in a destination identity field of the reply packet the identity of the client.
10. The method of claim 1, wherein the first IP address and the second IP address of the network element are different.
11. A non-transitory machine-readable medium having executable code to cause a network element serving as a proxy for an Internet Protocol (IP) address provider to perform operations comprising: receiving, at a first interface of the network element, a request for an IP address from a client; modifying the request including substituting a source IP address of the request with a first IP address of the network element; transmitting, from a second interface of the network element, the modified request to an IP address provider; receiving, from the IP address provider, a reply packet having an offered assigned IP address in response to the modified request; modifying the reply packet including substituting a source IP address in a first field of the reply packet with a second IP address of the network element and specifying in a second field of the reply packet an identity of the first interface of the network element that indicates to the client that the first interface of the network element is the IP address provider with respect to the client; and transmitting the modified reply packet to the client.
12. The non-transitory machine-readable medium of claim 11, wherein the request is a DHCP compatible request and the IP address provider is a DHCP server.
13. The non-transitory machine-readable medium of claim 11, wherein the operations further comprise: storing, in a database within the network element, lease time of the IP address for the client.
14. The non-transitory machine-readable medium of claim 11, wherein the operations further comprise: receiving a release request for releasing the IP address from the client; modifying the release request including substituting a source IP address of the release request with the first IP address of the network element; and transmitting the modified release request to the IP address provider to release the IP address.
15. The non-transitory machine-readable medium of claim 11, wherein the operations further comprise: updating a database within the network element to indicate that the IP address has been released by the client, wherein the network element determines whether the client is active after the IP address is released without monitoring traffic associated with the IP address.
16. The non-transitory machine-readable medium of claim 11, wherein the first IP address of the network element is assigned to the second interface of the network element.
17. The non-transitory machine-readable medium of claim 16, wherein the request is a DHCP compatible request and wherein modifying the request further comprises: specifying in a GI address field an address of the first interface of the network element; and specifying in an option 54 field an identity of the IP address provider.
18. The non-transitory machine-readable medium of claim 16, wherein the reply packet is a DHCP compatible reply, wherein the second field of the reply packet is an option 54 field, and wherein modifying the reply packet further comprises: specifying in a GI address field an address of the first interface of the network element.
19. The non-transitory machine-readable medium of claim 11, wherein modifying the reply packet further comprises: specifying in a destination identity field of the reply packet the identity of the client.
20. The non-transitory machine-readable medium of claim 11, wherein the first IP address and the second IP address of the network element are different.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
DETAILED DESCRIPTION
(14) In the following description, numerous details are set forth to provide a more thorough explanation of the present invention. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.
(15) Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent finite sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
(16) It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
(17) The invention also relates to one or more different apparatuses for performing the operations herein. This apparatus may be specially constructed for the required purposes (e.g., software, hardware, and/or firmware, etc.), or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. The instructions of such software, firmware, and computer programs may be stored in a machine readable medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable ROMs (EPROMs), electrically erasable programmable ROMs (EEPROMs), magnetic or optical cards, electrical, optical, acoustical or other forms of prorogated signals (e.g., carrier waves, infrared signals, etc.) or any type of media suitable for storing electronic instructions.
(18) The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein.
(19) Methods and apparatuses for a network element having DHCP proxy functionality are described. In certain embodiments of the invention, a network element that connects clients to a DHCP server acts as a proxy for that DHCP server. In addition, certain of these embodiments allow the network element to: 1) acts as a DHCP proxy for multiple DHCP servers configured to provide redundancy; and/or 2) to facilitate the handling of lease renewals.
(20)
(21) However, clients 204 communicate with proxy interface 206 of network element 201, which in turn communicates with DHCP servers 202. In this case, proxy interface 206 serves as a proxy of DHCP 202. That is, proxy interface 206 acts as a DHCP server on behalf of DHCP servers 202. When clients 204 communicate with a DHCP server, clients 204 will specify DHCP proxy interface's IP address (e.g., 3.3.3.254) as its destination IP address instead of DHCP 202's IP address (e.g., 1.1.1.1-1.1.1.5), because clients 204 consider that proxy interface 206 is the DHCP server they are communicating with.
(22) Since network element 201 serves as a proxy on behalf of one or more DHCP servers 202 having IP addresses from, for example, 1.1.1.1 to 1.1.1.5, network element 201 can maintain multiple DHCP servers and some of which may be used as redundant DHCP servers for backup purposes, which will be described in details further below. In addition, since network element 201 knows which subscriber is assigned with an IP address from which DHCP server, network element 201 may maintain lease time for each subscriber, which will be described in details further below. As a result, when a client releases its IP address back to network element 201 (since the client thinks network element 201 is the DHCP server), network element 201 knows that IP address has been released and network element 201 does not have to keep listening to the traffic of the released IP address. In addition, where DHCP servers 202 service multiple network elements, a reloaded IP address may be reassigned to another subscriber of another network element. Note that DHCP relay interface 205 of network element 201 is not required for network element 201 to operate, particularly to include a DHCP proxy interface.
(23)
(24) Note that both the DHCP relay and proxy functionality may work with either a “bind interface” or a “bind subscriber” statement. The “bind interface” can be considered as a non-subscriber mode where AAA (authorization, authentication, and accounting) is not involved, and a “bind subscriber” can be considered as a subscriber mode where AAA is involved for accounting purpose.
(25)
(26) Referring to
(27) When DHCP 402 receives forwarded broadcast message 405, DHCP 402 returns an offer message 406 back to IF1 via IF3 of network element 401. In one embodiment, DHCP 402 specifies, in return packet 406, its IP address as the source IP address, IF1's IP address as a destination IP address. In addition, DHCP 402 specifies IF1's IP address as a GI address in the packet and its IP address in the option 54 field. When network element 401 receives packet 406, it modifies the packet (e.g., packet 407). In one embodiment, the modification includes replacing the source IP address with IF1's IP address which indicates that IF1 of network element 401 is the DHCP with respect to client 403. In addition, network element 401 may change the GI address to the IF1's IP address and changes the option 54 field as the IF1's IP address. Furthermore, if network element 401 modified the option 82 field when it received the DHCP broadcast message, network element 401 may strip off the option 82 field when it forwards the offer packet 407 back to client 403.
(28) Thereafter, during the subsequent communications, such as, DHCP request or DHCP release, client 403 may use the IP address of interface IF1 of network element 401 as a destination IP address and IF1's IP address as the DHCP server address in the option 54 field, because client 403 was “told” that interface IF1 of network element 401 is the DHCP server when it received the DHCP offer.
(29) Thus, since network element 401 serves as a DHCP proxy on behalf of DHCP 402, according to one embodiment, multiple DHCP servers may be maintained without the knowledge of client 403. At least one of the multiple DHCP servers may serve as a redundant DHCP server. In addition, according to another embodiment, network element 401 may maintain lease time information for client 403 since network element operates as a DHCP server with respect to client 403. As a result, the subsequent DHCP renewal or release may be partially or fully handled by network element 401 without invoking DHCP 402 which greatly reduces traffic to DHCP 402.
(30)
(31) Referring to
(32) In response to the request, at block 452, the network element may modify the request to indicate as if the request is originated from the network element. For example, the network element may replace the source IP address with the IP address of the network element. The network element may further modify the destination IP address of the packet using a destination IP address of an IP address provider (e.g., DHCP server). Other fields of the packet may also be modified. The modified packet may be similar to packet 405 of
(33) At block 453, the modified packet is transmitted from the network element to the selected IP address provider on behalf of the subscriber. That is, the modified packet is transmitted from the network element to the selected IP address provider as if the network element is the source and the client of the IP address provider.
(34) In response to the modified request received by the selected IP address provider, at block 454, a reply packet is received by the network element from the IP address provider. The reply packet indicates that the network element is the destination of the reply packet, because the original modified packet indicates that the network element is the source of the request.
(35) At block 455, the network element may modify the reply packet to indicate that the network element is the source of the reply packet (e.g., the IP address provider that assigns the IP address). In one embodiment, the network element replaces the destination using the identity of the subscriber, which was obtained via the original IP address request. The network element may further specify in the source of the reply packet using an identity of the network element (e.g., IP address of the network element).
(36) At block 456, the modified reply packet is transmitted from the network element to the subscriber as if the network element is the IP address provider that assigns the IP address. Thereafter, at block 457, the network element processes the subsequent IP address related services with the subscriber on behalf of the IP address provider. Other operations may also be performed.
(37) According to one embodiment, a network element having functionality described above may be configured via at least one of the following commands:
(38) TABLE-US-00001 Command [no] dhcp relay server ip-addr Command Mode Context configuration Default Behavior no dhcp relay is configured
This command enables the DHCP relay and proxy functionality in a context. According to one embodiment, all DHCP requests received on interfaces in this context will be forwarded to the external DHCP sever with specified IP address.
(39) TABLE-US-00002 Command [no] dhcp relay option Command Mode Context configuration Default Behavior no dhcp relay option
This command will enable the sending of DHCP options in all DHCP packets being relayed from this context of the network element.
(40) TABLE-US-00003 Command [no] dhcp {relay | proxy} [size <max-num>] Command Mode Interface configuration Default Behavior no, relay/proxy is disabled on the interface
These commands will enable or disable either DHCP relay or proxy on a specific interface. It also sets the maximum number of DHCP IP address available on this interface via the size <max-num> option. The max-num can be configured between 1 and 65,535.
(41) TABLE-US-00004 Command Ip source-address {dhcp} Command Mode Interface configuration Default Behavior no DHCP source-address is configured
This command works with DHCP packets sourced from a network element. It is important that the IP address is controlled with which the network element is acting as a DHCP server in the proxy configuration. If “ip source-address” is not configured the interface ip-address from where the packet is transmitted is used as source address, but in applications where only one DHCP address is used in a network element, and intercontext routing is enabled, it becomes important that each context is uniquely identified by a single source-address.
(42) TABLE-US-00005 Command [no] dhcp max-addrs max-num Command Mode Subscriber configuration Default Behavior no (max-num = 0), which will say subscriber cannot use DHCP to obtain an IP address
This command configures a maximum number of IP addresses this subscriber can request via the DHCP protocol. A DHCP max-addrs>0 may be configured in the subscriber profile to allow this subscriber to use the DHCP protocol to get a dynamic IP address. The maximum address size may be configured between 1 and 255, according to one embodiment.
(43) TABLE-US-00006 Command [no] debug dhcp-relay packet [no] debug dhcp {all | mac = hh:hh:hh:hh:hh:hh | packet |relay Command Mode Exec(10)
These commands may be used for debugging purposes.
(44) TABLE-US-00007 Command show dhcp relay server Command Mode Exec(10)
This command displays information regarding the configured DHCP server.
(45) TABLE-US-00008 Command show dhcp relay hosts Command Mode Exec(10)
This command displays all the IP-hosts learnt by the relay/proxy functionality and the known information such as lease time.
(46) TABLE-US-00009 Command show dhcp relay shmem Command Mode Exec(10)
This command displays all the IP-hosts learnt by the relay/proxy functionality and written to the file/microdrive.
(47) According to one embodiment, the DHCP server states are preserved within a network element, which may be used by the relay and/or proxy functionality of the network element.
(48) In one embodiment, DHCP state preservation information may be used in at least one of the following situations:
(49) TABLE-US-00010 Process Restart DHCP preserve state file on micro-drive is read, but ISM information has higher priority Power Cycle DHCP preserve state file is read and has priority over ISM information XCRP Switchover DHCP preserve state is created from the “hot” running ISM module on the secondary XCRP, and from this information is the preserve state file written to the new micro-drive
(50) According to one embodiment, DHCP demon 602 removes a dynamic DHCP IP address from a circuit in at least one following situations and sends an RADIUS accounting stop record:
(51) TABLE-US-00011 Network Element Event DHCP Relay DHCP Proxy Circuit delete Yes Yes IP address given to another circuit Yes Yes DHCP lease time expired No Yes
(52)
(53)
(54) As described above, when a network element's DHCP proxy functionality is activated, all clients connected to the network element would consider the network element as a DHCP server. As a result, multiple DHCP servers may be implemented behind the network element without the knowledge of the clients.
(55) In one embodiment, network element maintains information regarding which interface or client is serviced by which DHCP server. In addition, multiple DHCP servers may share the same IP address pool, such that when the primary DHCP is down, the secondary DHCP may take over using the same IP address pool without causing conflicts. For example, DHCP 903 and DHCP 904 may be configured as a redundant DHCP server pair and they may share the same IP address pool. When DHCP 903 is down, DHCP 904 may take over immediately since DHCP 904 knows the IP address allocation performed by DHCP 903.
(56) Furthermore, according to one embodiment, network element 901 may monitor the activities of all DHCP servers on a per client basis for renewal or release. In a particular embodiment, network element 901 may maintain DHCP servers on a per interface basis, such as, per GI address basis.
(57) According to one embodiment, a network element having DHCP redundant functionality described above may be configured via at least one of the following commands:
(58) TABLE-US-00012 Command [no] dhcp relay server ip-addr [giaddr ip-addr] Command Mode Context configuration Default Behavior no dhcp relay server is configured, but if a DHCP server is configured, then by default the primary IP-address of the interface is used as the giaddr
This command enables DHCP relay and proxy functionality in this context. All DHCP requests received on interfaces in this context will be forwarded to an external DHCP server with IP-address x.x.x.x. This command may be used multiple times to configure up to a predetermined number (e.g., five) of DHCP servers per context. The giaddr option is used to specify what IP-address to use in the DHCP packets' giaddr field.
(59) TABLE-US-00013 Command [no] dhcp timeout timeout Command Mode Context configuration Default Behavior Timeout interval is 10 seconds
This command sets the maximum time the network element is to wait for a response from a DHCP server before assuming that a packet is lost, or that the DHCP server is unreachable.
(60) TABLE-US-00014 Command [no] dhcp algorithm {first | round-robin} Command Mode Context configuration Default Behavior The network element queries the first configured server first
This command configures the algorithm to be used among multiple DHCP servers.
(61) TABLE-US-00015 Command [no] dhcp deadtime interval Command Mode Context configuration Default Behavior The network element considers a non-response DHCP server for dead in 5 minutes
This command configures the time the network element will consider a non-responsive DHCP server as dead, and will not revert to and try the DHCP server again until the timeout has expired (unless all other DHCP servers are also non-responsive).
(62) Since the DHCP server implementation often is centralized in a network element as well as Wi-Fi networks, it can be a considerable traffic overhead as well as place a big burden on the DHCP servers if DHCP lease timers are configured in the minutes for a large amount of subscribers. For example, referring to
(63) However, if network element 201 maintains the lease time of IP addresses for its clients, the renewal and release of the IP addresses may be handled by network element 201 without invoking DHCP 202. For example, according to one embodiment, when client 204 initially requests for an IP address, thinking that network element 201 is the DHCP server, network element 201 requests an IP address from DHCP 202 on behalf of client 204 with relatively large block of lease time, which may be larger than the one requested by client 204. When network element 201 forwards the allocated IP address to client 204, network element 201 allocates the requested lease time from the relatively large block of lease time allocated from DHCP 202 and assigned to client 204.
(64) Subsequently, according to one embodiment, when client 204 requests a renewal of the IP address, network element 201 checks the remaining relatively large block of lease time corresponding to the IP address of client 204 to determine whether the remaining lease time of the block is grater than or equal to the requested lease time for renewal, if so, network element 201 allocates again from the larger block of lease time maintained by the network element to the client without involving DHCP 202. These renewal processes do not involve DHCP 202 until some threshold amount of lease time remains in the block of lease time (e.g.,) there is not enough lease time remaining in the block of lease time, in which case, network element 201 may request for another relatively large block of time from DHCP 202. As a result, the overhead traffic incurred on DHCP 202 has been greatly reduced.
(65) In addition, when client 204 releases the IP address, network element 201 knows when the IP address has been released and it may in turn release the IP address back to DHCP 202 and stop listening to the traffic associated with the released IP address.
(66)
(67) According to one embodiment, network element 1001 changes the DHCP options, such as the lease time to reflect the subscriber 1002 specification configuration (e.g., lowest value of the subscriber idle timer and the DHCP server applied lease time. Network element 1001 may also store the DHCP server 1004's lease time in the subscriber record maintained by the network element for future use. Thereafter the DHCP offer packet is forwarded to subscriber 1002. Subsequently, when subscriber 1002 sends a DHCP request to network element 1001, thinking that the network element is the DHCP server, network element 1001 forwards the DHCP request packet to DHCP 1004 and receives a DHCP reply packet from the DHCP 1004. Network element 1001 modifies the DHCP options again to reflect the same values as in the offer packet, before sending it to subscriber 1002.
(68) According to one embodiment, network element 1001 maintains two “lease times” for subscriber 1002. One is the lease time received from DHCP 1004, which is needed for the network element to know when a DHCP renewal requires to be forwarded to DHCP 1004. The other one is the actual lease time of subscriber 1002, which indicates when it is safe for the network element to give a local response to the subscriber renewal request without invoking the DHCP server. Other operations may be included.
(69)
(70) In one embodiment, if the subscriber session time is less than DHCP T1 timer (e.g., there is more time left in the lease time allocated from DHCP 1104, where T1=x*duration of lease time), the network element may immediately send a DHCP reply packet to acknowledge the lease renewal for the subscriber without invoking DHCP 1104.
(71) If the subscriber session time is greater or equal to the DHCP T1 timer (e.g., no enough lease time left in the lease time previously allocated from DHCP 1104), network element 1101 may forward the DHCP lease renewal packet to DHCP 1104 for more lease time. In response, network element 1101 receives a DHCP reply from DHCP 1104 including, but not limited to, DHCP options such as the lease time, which may include a longer lease time longer than the one requested by client 1102. When network element 1101 forwards the packet client 1102, the DHCP lease time is changed to reflect the subscriber specific configuration (e.g., the lowest value of the subscriber idle timer and the DHCP server applied lease time). Meanwhile, network element 1101 may also update the subscriber record regarding the lease time from DHCP 1104 for future use. Thereafter, network element 1101 forwards the DHCP acknowledge packet back to subscriber 1102. Other operations may be included.
(72) In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will be evident that various modifications may be made thereto without departing from the broader spirit and scope of the invention as set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense.