Configuration of layer-3 Switch DHCP relay improves address management efficiency

Source: Internet
Author: User

Bkjia.com exclusive Article: in a large-scale LAN working environment, if static IP Address Allocation is adopted for the terminal system, it will obviously increase the workload of network administrators, the DHCP Service can automatically allocate IP addresses stored in the address pool of the DHCP server to the terminal system, which not only improves the address management efficiency, in addition, it can avoid address conflicts caused by assigning an address to multiple users at the same time. However, Windows Server-based DHCP servers are usually used in small-sized networks, and DHCP servers and clients are located in the same network segment, internet users can only perform network applications within a limited range. To assign addresses to terminal systems of different network segments, many network administrators enable the DHCP relay function on layer-3 switches. Any Terminal System in the LAN can use this function, communicate with DHCP servers in other network segments to obtain valid Internet access parameters, such as IP addresses, DNS addresses, and gateway addresses. In this way, terminal systems of different network segments can share the same DHCP server, which can achieve centralized management, improve address management efficiency, and save construction costs.

Understanding DHCP relay

When the DHCP client system starts to run, it automatically performs DHCP initialization and broadcasts packets to request packets. If a DHCP server is set up in the guest network segment, then it can directly obtain the Internet address and other parameters from the DHCP server, without the DHCP relay function, it can smoothly access the LAN. If no DHCP server exists in the primary network segment, the layer-3 Switch with DHCP relay enabled in the same network segment will receive the broadcast packets sent from the client system, the system automatically performs proper processing and forwards related tasks to a specific DHCP server located in another network segment. The target DHCP server is correctly configured according to the client system's online application, then, the specific configuration information is fed back to the DHCP Client System through the DHCP relay function, so that the DHCP server can implement centralized address management for client systems of different network segments, this improves address management efficiency.

Network Configuration Environment

The LAN of a certain organization is not very large. According to different Internet access requirements, the network administrator divides the LAN into three VLANs. the DHCP server with the IP address 192.168.1.18 is located in vlan3, the server is directly connected to the G2 fiber port of the layer-3 Switch switway of Quidway 3600, the Virtual Interface address of the corresponding VLAN is 192.168.1.1/24; All terminal systems in VLAN1 are connected to the e1-e12 port of switway in turn, the Virtual Interface address of the corresponding VLAN is 10.176.1.1/24; All terminal systems in VLAN2 are connected to the e13-e24 port of Switch1 in turn, and the virtual interface address of the corresponding VLAN is 10.176.2.1/24; to enable all terminal systems in VLAN1 and VLAN2 to automatically obtain the appropriate Internet parameters from the DHCP server of VLAN3, We need to enable the DHCP relay configuration function on the Switch1 switch of Quidway 3600, the entire network topology is shown in Figure 1.

 

Configure VLAN3 Parameters

By default, the layer-3 switch does not specify the IP address of the DHCP server. Therefore, we need to point all the terminal systems in the LAN to the IP address 192.168.1.18, we only need to first access the background System of the layer-3 switch with the system administrator permission, and then run the "sys" command to switch to the global configuration status of the system; in this status, run the "dhcp-server 0 ip 192.168.1.18" command to set the ip address of the DHCP server to 192.168.1.18 and the group number to 0;

Because the DHCP server is directly connected to a layer-3 Switch through the G2 Optical Fiber port, we need to configure the parameters of the connection port, first, return to the global configuration status of the vswitch, execute the string command "vlan 3", create VLAN3, then run the "port gigabitethernet 1/2" command to divide the G2 fiber port into VLAN3;

The following describes how to configure the Virtual Interface address of VLAN3 to allocate the address 192.168.1.1/24 to the Virtual Interface, we only need to execute the string command "interface vlan-interface 3" in global system mode to enter the Virtual interface view mode of vlan3, in this mode, run the string command "ip address 192.168.1.1 255.255.255.0". As a result, the Virtual Interface address of VLAN3 is successfully configured as 192.168.1.1;

Configure other parameters

In order to divide the e1-e12 ports on the Quidway 3600 layer-3 switch into VLAN1, we need to first create VLAN1, and then use the port command in VLAN1 view mode to divide the relevant ports; then, set the VLAN1 virtual interface parameters to ensure that all the terminal systems in the network segment can automatically obtain the Internet parameters from dhcp-server 0. The specific configuration steps are as follows:

[Swit1] vlan 1
[Switch1-vlan1] port ethernet 0/1 to ethernet 0/12
[Switch1-vlan1] quit
[Switch1] interface vlan-interface 1
[Switch1-vlan-interface1] ip address 10.176.1.1 255.255.255.0
[Switch1-vlan-interface1] dhcp-server 0

After completing the preceding configuration, all the terminal systems in VLAN1 will automatically use the dhcp-server 0 configuration parameters for Internet access in the future.

Follow the same procedure, we need to divide the e13-e24 port into VLAN2, and to specify the users under VLAN2 must also use dhcp-server 0 automatically assigned address for Internet access:

[Switch1] vlan 2
[Switch1-vlan2] port ethernet 0/13 to ethernet 0/24
[Switch1-vlan2] quit
[Switch1] interface vlan-interface 2
[Switch1-vlan-interface2] ip address 10.176.2.1 255.255.255.0
[Switch1-vlan-interface2] dhcp-server 0

In addition to configuring layer-3 switches, we also need to make appropriate configurations in the host system where the DHCP server is located. Because the host systems used as the DHCP server are different, the specific configuration operations vary, so we will not detail them here.

Online Test troubleshooting

After a series of configuration operations, all terminal systems in the LAN should be able to share the specific DHCP server in VLAN3 for Internet access. Of course, if we find that the terminal system cannot obtain valid parameters from the DHCP server during the Internet access test, we can return to the layer-3 Switch backend system, run the "display dhcp-server 0" string command to check whether the IP address of the DHCP server specified by the layer-3 switch is the same as that of the existing DHCP server, use the "display vlan" command and the "display ip interface" command to check the VLAN configuration of the layer-3 switch and the corresponding interface configuration in sequence, check whether their configuration parameters are the same as the actual required parameters. If they are different, modify them in time. Third, use the ping command in the host system where the DHCP server is located, test the interface address of each VLAN to see if it can find the route of VLAN1 and VLAN2. If the ping command fails to be tested, check whether the gateway parameter of the DHCP server is configured as the interface address of VLAN1 or VLAN2. Fourth, Run "disp" again. Lay dhcp-server 0 "string command to check whether the layer-3 Switch receives data packets. if it finds that it cannot respond to the data packets, this means that the system of the host where the DHCP server is located does not successfully send data packets to the layer-3 Switch. In this case, we need to check whether the system configuration of the host where the DHCP server is located is correct, if the number of response data packets and request data packets is normal, run the "debugging dhcp-relay" string command in the backend System of the layer-3 Switch to enable the DHCP relay debugging switch function, tracking and locating the user's IP address application process. We believe that after such troubleshooting, the DHCP relay function on the layer-3 switch can play a correct role.

Bkjia.com is an exclusive special article, which is not denied to be reprinted without authorization. The source and author of the original article must be indicated in the reprint of the cooperative media !]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.