思科VTP+单臂路由+动态路由
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了思科VTP+单臂路由+动态路由相关的知识,希望对你有一定的参考价值。
VTP+单臂路由+动态路由
配置R1
R1#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int e0/1
R1(config-if)#no sh
R1(config-if)#int e0/1.1
R1(config-subif)#encapsulation dot1Q 2
R1(config-subif)#ip add 20.1.1.1 255.255.255.0
R1(config-subif)#no sh
R1(config-subif)#exit
R1(config)#int e0/1.2
R1(config-subif)#encapsulation dot1Q 3
R1(config-subif)#ip address 30.1.1.1 255.255.255.0
R1(config-subif)#no sh
R1(config-subif)#exit
R1(config)#int e0/0
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 10.10.10.0
R1(config-router)#network 20.1.1.0
R1(config-router)#network 30.1.1.0
R1(config-router)#exit
R1(config)#do sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 10.10.10.1 YES manual up up
Ethernet0/1 unassigned YES unset up up
Ethernet0/1.1 20.1.1.1 YES manual up up
Ethernet0/1.2 30.1.1.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R1(config)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, 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 is not set
R 50.0.0.0/8 [120/1] via 10.10.10.2, 00:00:21, Ethernet0/0
20.0.0.0/24 is subnetted, 1 subnets
C 20.1.1.0 is directly connected, Ethernet0/1.1
R 40.0.0.0/8 [120/1] via 10.10.10.2, 00:00:21, Ethernet0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Ethernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, Ethernet0/1.2
R1(config)#
配置R2
R2#
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int e0/0
R2(config-if)#ip add 10.10.10.2 255.255.255.0
R2(config-if)#int e0/1
R2(config-if)#ip add 40.1.1.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int e0/2
R2(config-if)#ip add 50.1.1.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#netwo
R2(config-router)#network 10.10.10.0
R2(config-router)#network 40.1.1.0
R2(config-router)#network 50.1.1.0
R2(config-router)#exit
R2(config)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, 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 is not set
50.0.0.0/24 is subnetted, 1 subnets
C 50.1.1.0 is directly connected, Ethernet0/2
R 20.0.0.0/8 [120/1] via 10.10.10.1, 00:00:09, Ethernet0/0
40.0.0.0/24 is subnetted, 1 subnets
C 40.1.1.0 is directly connected, Ethernet0/1
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Ethernet0/0
R 30.0.0.0/8 [120/1] via 10.10.10.1, 00:00:09, Ethernet0/0
R2(config)#do sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 10.10.10.2 YES manual up up
Ethernet0/1 40.1.1.1 YES manual up up
Ethernet0/2 50.1.1.1 YES manual up up
Ethernet0/3 unassigned YES unset administratively down down
配置SW1
SW1#
SW1#vlan database
SW1(vlan)#vlan 2
VLAN 2 added:
Name: VLAN0002
SW1(vlan)#vlan 3
VLAN 3 added:
Name: VLAN0003
SW1(vlan)#vtp domain DY
Changing VTP domain name from NULL to DY
SW1(vlan)#vtp server
Device mode already VTP SERVER.
SW1(vlan)#vtp v2-mode
V2 mode enabled.
SW1(vlan)#exit
APPLY completed.
Exiting....
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#
SW1(config)#interface range f1/2 -3
SW1(config-if-range)#switchport access vlan 2
SW1(config-if-range)#exit
SW1(config)#int f1/4
SW1(config-if)#switchport access vlan 3
SW1(config)#int range f1/0 -1
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#exit
SW1(config)#do sh vlan-s
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/11, Fa1/12
Fa1/13, Fa1/14, Fa1/15
2 VLAN0002 active Fa1/2, Fa1/3
3 VLAN0003 active Fa1/4
1002 fddi-default active
1003 trcrf-default active
1004 fddinet-default active
1005 trbrf-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 trcrf 101003 4472 1005 3276 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trbrf 101005 4472 - - 15 ibm - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7 7 off
SW1(config)#do sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
FastEthernet1/0 unassigned YES unset up up
FastEthernet1/1 unassigned YES unset up up
FastEthernet1/2 unassigned YES unset up up
FastEthernet1/3 unassigned YES unset up up
FastEthernet1/4 unassigned YES unset up up
FastEthernet1/5 unassigned YES unset up down
FastEthernet1/6 unassigned YES unset up down
FastEthernet1/7 unassigned YES unset up down
FastEthernet1/8 unassigned YES unset up down
FastEthernet1/9 unassigned YES unset up down
FastEthernet1/10 unassigned YES unset up down
FastEthernet1/11 unassigned YES unset up down
FastEthernet1/12 unassigned YES unset up down
FastEthernet1/13 unassigned YES unset up down
FastEthernet1/14 unassigned YES unset up down
FastEthernet1/15 unassigned YES unset up down
Vlan1 unassigned YES unset up up
SW1#sh vtp status
VTP Version : 2
Configuration Revision : 1
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : DY
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0xC7 0x48 0xE1 0x67 0xEE 0x6D 0x30 0x87
Configuration last modified by 0.0.0.0 at 3-1-02 00:45:34
Local updater ID is 0.0.0.0 (no valid interface found)
SW1#do sh vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/11, Fa1/12
Fa1/13, Fa1/14, Fa1/15
2 VLAN0002 active Fa1/2, Fa1/3
3 VLAN0003 active Fa1/4
1002 fddi-default active
1003 trcrf-default active
1004 fddinet-default active
1005 trbrf-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 trcrf 101003 4472 1005 3276 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trbrf 101005 4472 - - 15 ibm - 0 0
VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7 7 off
SW1#
配置SW2
SW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#int range f1/0 -15
SW2(config-if-range)#no sh
SW2(config-if-range)#exit
SW2(config)#exit
SW2#vlan database
SW2(vlan)#vtp domain DY
Changing VTP domain name from Dc to DY
SW2(vlan)#vtp client
Device mode already VTP CLIENT.
SW2(vlan)#vtp v2-mode
V2 mode enabled.
SW2(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
SW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#int f1/0
SW2(config-if)#switchport mode trunk
SW2(config-if)#int f1/1
SW2(config-if)#switchport access vlan 2
SW2(config-if)#int f1/2
SW2(config-if)#switchport access vlan 3
SW2(config-if)#exit
SW2(config)#do sh vlan-s
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/3, Fa1/4, Fa1/5, Fa1/6
Fa1/7, Fa1/8, Fa1/9, Fa1/10
Fa1/11, Fa1/12, Fa1/13, Fa1/14
Fa1/15
2 VLAN0002 active Fa1/1
3 VLAN0003 active Fa1/2
1002 fddi-default active
1003 trcrf-default active
1004 fddinet-default active
1005 trbrf-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 trcrf 101003 4472 1005 3276 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trbrf 101005 4472 - - 15 ibm - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7 7 off
SW2(config)#do sh vtp s
VTP Version : 2
Configuration Revision : 1
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : DY
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0xC7 0x48 0xE1 0x67 0xEE 0x6D 0x30 0x87
Configuration last modified by 0.0.0.0 at 3-1-02 00:45:34
SW2(config)#
用PC机互相ping对方的PC
本文出自 “DY” 博客,请务必保留此出处http://guochenyong.blog.51cto.com/11367898/1975961
以上是关于思科VTP+单臂路由+动态路由的主要内容,如果未能解决你的问题,请参考以下文章