Switch(config)#vtp mode server
Device mode already VTP SERVER.
Switch(config)#
Switch(config)#vtp domain aaa
Domain name already setto aaa.
Switch(config)#
Switch(config)#vtp password PASSWORD
Password already setto PASSWORD
Switch(config)#ip routing
Switch(config)#int f0/5
Switch(config-if)#sw ac vlan 6
Switch(config-if)#int vlan 2
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan2, changed state to up
Switch(config-if)#ip add 192.168.2.254 255.255.255.0
Switch(config-if)#int vlan 3
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan3, changed state to up
Switch(config-if)#ip add 192.168.3.254 255.255.255.0
Switch(config-if)#int vlan 4
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan4, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan4, changed state to up
Switch(config-if)#ip add 192.168.4.254 255.255.255.0
Switch(config-if)#int vlan 5
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan5, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan5, changed state to up
Switch(config-if)#ip add 192.168.5.254 255.255.255.0
Switch(config-if)#int vlan 6
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan6, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan6, changed state to up
Switch(config-if)#ip add 200.200.202.2 255.255.255.252
Switch(config-if)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch(config)#int range f0/1-5
Switch(config-if-range)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan4, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan5, changed state to up
Switch(config)#router ospf 1
Switch(config-router)#network 192.168.2.0 0.0.0.255 area 1
Switch(config-router)#network 192.168.3.0 0.0.0.255 area 1
Switch(config-router)#network 192.168.4.0 0.0.0.255 area 1
Switch(config-router)#network 192.168.5.0 0.0.0.255 area 1
Switch(config-router)#network 200.200.202.0 0.0.0.3 area 0
Router4
Router(config)#int f0/0
Router(config-if)#ip add 192.168.1.254255.255.255.0
Router(config-if)#no sh
Router(config-if)#int s0/0/0
Router(config-if)#ip add 200.200.202.1255.255.255.252
Router(config-if)#no sh
Router(config-if)#int f0/1
Router(config-if)#ip add 200.200.201.1255.255.255.252
Router(config-if)#no sh
Router(config)#router ospf 1
Router(config-router)#network192.168.1.00.0.0.255 area 0
Router(config-router)#network200.200.202.00.0.0.3 area 0
Router(config-router)#network200.200.201.00.0.0.3 area 0
Router6
Router(config-if)#int s0/0/0
Router(config-if)#ip add 200.200.202.2255.255.255.252
Router(config-if)#no sh
Router(config-if)#int f0/1
Router(config-if)#ip add 192.168.10.254255.255.255.0
Router(config-if)#no sh
Router(config)#router ospf 1
Router(config-router)#network192.168.10.00.0.0.255 area 2
Router(config-router)#network200.200.202.00.0.0.3 area 1
Switch7(举一个例子)Switch6-11相似
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#Switch(config)#vtp domain aaa
Changing VTP domain name from NULL to aaa
Switch(config)#Switch(config)#vtp password PASSWORD
Setting device VLAN database password to PASSWORD
Switch(config)#int f0/2Switch(config-if)#switchport mode trunk
S
Switch(config-if)#int f0/1Switch(config-if)#switchport access vlan 2
得到结果
Router>show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA externaltype1, N2 - OSPF NSSA externaltype2
E1 - OSPF externaltype1, E2 - OSPF externaltype2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort isnotset
C 192.168.1.0/24is directly connected, FastEthernet0/0
O IA 192.168.2.0/24 [110/2] via 200.200.201.2, 00:00:04, FastEthernet0/1
O IA 192.168.3.0/24 [110/2] via 200.200.201.2, 00:00:04, FastEthernet0/1
O IA 192.168.4.0/24 [110/2] via 200.200.201.2, 00:00:04, FastEthernet0/1
O IA 192.168.5.0/24 [110/2] via 200.200.201.2, 00:00:04, FastEthernet0/1
O IA 192.168.20.0/24 [110/65] via 200.200.202.2, 00:00:40, Serial0/0/0200.200.201.0/30is subnetted, 1 subnets
C 200.200.201.0is directly connected, FastEthernet0/1200.200.202.0/30is subnetted, 1 subnets
C 200.200.202.0is directly connected, Serial0/0/0
Router>
Switch>show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA externaltype1, N2 - OSPF NSSA externaltype2
E1 - OSPF externaltype1, E2 - OSPF externaltype2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort isnotset
O 192.168.1.0/24 [110/2] via 200.200.201.1, 00:00:37, Vlan6
C 192.168.2.0/24is directly connected, Vlan2
C 192.168.3.0/24is directly connected, Vlan3
C 192.168.4.0/24is directly connected, Vlan4
C 192.168.5.0/24is directly connected, Vlan5
O IA 192.168.20.0/24 [110/66] via 200.200.201.1, 00:00:37, Vlan6
200.200.201.0/30is subnetted, 1 subnets
C 200.200.201.0is directly connected, Vlan6
200.200.202.0/30is subnetted, 1 subnets
O 200.200.202.0 [110/65] via 200.200.201.1, 00:00:37, Vlan6
Switch>
Router>show ip ro
Router>show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA externaltype1, N2 - OSPF NSSA externaltype2
E1 - OSPF externaltype1, E2 - OSPF externaltype2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort isnotset
O 192.168.1.0/24 [110/65] via 200.200.202.1, 00:01:33, Serial0/0/0
O IA 192.168.2.0/24 [110/66] via 200.200.202.1, 00:00:58, Serial0/0/0
O IA 192.168.3.0/24 [110/66] via 200.200.202.1, 00:00:58, Serial0/0/0
O IA 192.168.4.0/24 [110/66] via 200.200.202.1, 00:00:58, Serial0/0/0
O IA 192.168.5.0/24 [110/66] via 200.200.202.1, 00:00:58, Serial0/0/0
C 192.168.20.0/24is directly connected, FastEthernet0/0200.200.201.0/30is subnetted, 1 subnets
O 200.200.201.0 [110/65] via 200.200.202.1, 00:00:58, Serial0/0/0200.200.202.0/30is subnetted, 1 subnets
C 200.200.202.0is directly connected, Serial0/0/0
Router>