Get the App
SLTechnology News&Howtos  ›  Servers  › 

Configure DHCP between different vlan to realize communication

Shulou Source: shulou.com Published: 2022-06-02 12:42:25 09月28日 Update

1, experiment name: configure DHCP between different vlan to realize communication

Experimental purpose: to realize communication with pc0/pc1/pc2/pc3

Lab Topology:

2. Experimental steps:

(1) PC0,PC1,PC2,PC3 IP address is set to DHCP

(2) configure the switch:

Configure switch 1: create VLAN10, and all three interfaces join the VLAN10

Switch (config) # vlan 10

Switch (config-vlan) # exit

Switch (config) # interface fas0/1

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 10

Switch (config-if) # no shutdown

Switch (config-if) # interface fas0/2

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 10

Switch (config-if) # no shutdown

Switch (config-if) # interface fas0/3

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 10

Switch (config-if) # no shutdown

Configure switch 2: create a VLAN20 (the steps are the same as the switch)

(3) configure layer 3 switch:

Switch (config) # vlan 10

Switch (config-vlan) # exit

Switch (config) # interface fas0/1

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 10

Switch (config) # interface vlan 10

Switch (config-if) # ip address 192.168.10.254 255.255.255.0

Switch (config-if) # no shutdown

Switch (config) # interface fas0/1

Switch (config-if) # ip dhcp pool vlan-10

Switch (dhcp-config) # network 192.168.10.0 255.255.255.0

Switch (dhcp-config) # default-router 192.168.10.254

Switch (dhcp-config) # dns-server 8.8.8.8

3. Verification and testing

4. Summary of the experiment:

Configuration ideas:

1.PC: IP address is set to DHCP

two。 Switch configuration creates VLAN and adds interfaces to VLAN

3. Configure layer 3 switches:

Create VLAN 10, VLAN 20 and configure static gateways

4. Layer 3 switches configure network segments, gateways, DNS

5. Verification and testing (automatically assigning IP addresses, ping commands)

6 Experimental conclusion: setting DHCP between different VLAN can automatically assign IP address to realize interworking.

Tags: Configuration switch lab address difference communication interface step gateway assignment test verification consistency between name command idea topology purpose conclusion Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Apple NVidia OPPO Reno Shulou Tech Info