博客统计信息

51cto推荐博客
用户名:SyT007
文章数:39
评论数:212
访问量:102759
无忧币:36
博客积分:1220
博客等级:4
注册日期:2007-05-15

我的技术圈(1)

更多>>
三层交换机综合实验
2007-06-28 21:22:55
版权声明:原创作品,如需转载,请与作者联系。否则将追究法律责任。
第一步,配置VTP域,创建VLAN
3550:
3550#vlan database
3550(vlan)#vtp server
3550(vlan)#vtp domain sy
3550(vlan)#vtp password cisco
3550(vlan)#vlan 2
3550(vlan)#vlan 3
3550(vlan)#vtp pruning
3550(vlan)#exit

SW1:
SW1#vlan database
SW1(vlan)#vtp client
SW1(vlan)#vtp domain sy
SW1(vlan)#vtp password cisco
SW1(vlan)#exit
 
第二步,设置中继
3550:
3550(config)#int f0/0
3550(config-if)#switchport trunk encapsulation dot1q
3550(config-if)#switchport mode trunk
3550(config-if)#end
3550#show vtp status
VTP Version                     : 2
Configuration Revision          : 2
Maximum VLANs supported locally : 256
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : sy
VTP Pruning Mode                : Enabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled

SW1:
SW1(config)#int f0/15
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#end
SW1#show vtp status
VTP Version                     : 2
Configuration Revision          : 2
Maximum VLANs supported locally : 256
Number of existing VLANs        : 7
VTP Operating Mode              : Client
VTP Domain Name                 : sy
VTP Pruning Mode                : Enabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
 
第三步,端口加入VLAN
SW1:
SW1#conf t
SW1(config)#int f0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 2
SW1(config-if)#exit
SW1(config)#int f0/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 3
SW1(config-if)#end
 
第四步,配置三层交换,实现VLAN之间互通
3550
3550#conf t
3550(config)#ip routing
3550(config)#int vlan 2
3550(config-if)#ip address 192.168.2.1 255.255.255.0
3550(config-if)#no shutdown
3550(config-if)#exit
3550(config)#int vlan 3
3550(config-if)#ip address 192.168.3.1 255.255.255.0
3550(config-if)#no shutdown
3550(config-if)#end
 
第五步,客户机验证
PC1#ping 192.168.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 216/284/336 ms
PC2#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/211/276 ms
第六步,在三层交换机上启用路由功能
3550:
3550(config)#int f0/1
3550(config-if)#no switchport
3550(config-if)#ip address 172.16.1.1 255.255.255.0
3550(config-if)#no shutdown
3550(config-if)#exit
3550(config)#int f0/2
3550(config-if)#no switchport
3550(config-if)#ip address 172.16.2.1 255.255.255.0
3550(config-if)#no shutdown
3550(config-if)#exit
 
第七步,配置两台路由器,并启用HSRP
R1:
R1(config)#
R1(config)#int f0/0
R1(config-if)#no ip address
R1(config-if)#ip address 172.16.1.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#speed 100
R1(config-if)#duplex full
R1(config-if)#exit
R1(config)#int f1/0
R1(config-if)#ip address 10.0.0.254 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#speed 100
R1(config-if)#duplex full
R1(config-if)#standby 1 ip 10.0.0.252
R1(config-if)#standby 1 priority 200
R1(config-if)#standby 1 preempt
R1(config-if)#standby 1 track f0/0 10
R1(config-if)#end
R1#show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP    
Fa1/0       1   200  P Active   local           10.0.0.253      10.0.0.252


R2:
R2#conf t
R2(config)#int f0/0
R2(config-if)#ip address 172.16.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#speed 100
R2(config-if)#duplex full
R2(config-if)#exit
R2(config)#int f1/0
R2(config-if)#ip address 10.0.0.253 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#speed 100
R2(config-if)#duplex full
R2(config-if)#standby 1 ip 10.0.0.252
R2(config-if)#end

