R0 F0/1------------SW0 F0/1
SW0 F0/24----------SW1 F0/24
SW0 F0/11----------PC0
F0/12----------PC1
F0/13----------PC2
SW1 F0/11----------PC3
F0/12----------PC4
F0/13----------PC5
Lab Purpose
R0 as a single-arm routing so that the vlan11-13 PC can access each other,
And serves the VLAN11-13 as a DHCP server
R0: en
Conf t
Lin con 0
No exec-t # login does not time out #
Logg sync # input synchronization #
R0 (config) # int f0/1.1
R0 (config-subif) # encapsulation dot1Q 11 (802.1q encapsulation for vlan11, and so on)
R0 (config-subif) # ip add 192.168.11.1 255.255.255.0
R0 (config-subif) # int f0/1.2
R0 (config-subif) # en do 12
R0 (config-subif) # ip add 192.168.12.1 255.255.255.0
R0 (config-subif) # int f0/1.3
R0 (config-subif) # en do 13
R0 (config-subif) # ip add 192.168.13.1 255.255.0
R0 (config-subif) # exit
R0 (config) # ip dhcp po vlan11 (create a DHCP address pool for the 11.0 network segment, and so on)
R0 (dhcp-config) # network 192.168.11.0 255.255.255.0
R0 (dhcp-config) # def 192.168.11.1
R0 (dhcp-config) # dns-server 192.168.11.1
R0 (config) # ip dhcp po vlan12
R0 (dhcp-config) # network 192.168.12.0 255.255.255.0
R0 (dhcp-config) # def 192.168.12.1
R0 (dhcp-config) # dns-server 192.168.12.1
R0 (config) # ip dhcp po vlan13
R0 (dhcp-config) # network 192.168.255.255.255.255.0
R0 (dhcp-config) # def 192.168.13.1
R0 (dhcp-config) # dns-server 192.168.13.1
R0 (config) # ip dhcp excluded-address 192.168.11.1 (the address pool retains the ip address of the gateway)
R0 (config) # ip dh ex 192.168.12.1
R0 (config) # ip dh ex 192.168.13.1
R0 operation ends here
SW0
Omit Common commands
SW0 (vlan) # vtp server (unique to Cisco, resume management domain, facilitating vlan Modification Management between domains)
Device mode already vtp server.
SW0 (vlan) # vtp domain softbar.com
Changing VTP domain name from NULL to softbar.com
SW0 (vlan) # vlan 11
VLAN 11 added:
Name: VLAN0011
SW0 (vlan) # vlan 12
VLAN 12 added:
Name: VLAN0012
SW0 (vlan) # vlan 13
VLAN 13 added:
Name: VLAN0013
SW0 (vlan) # exit
APPLY completed.
Exiting ....
SW0 (config) # int f0/11
SW0 (config-if) # sw ac vla 11
SW0 (config-if) # sw mo ac
SW0 (config-if) # int f0/12
SW0 (config-if) # sw ac vl 12
SW0 (config-if) # sw mo ac
SW0 (config-if) # int f0/13
SW0 (config-if) # sw ac vl 13
SW0 (config-if) # sw mo ac
SW0 (config-if) # int f0/1 (f0/1 and f0/24 enable the trunk to enable communication between VLANs)
SW0 (config-if) # sw mo tr
SW0 (config-if) # int f0/24
SW0 (config-if) # sw mo tr
SW1
SW1 (vlan) # vtp server
SW1 (vlan) # vtp domain softbar.com
After VTP is added, the vlan11-13 is automatically generated without manual Creation
SW1 (config) # int f0/11
SW1 (config-if) # sw ac vla 11
SW1 (config-if) # sw mo ac
SW1 (config-if) # int f0/12
SW1 (config-if) # sw ac vl 12
SW1 (config-if) # sw mo ac
SW1 (config-if) # int f0/13
SW1 (config-if) # sw ac vl 13
SW1 (config-if) # sw mo ac
SW1 (config-if) # int f0/24
SW1 (config-if) # sw mo tr
PC0 ~ PC2 can automatically obtain IP addresses, gateways, and dns through DHCP.
PC0 (vlan11, 192.168.11.2) can ping PC2 (vlan13, 192.168.13.8)
Author: "ding Xiaoyu"