您好,欢迎来到微智科技网。
搜索
您的当前位置:首页vtp+stp+三层交换综合实验

vtp+stp+三层交换综合实验

来源:微智科技网
vtp+stp+三层交换综合实验

时间:2009-06-08 10:53来源:未知 作者:网络 点击: 80

被过滤广告 实验拓扑图:

实验环境配置说明:

1.将R1的Fa0/1接口的IP设为:10.0.0.2/8,Fa0/2接口的IP设为:20.0.0.1/8

2.将SW2的Fa0/10接口的IP设为:10.0.0.1/8 3.将vlan2的IP设为:192.168.1.1/24 4.将vlan3的IP设为:192.168.2.1/24

5.将pc1的IP设为:192.168.1.10/24 网关:192.168.1.1 6.将pc2的IP设为:192.168.2.10/24 网关:192.168.2.1 7.将pc3的IP设为:192.168.1.20/24 网关:192.168.1.1

8.将pc4的IP设为:192.168.2.20/24 网关:192.168.2.1 9.将pc5的IP设为:20.0.0.2/8 网关:20.0.0.1

实验结果要求:

pc5能ping通pc1,pc2,pc3,pc4. ==========================SW1配置=================================

SW1(config)#interface range f0/1 -2

SW1(config-if-range)#switchport mode trunk SW1(config)#interface range f0/13 -14

SW1(config-if-range)#switchport mode trunk

SW1(config)#vtp domain leaf //创建VTP域名

SW1#vlan database SW1(vlan)#vlan 2

VLAN 2 added:

Name: VLAN0002

SW1(vlan)#vlan 3

VLAN 3 added:

Name: VLAN0003 SW1(vlan)#exit

SW1(config)#spanning-tree vlan 2 root primary //SW1为vlan2的主根网桥

VLAN 2 bridge priority set to 8192

VLAN 2 bridge max aging time unchanged at 20 VLAN 2 bridge hello time unchanged at 2

VLAN 2 bridge forward delay unchanged at 15

SW1(config)#spanning-tree vlan 3 root secondary //的辅助根网桥

VLAN 3 bridge priority set to 16384

VLAN 3 bridge max aging time unchanged at 20 VLAN 3 bridge hello time unchanged at 2

VLAN 3 bridge forward delay unchanged at 15

设置设置SW1为vlan3

SW1(config)#interface range f0/1 -2 //配置以太网通道

SW1(config-if-range)#shutdown

SW1(config-if-range)#channel-group 1 mode on SW1(config-if-range)#no shutdown SW1(config)#ip

routing //开启三层交换路由功能

=============================SW2配置========================== SW2(config)#interface range f0/1 -2

SW2(config-if-range)#switchport mode trunk SW2(config)#interface range f0/13 -14

SW2(config-if-range)#switchport mode trunk SW2(config)#interface f0/10

SW2(config-if)#switchport mode trunk

SW2(config)#VTP mode client //设置SW3为VTP客户机模式

SW2(config)#spanning-tree vlan 3 root primary //设置SW2为vlan3的主根网桥

VLAN 3 bridge priority set to 8192

VLAN 3 bridge max aging time unchanged at 20 VLAN 3 bridge hello time unchanged at 2

VLAN 3 bridge forward delay unchanged at 15

SW2(config)#spanning-tree vlan 2 root secondary //设置SW2为vlan2的辅助根网桥

VLAN 2 bridge priority set to 16384

VLAN 2 bridge max aging time unchanged at 20 VLAN 2 bridge hello time unchanged at 2

VLAN 2 bridge forward delay unchanged at 15

SW2(config)#interface range f0/1 -2 //配置以太网通道 SW2(config-if-range)#shutdown

SW2(config-if-range)#channel-group 1 mode on SW2(config-if-range)#no shutdown

SW2(config)#ip routing //开启三层交换路由功能

SW2(config)#interface vlan 2

SW2(config-if)#ip address 192.168.1.1 255.255.255.0 SW2(config-if)#no shutdown SW2(config-if)#exit

SW2(config)#interface vlan 3

SW2(config-if)#ip address 192.168.2.1 255.255.255.0 SW2(config-if)#no shutdown SW2(config-if)#exit

SW2(config)#interface f0/10 SW2(config-if)#no

switchport //配置路由接口 SW2(config-if)#ip address 10.0.0.1 255.0.0.0 SW2(config-if)#no shutdown SW2(config)#router rip

SW2(config-router)#version 2

SW2(config-router)#no auto-summary SW2(config-router)#network 10.0.0.0 SW2(config-router)#network 192.168.1.0 SW2(config-router)#network 192.168.2.0

=======================SW3配置================================

SW3(config)#interface range f0/13 -14

SW3(config-if-range)#switchport mode trunk

SW3(config)#VTP mode client

SW3(config)#interface f0/1

SW3(config-if)#switchport access vlan 2 SW3config-if)#exit

SW3(config)#interface f0/2

SW3(config-if)#switchport access vlan 3

SW3(config)#spanning-tree uplinkfast //配置上行链路

SW3(config)#interface range f0/1 -2 //配置速端口 SW3(config-if-range)#spanning-tree portfast

=====================SW4配置================================= SW4(config)#interface range f0/13 -14

SW4(config-if-range)#switchport mode trunk

SW4(config)#VTP mode client

SW4(config)#interface f0/1

SW4(config-if)#switchport access vlan 2 SW4(config-if)#exit

SW4(config)#interface f0/2

SW4(config-if)#switchport access vlan 3

SW4(config)#spanning-tree uplinkfast

SW4(config)#interface range f0/1 -2

SW4(config-if-range)#spanning-tree portfast

==========================R1配置=============================

R1(config)#interface f0/1

R1(config-if)#ip address 10.0.0.2 255.0.0.0 R1(config-if)#no shutdown R1(config-if)#exit

R1(config)#interface f0/2

R1(config-if)#ip address 20.0.0.1 255.0.0.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#no auto-summary R1(config-router)#network 10.0.0.0 R1(config-router)#network 20.0.0.0

实验测试:

R1#ping 192.168.1.10

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = /146/340 ms

R1#ping 192.168.1.20

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.20, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 60/117/232 ms

R1#ping 192.168.2.10

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/117/244 ms

R1#ping 192.168.2.20

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.20, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 48/146/272 ms

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 7swz.com 版权所有 赣ICP备2024042798号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务