正文

跨交换机的VLAN配置实验2007-08-17 21:24:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/ccna/28594.html

分享到:

跨交换机的VLAN配置实验 200705171179398193046.jpg (76.58 KB) 2007-5-19 23:35 200705171179398210218.jpg (85.37 KB) 2007-5-19 23:35 SW1:添加VLANSW1#vlan databaseSW1(vlan)#vlan 10 VLAN 10 added:    Name: VLAN0010SW1(vlan)#vlan 20VLAN 20 added:    Name: VLAN0020SW1(vlan)#vlan 30VLAN 30 added:    Name: VLAN0030SW1(vlan)#vlan 40VLAN 40 added:    Name: VLAN0040SW1(vlan)#vlan 50VLAN 50 added:    Name: VLAN0050SW1(vlan)#exitAPPLY completed.Exiting....SW1#show vlan-sw briefVLAN Name                             Status    Ports---- -------------------------------- --------- -------------------------------1    default                          active    Fa0/0, Fa0/1, Fa0/2, Fa0/3                                                Fa0/4, Fa0/5, Fa0/6, Fa0/7                                                Fa0/8, Fa0/9, Fa0/10, Fa0/11                                                Fa0/12, Fa0/13, Fa0/14, Fa0/1510   VLAN0010                         active    20   VLAN0020                         active    30   VLAN0030                         active    40   VLAN0040                         active    50   VLAN0050                         active    1002 fddi-default                     active    1003 token-ring-default               active    1004 fddinet-default                  active    1005 trnet-default                    active设置中继并配置以太通道捆绑SW1#conf tEnter configuration commands, one per line.  End with CNTL/Z.SW1(config)#interface range fastethernet0/1 - 4SW1(config-if-range)#switchport mode trunk*Mar  1 01:12:29.463: %DTP-5-TRUNKPORTON: Port Fa0/1-4 has become dot1q trunkSW1(config-if-range)#switchport trunk encapsulation dot1qSW1(config-if-range)#channel-group 1 mode onCreating a port-channel interface Port-channel1 SW1(config-if-range)#*Mar  1 01:12:45.775: %EC-5-BUNDLE: Interface Fa0/1 joined port-channel Po1*Mar  1 01:12:45.991: %EC-5-BUNDLE: Interface Fa0/2 joined port-channel Po1*Mar  1 01:12:46.159: %EC-5-BUNDLE: Interface Fa0/3 joined port-channel Po1*Mar  1 01:12:46.339: %EC-5-BUNDLE: Interface Fa0/4 joined port-channel Po1*Mar  1 01:12:48.487: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upSW1(config-if-range)#int range f0/5 - 8SW1(config-if-range)#switchport mode trunk*Mar  1 01:13:15.699: %DTP-5-TRUNKPORTON: Port Fa0/5-8 has become dot1q trunkSW1(config-if-range)#switchport trunk encapsulation dot1qSW1(config-if-range)#channel-group 2 mode onCreating a port-channel interface Port-channel2 SW1(config-if-range)#*Mar  1 01:13:22.123: %EC-5-BUNDLE: Interface Fa0/5 joined port-channel Po2*Mar  1 01:13:22.411: %EC-5-BUNDLE: Interface Fa0/6 joined port-channel Po2*Mar  1 01:13:22.591: %EC-5-BUNDLE: Interface Fa0/7 joined port-channel Po2*Mar  1 01:13:22.795: %EC-5-BUNDLE: Interface Fa0/8 joined port-channel Po2SW1(config-if-range)#*Mar  1 01:13:24.831: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel2, changed state to upSW1(config-if-range)#endSW1#show etherchannel summaryFlags:  D - down        P - in port-channel        I - stand-alone s - suspended        R - Layer3      S - Layer2        U - in useGroup Port-channel  Ports-----+------------+-----------------------------------------------------------1     Po1(SU)     Fa0/1(P)   Fa0/2(P)   Fa0/3(P)   Fa0/4(P)   2     Po2(SU)     Fa0/5(P)   Fa0/6(P)   Fa0/7(P)   Fa0/8(P)   配置VTP域: 以下内容需要回复才能看到 SW1#vlan databaseSW1(vlan)#vtp serverDevice mode already VTP SERVER.SW1(vlan)#vtp domain TKChanging VTP domain name from NULL to TKSW1(vlan)#vtp password ciscoSetting device VLAN database password to cisco.SW1(vlan)#vtp pruningPruning switched ONSW1(vlan)#exitAPPLY completed.Exiting....SW1#show vtp statusVTP Version                     : 2Configuration Revision          : 2Maximum VLANs supported locally : 256Number of existing VLANs        : 10VTP Operating Mode              : ServerVTP Domain Name                 : TKVTP Pruning Mode                : EnabledVTP V2 Mode                     : DisabledVTP Traps Generation            : DisabledMD5 digest                      : 0xAA 0x90 0x65 0x7A 0x72 0x0C 0x31 0x6A Configuration last modified by 0.0.0.0 at 3-1-02 01:15:38Local updater ID is 0.0.0.0 (no valid interface found)配置以太通道不承载vlan 40和vlan50的流量:SW1(config)#int range f0/1 - 4SW1(config-if-range)#switchport trunk allowed vlan remove 40SW1(config-if-range)#switchport trunk allowed vlan remove 50SW1#show int f0/1 switchportName: Fa0/1Switchport: EnabledAdministrative Mode: trunkOperational Mode: down (suspended member of bundle Po1)Administrative Trunking Encapsulation: dot1qNegotiation of Trunking: DisabledAccess Mode VLAN: 0 ((Inactive))Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: 1-39,41-49,51-1005Trunking VLANs Active: nonePriority for untagged frames: 0Override vlan tag priority: FALSEVoice VLAN: none Appliance trust: noneSW1#conf tEnter configuration commands, one per line.  End with CNTL/Z.SW1(config)#int range f0/5 - 8SW1(config-if-range)#switchport trunk allowed vlan remove 40SW1(config-if-range)#switchport trunk allowed vlan remove 50SW1(config-if-range)#endSW1#show int f0/5 switchportName: Fa0/5Switchport: EnabledAdministrative Mode: trunkOperational Mode: down (suspended member of bundle Po2)Administrative Trunking Encapsulation: dot1qNegotiation of Trunking: DisabledAccess Mode VLAN: 0 ((Inactive))Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: 1-39,41-49,51-1005Trunking VLANs Active: nonePriority for untagged frames: 0Override vlan tag priority: FALSEVoice VLAN: none Appliance trust: none   SW2:设置中继并配置以太通道捆绑:SW2#conf tEnter configuration commands, one per line.  End with CNTL/Z.SW2(config)#int range f0/1 - 4SW2(config-if-range)#switchport mode trunk*Mar  1 01:16:14.267: %DTP-5-TRUNKPORTON: Port Fa0/1-4 has become dot1q trunkSW2(config-if-range)#switchport trunk encapsulation dot1qSW2(config-if-range)#channel-group 1 mode onCreating a port-channel interface Port-channel1 SW2(config-if-range)#*Mar  1 01:16:20.703: %EC-5-BUNDLE: Interface Fa0/1 joined port-channel Po1*Mar  1 01:16:20.847: %EC-5-BUNDLE: Interface Fa0/2 joined port-channel Po1*Mar  1 01:16:20.991: %EC-5-BUNDLE: Interface Fa0/3 joined port-channel Po1*Mar  1 01:16:21.111: %EC-5-BUNDLE: Interface Fa0/4 joined port-channel Po1*Mar  1 01:16:23.447: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upSW2(config-if-range)#end  配置VTP域:SW2#vlan databaseSW2(vlan)#vtp clientSetting device to VTP CLIENT mode.SW2(vlan)#vtp domain TKChanging VTP domain name from NULL to TKSW2(vlan)#vtp password ciscoSetting device VLAN database password to cisco.SW2(vlan)#exitIn CLIENT state, no apply attempted.Exiting....SW2#show vlan-sw briefVLAN Name                             Status    Ports---- -------------------------------- --------- -------------------------------1    default                          active    Fa0/0, Fa0/5, Fa0/6, Fa0/7                                                Fa0/8, Fa0/9, Fa0/10, Fa0/11                                                Fa0/12, Fa0/13, Fa0/14, Fa0/1510   VLAN0010                         active    20   VLAN0020                         active    30   VLAN0030                         active    40   VLAN0040                         active    50   VLAN0050                         active    1002 fddi-default                     active    1003 token-ring-default               active    1004 fddinet-default                  active    1005 trnet-default                    active 端口f0/11-f0/15分配到VLAN10中:SW2#conf tEnter configuration commands, one per line.  End with CNTL/Z.SW2(config)#int range f0/11 - 15SW2(config-if-range)#switchport mode accessSW2(config-if)#switchport access vlan 10SW2(config-if)#endSW2#show vlan-sw briefVLAN Name                             Status    Ports---- -------------------------------- --------- -------------------------------1    default                          active    Fa0/0, Fa0/5, Fa0/6, Fa0/7                                                Fa0/8, Fa0/9, Fa0/1010   VLAN0010                         active    Fa0/11, Fa0/12, Fa0/13, Fa0/14                                                Fa0/1520   VLAN0020                         active    30   VLAN0030                         active    40   VLAN0040                         active    50   VLAN0050                         active    1002 fddi-default                     active    1003 token-ring-default               active    1004 fddinet-default                  active    1005 trnet-default                    activeSW3:设置中继并配置以太通道捆绑:SW3#conf tEnter configuration commands, one per line.  End with CNTL/Z.SW3(config)#int range f0/5 - 8SW3(config-if-range)#switchport mode trunkSW3(config-if-range)#switchport trunk encapsulation dot1qSW3(config-if-range)#channel-group 2 mode onSW3(config-if-range)#end配置VTP域:SW3#vlan databaseSW3(vlan)#vtp clientSetting device to VTP CLIENT mode.SW3(vlan)#vtp domain TKChanging VTP domain name from NULL to TKSW3(vlan)#vtp password ciscoSetting device VLAN database password to cisco.SW3(vlan)#exitIn CLIENT state, no apply attempted.Exiting....SW3#show vlan-sw briefVLAN Name                             Status    Ports---- -------------------------------- --------- -------------------------------1    default                          active    Fa0/0, Fa0/5, Fa0/6, Fa0/7                                                Fa0/8, Fa0/9, Fa0/10, Fa0/11                                                Fa0/12, Fa0/13, Fa0/14, Fa0/1510   VLAN0010                         active    20   VLAN0020                         active    30   VLAN0030                         active    40   VLAN0040                         active    50   VLAN0050                         active    1002 fddi-default                     active    1003 token-ring-default               active    1004 fddinet-default                  active    1005 trnet-default                    active  端口f0/11-f0/15分配到VLAN10中:SW3#conf tEnter configuration commands, one per line.  End with CNTL/Z.SW3(config)#int range f0/11 - 15SW3(config-if-range)#switchport mode accessSW3(config-if-range)#switchport access vlan 10SW3(config-if-range)#endSW3#show vlan-sw briefVLAN Name                             Status    Ports---- -------------------------------- --------- -------------------------------1    default                          active    Fa0/0, Fa0/1, Fa0/2, Fa0/3                                                Fa0/4, Fa0/9, Fa0/1010   VLAN0010                         active    Fa0/11, Fa0/12, Fa0/13, Fa0/14                                                Fa0/1520   VLAN0020                         active    30   VLAN0030                         active    40   VLAN0040                         active    50   VLAN0050                         active    1002 fddi-default                     active    1003 token-ring-default               active    1004 fddinet-default                  active    1005 trnet-default                    active    客户机配置:PC1:IP:192.168.1.1/24PC2:IP:192.168.1.2/24测试连通性:PC1>ping 192.168.1.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 72/298/1092 ms

阅读(3231) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册