Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Layer 3 switch of Cisco Packet Tracer interrupts DHCP

Shulou Source: shulou.com Published: 2022-06-01 06:59:14 10月03日 Update

Experimental environment:

Experimental purpose:

1. Divide the VLAN into vlan10\ vlan100\ vlan200 and specify IP as 192.168.10.254\ 192.168.100.254\ 192.168.200.254 respectively.

2. Divide fa0/1\ fa02\ fa04 into VLAN100\ VLAN 200\ VLAN10.

3. Enable the routing protocol in the layer 3 switch so that the VLAN can communicate with each other. (if only to obtain the IP address, not to use a routing protocol)

4. Enable ip helper-address for each VLAN on the layer 3 switch.

5. Add an IP address pool on the server.

6. Check whether PC can obtain the IP address normally.

1. Divide the VLAN into vlan10\ vlan100\ vlan200 and specify IP as 192.168.10.254\ 192.168.100.254\ 192.168.200.254 respectively.

Switch#conf t

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

Switch (config) # vlan 10

Switch (config-vlan) # exit

Switch (config) # vlan 100

Switch (config-vlan) # exit

Switch (config) # vlan 200

Switch (config-vlan) # exit

Switch (config) # int vlan 10

Switch (config-if) #

% LINK-5-CHANGED: Interface Vlan10, changed state to up

Switch (config-if) # ip add 192.168.10.254 255.255.255.0

Switch (config-if) # no shutdown

Switch (config-if) # exit

Switch (config) # int vlan 100

Switch (config-if) #

% LINK-5-CHANGED: Interface Vlan100, changed state to up

Switch (config-if) # ip add 192.168.100.254 255.255.255.0

Switch (config-if) # no shutdown

Switch (config-if) # exit

Switch (config) # int vlan 200

Switch (config-if) #

% LINK-5-CHANGED: Interface Vlan200, changed state to up

Switch (config-if) # ip add 192.168.200.254 255.255.255.0

Switch (config-if) # no shutdown

2. Divide fa0/1\ fa02\ fa04 into VLAN100\ VLAN 200\ VLAN10.

Switch (config) # int fa0/1

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 100

Switch (config-if) #

% LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to up

Switch (config-if) # exit

Switch (config) # int fa0/2

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 200

Switch (config-if) #

% LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state to up

Switch (config-if) # exit

Switch (config) # int fa0/4

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 10

3. Enable the routing protocol in the layer 3 switch so that the VLAN can communicate with each other.

Switch (config) # ip routing

4. Enable ip helper-address for each VLAN on the layer 3 switch.

Switch (config) # int vlan 10

Switch (config-if) # ip helper-address 192.168.10.1 (DHCP server IP)

Switch (config-if) # exit

Switch (config) # int vlan 100

Switch (config-if) # ip helper-address 192.168.10.1

Switch (config-if) # exit

Switch (config) # int vlan 200

Switch (config-if) # ip helper-address 192.168.10.1

Switch (config-if) # exit

5. Add an IP address pool on the server.

6. Check whether PC can obtain the IP address normally, as follows:

Tags: Address server routing service switch between lab environment purpose Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft macOS MySQL MariaDB Shulou Tech Info