第八步,配置动态路由协议
3550:
3550(config)#router ospf 1
3550(config-router)#network 192.168.2.0 0.0.0.255 area 0
3550(config-router)#network 192.168.3.0 0.0.0.255 area 0
3550(config-router)#network 172.16.1.0 0.0.0.255 area 0
3550(config-router)#network 172.16.2.0 0.0.0.255 area 0
3550(config-router)#end
 
R1:
R1(config)#router ospf 2
R1(config-router)#network 172.16.1.0 0.0.0.255 area 0
R1(config-router)#network 10.0.0.0 0.0.0.255 are 0
R1(config-router)#end
 
R2:
R2(config)#router ospf 3
R2(config-router)#network 172.16.2.0 0.0.0.255 area 0
R2(config-router)#network 10.0.0.0 0.0.0.255 area 0
R2(config-router)#end
R2#show ip route
Gateway of last resort is not set
     172.16.0.0/24 is subnetted, 2 subnets
O       172.16.1.0 [110/2] via 172.16.2.1, 00:03:39, FastEthernet0/0
                   [110/2] via 10.0.0.254, 00:03:39, FastEthernet1/0
C       172.16.2.0 is directly connected, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, FastEthernet1/0
O    192.168.2.0/24 [110/2] via 172.16.2.1, 00:03:39, FastEthernet0/0
O    192.168.3.0/24 [110/2] via 172.16.2.1, 00:03:39, FastEthernet0/0
 
第九步,客户机验证
PC3#ping 192.168.2.2、
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 288/337/432 ms
PC3#ping 192.168.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 240/300/336 ms
PC1#ping 192.168.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 192/231/288 ms

本文出自 “甜蜜的T007之家” 博客,转载请与作者联系!

分享至
更多
一键收藏,随时查看,分享好友!
yuwenming520、zhk271427919
2人
了这篇文章

类别:路由交换技术圈()┆阅读()┆评论() ┆ 推送到技术圈返回首页

文章评论

 <<   1   2   >>   页数 ( 1/2 )  
2007-06-28 21:26:36
博主的交换机学的好厉害。三层交换机,一直都攻不下来。

2007-06-28 21:38:52
这么快就有回复的拉,谢谢支持

2007-06-29 07:57:50
好东西,但都太简单了,我都会了,有没有其他的。高级一
点的东西。让我也来开开眼。

2007-06-29 21:06:20
哈哈,博主路由学的真好哪。

2007-07-10 19:05:34
不错 真好

2007-07-13 13:22:02
Download 了,看一哈子。谢了

2007-07-13 17:22:06
好东东

2007-07-21 07:37:54
SW1里的f0/1口也要配置trunk吧。。呵呵

2007-07-21 15:51:57
sw1的F0/1口是接入链路,是不需要配置TRUNK的。只在中继链路配置TRUNK,接入链路配置access

2007-08-14 21:17:19
boson netsim 6.0 没有vtp pruning命令示例虽好但做不起来奈何

2008-01-10 16:25:22
斑竹,你太牛了,可惜我没有实际器材做,在boson中照做后,不通。能否帮我设计一下网络,目前网络:外网——飞塔防火墙——cisco2950——节点交换机——pc,现有一台cisco3750交换机闲置,我想把此交换机换成中心交换机,并在此交换机上划分VLAN,局域网VLAN间路由我搞定了,可要访问外网就不行了。我看了你的三层交换机配置,应该可以搞定。因为我这不能实验,要一次把网络搞定,能否帮我把网络配置搞定。目标是:外网——防火墙——3750——2950(vlan)——节点交换机——pc(部分能上网,而且比较分散)。谢谢

2008-03-19 20:24:45
l厉害!学习!

2008-12-04 22:03:35
楼主,你好,你能告诉我一下你这个TOP图的设计思想吗?
我对于这些配置还是能OK,但不知道怎么设计!!!

2008-12-08 08:08:14
不错真的很详细

2009-03-02 22:13:48
谢谢斑竹好东西   学习到了

 <<   1   2   >>   页数 ( 1/2 )  

发表评论            

【技术门诊】专家解析:软考重点难点及应试技巧
昵  称:
登录  快速注册
验证码:

请点击后输入验证码博客过2级,无需填写验证码

内  容: