Layer 3 switch DHCP service

 

1. Configure the IP address of each PC

Click "PC0" in Packet Tracer, select the "IP Address Configuration" option under the "Desktop" tab in the pop-up window, the window shown below will appear, then set PC0 to "Automatically obtain", and finally follow the same steps method to set up PC1.

2. Configure switch VLAN parameters

Step 1: Enable the routing function of the Layer 3 switch.

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)#switchport mode access

S3560(config-if)#switchport access vlan 10

S3560(config-if)#exit

S3560(config)#int f0/20

S3560(config-if)#switchport mode access

S3560(config-if)#switchport access vlan 20

S3560(config-if)#exit

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

S3560(config)#int vlan 10

S3560(config-if)#ip address 192.168.10.1 255.255.255.0

S3560(config-if)#no shutdown

S3560(config-if)#exit

S3560(config)#int vlan 20

S3560(config-if)#ip address 192.168.20.1 255.255.255.0

S3560(config-if)#no shutdown

S3560(config-if)#exit

Step 4: View the routing table.

 3. Configure the switch DHCP service

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

S3560(config)#ip dhcp pool tech

S3560(dhcp-config)#network 192.168.10.0 255.255.255.0

S3560(dhcp-config)#default-router 192.168.10.1

S3560(dhcp-config)#dns-server 202.103.224.68

S3560(dhcp-config)#exit

S3560(config)#ip dhcp pool business

S3560(dhcp-config)#network 192.168.20.0 255.255.255.0

S3560(dhcp-config)#default-router 192.168.20.1

S3560(dhcp-config)#dns-server 202.103.224.68

S3560(dhcp-config)#end

Step 2: View DHCP information.

Step 3: Test the DHCP function of the layer 3 switch.

 

 

Guess you like

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