Layer 3 switch DHCP relay service

Task

Configure a DHCP server to automatically assign IP addresses to clients in the LAN, so as to avoid IP address conflicts. The company has two departments, namely A and B, and the two departments are respectively in vlan10 and vlan20. The IP address, gateway, and DNS (202.103.224.68) can be automatically assigned from the DHCP server through a layer-3 switch, and they can also access each other. and has access to the Internet.

Task implementation

1. Configure DHCP service

 Click the DHCP server in Packer Tracer, select the "DHCP" option under the "Configuration" tab in the pop-up window, and the window shown in the figure below will appear, then create two address pools, set the gateway, DNS server, and start IP address, subnet mask, etc., and enable the DHCP server.

 2. Configure switch VLAN parameters

Step 1: Enable the Layer 3 switch router function.

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#host s3560

s3560(config)#ip routing

Step 2: Establish vlan and assign ports.

s3560(config)#vlan 10

s3560(config-vlan)#name tech

s3560(config-vlan)#exit

s3560(config)#vlan 20

s3560(config-vlan)#name business

s3560(config-vlan)#exit

s3560(config)#int f0/10

s3560(config-if)#switch mode access

s3560(config-if)#switch access vlan 10

s3560(config-if)#exit

s3560(config)#int f0/20

s3560(config-if)#switch mode access

s3560(config-if)#switch access vlan 20

s3560(config-if)#exit

The third step is to configure the routing function of the Layer 3 switch port.

s3560(config)#int vlan10

s3560(config-if)#ip add 192.168.10.1 255.255.255.0

s3560(config-if)#no shutdown

s3560(config-if)#exit

s3560(config)#int vlan20

s3560(config-if)#ip add 192.168.20.1 255.255.255.0

s3560(config-if)#no shutdown

s3560(config-if)#exit

s3560(config)#int vlan1

s3560(config-if)#ip add 192.168.1.1 255.255.255.0

s3560(config-if)#no shutdown

s3560(config-if)#exit

3. Configure the switch DHCP relay service

Step 1: Configure the routing function of the Layer 3 switch port.

s3560(config)#int vlan10

s3560(config-if)#ip helper-address 192.168.1.100

s3560(config-if)#exit

s3560(config)#int vlan20

s3560(config-if)#p helper-address 192.168.1.100

s3560(config-if)#end

Step 2: Test the PC’s automatic address acquisition function

Guess you like

Origin blog.csdn.net/qq_70242064/article/details/130178416