NP-vlan间路由和2层etherchannel
原创
©著作权归作者所有:来自51CTO博客作者cuter的原创作品,请联系作者获取转载授权,否则将追究法律责任
1、建立etherchannel
cuterSW(config)#int range f0/1 - 2
cuterSW(config-if-range)#channel-group 1 mode auto
cuterSW(config-if-range)#
cuterSW(config-if-range)#int range f0/3 - 4
cuterSW(config-if-range)#channel-group 1 mode desirable
cuterSW(config-if-range)#exit
cuterSW(config)#int po1
cuterSW(config-if)#switchport trunk encapsulation dot1q
cuterSW(config-if)#switchport mode trunk
cuterSW(config-if)#
cuterSW(config-if)#int po2
cuterSW(config-if)#switchport trunk encapsulation dot1q
cuterSW(config-if)#switchport mode trunk
cuterSW(config-if)#
SU1(config)#int range f0/1 - 2
SU1(config-if-range)#channel-group 1 mode desirable
SU1(config-if-range)#int range f0/3 - 4
SU1(config-if-range)#channel-group 2 mode auto
SU1(config-if-range)#exit
SU1(config)#int po1
SU1(config-if)#switchport mode trunk
SU1(config-if)#int po2
SU1(config-if)#switchport mode trunk
SU2(config)#int range f0/1 - 2
SU2(config-if-range)#channel-group 1 mode auto
SU2(config-if-range)#exit
SU2(config)#int range f0/3 - 4
SU2(config-if-range)#channel-group 2 mode desirable
SU2(config-if-range)#exit
SU2(config)#int po1
SU2(config-if)#switchport mode trunk
SU2(config-if)#int po2
SU2(config-if)#switchport mode trunk
cuterSW#sh spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0003.E4BA.3114
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0003.E4BA.3114
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po1 Desg FWD 9 128.27 Shr
Po2 Desg FWD 9 128.28 Shr
SU1#sh spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0003.E4BA.3114
Cost 9
Port 27(Port-channel 1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0009.7C84.D8EA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24 Desg FWD 19 128.24 P2p
Po1 Root FWD 9 128.27 Shr
Po2 Desg FWD 9 128.28 Shr
SU2#sh spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0003.E4BA.3114
Cost 9
Port 27(Port-channel 1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0090.0CD6.B690
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24 Desg FWD 19 128.24 P2p
Po2 Altn BLK 9 128.28 Shr
Po1 Root FWD 9 128.27 Shr
由此可以看出我们的etherchannel起作用了,STP也已经起来了。
2、VTP
cuterSW(config)#vtp domain ccnp
Changing VTP domain name from NULL to ccnp
cuterSW(config)#vtp mode server
Device mode already VTP SERVER.
cuterSW(config)#vtp password cisco
Setting device VLAN database password to cisco
cuterSW(config)#
SU1(config)#vtp mode client
Setting device to VTP CLIENT mode.
SU1(config)#vtp password cisco
Setting device VLAN database password to cisco
SU2(config)#vtp mode client
Setting device to VTP CLIENT mode.
SU2(config)#vtp password cisco
Setting device VLAN database password to cisco
cuterSW#sh vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs : 5
VTP Operating Mode : Server
VTP Domain Name : ccnp
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xEC 0xFE 0x6B 0x9F 0x42 0x47 0xE0 0x98
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 0.0.0.0 (no valid interface found)
SU1#sh vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 255
Number of existing VLANs : 5
VTP Operating Mode : Client
VTP Domain Name : ccnp
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xEC 0xFE 0x6B 0x9F 0x42 0x47 0xE0 0x98
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
SU2#sh vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 255
Number of existing VLANs : 5
VTP Operating Mode : Client
VTP Domain Name : ccnp
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xEC 0xFE 0x6B 0x9F 0x42 0x47 0xE0 0x98
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
cuterSW(config)#vlan 2
cuterSW(config-vlan)#name SU1
cuterSW(config-vlan)#vlan 3
cuterSW(config-vlan)#name SU2
cuterSW(config-vlan)#end
cuterSW#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
2 SU1 active
3 SU2 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
OUTPUT CUT
SU1#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig1/1, Gig1/2
2 SU1 active
3 SU2 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
OUTPUT CUT
SU1(config)#int f0/24
SU1(config-if)#switchport access vlan 2
SU2#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig1/1, Gig1/2
2 SU1 active
3 SU2 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
OUTPUT CUT
SU2(config)#int f0/24
SU2(config-if)#switchport access vlan 3
cuterSW(config)#int vlan 2
cuterSW(config-if)#ip add 192.168.1.1 255.255.255.0
cuterSW(config-if)#int vlan 3
cuterSW(config-if)#ip add 192.168.2.1 255.255.255.0
cuterSW(config-if)#exit
3、路由和验证
pc1和pc2的配置:
pc1:192.168.1.2
255.255.255.0
192.168.1.1
pc2:192.168.2.2
255.255.255.0
192.168.2.1
PC1:
PC1 ping 网关192.168.1.1 是通的,ping PC2居然也通,看来3560上到这两个网段的路由已经建立。
PC2:
PC2 ping PC1也是通的,我们看一下3560上的路由表:
cuterSW#sh 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 external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, 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 is not set
C 192.168.1.0/24 is directly connected, Vlan2
C 192.168.2.0/24 is directly connected, Vlan3
看来ip routing 在packet tracert 5.3的3560-24PS上默认是开启的,如果三层交换机上没有开启ip routing则要手动去开启,命令为:
cuterSW(config)#ip routing
上一篇:Juniper防火墙MIP配置
下一篇:思科交换产品简介1
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
VLAN聚合
学习新思想,争做新青年。今天学习的是VLAN聚合
子网 IP Internet HCIA VLAN