[Cisco] DHCP relay, layer-3 Switch VLAN Routing Practice
The experiment topology uses the GNS3 0.8.6 simulator to build a DHCP server using Red Hat 6.5. The experiment requires configuring a layer-3 Switch VLAN routing so that VLAN10 and VLAN20 members can access each other. Performs DHCP relay for layer-3 switches so that VLAN10 and VLAN20 members can obtain IP addresses through the DHCP server. Tutorial procedure IP address planning VLAN10: 192.168.10.0/24VLAN20: 192.168.20.0/24M1 (F1/1): 12.0.0.1/30R1 (F0/1): 12.0.0.2/30R1 (F0/0 ): 10.0.0.1/30DHCP server: 10.0.0.2/30 configure the command SW1 as follows: SW1> enSW1 # conf tSW1 (config) # vlan // create vlan10 and vlan20SW1 (config-vlan) # exitSW1 (config) # int f1/1SW1 (config-if) # switchport access vlan 10 // route the interface to vlanSW1 (config-if) # int f1/2SW1 (config-if) # switchport access vlan 20SW1 (config-if) # int f1/15SW1 (config-if) # s Witchport mode trunk // set the interface to the relay port SW1 (config-if) # switchport trunk encapsulation dot1q // The encapsulation dot1q SW2 configuration is the same as the SW1 Switch configuration. M1 configuration is as follows: m1> enM1 # conf tM1 (config) # ip routing // enable Layer-3 Switch routing M1 (config) # vlan 10, 20M1 (config-vlan) # exitM1 (config) # int f1/10M1 (config-if) # switchport mode trunk // set the interface to relay M1 (config-if) # switchport trunk encapsulation dot1q // encapsulate dot1qM1 (config-if) # int f1/11M1 (config-if) # switchport mode trunkM1 (confi G-if) # switchport trunk encapsulation dot1qM1 (config-if) # int vlan 10M1 (config-if) # ip add 192.168.10.1 255.255.255.0M1 (config-if) # no shutdownM1 (config-if) # ip helper-address 10.0.0.2 // specify the dhcp server address M1 (config-if) # int vlan 20 M1 (config-if) # ip add 192.168.20.1 255.255.255.0M1 (config-if) # no shutdownM1 (config-if) # ip helper-address 10.0.0.2M1 (config-if) # exitM1 (config) # int f1/1M1 (config-if) # no switchportM1 (co Nfig-if) # ip add 12.0.0.1 255.255.252m1 (config-if) # no shutdownM1 (config-if) # exitM1 (config) # ip route 0.0.0.0 0.0.0.0 12.0.0.2 // specify a default route to Internet R1. The configuration is as follows: R1> enR1 # conf tR1 (config) # int f0/1R1 (config-if) # ip add 12.0.0.2 255.255.255.252R1 (config-if) # no shutdownR1 (config-if) # exitR1 (config) # int f0/0R1 (config-if) # ip add 10.0.0.1 255.255.255.252R1 (config-if) # no shutdownR1 (config-if) # exitR1 (config) # ip route 1 92.1610.0 255.255.255.0 12.0.0.1 // static route R1 (config) # ip route 192.168.20.0 255.255.255.0 12.0.0.1 ----------------- network device configuration completion DHCP server address planning ------------------ experiment verifies that C1, C2, C3, and C4 are used to obtain the ip address CC2 C3C4 pingVLAN20 from VLAN10 respectively the member tests network connectivity. The C1pingC4 network is normal and the route between VLANs is successful!