nympho058 发表于 2008-1-31 11:28
三层交换机实验比较经典的三层交换机实验
[font=宋体]第一步,创建[font=Times New Roman]VTP域
3550:
3550#vlan database
[font=Times New Roman]3550(vlan)#vtp server
3550(vlan)#vtp domain sy
3550(vlan)#vtp password cisco
3550(vlan)#vtp pruning
3550(vlan)#exit[color=blue]
[font=Times New Roman]SW1:
[font=Times New Roman][color=#000000]SW1#vlan database
SW1(vlan)#vtp client
SW1(vlan)#vtp domain sy
SW1(vlan)#vtp password cisco
SW1(vlan)#exit
SW2:
[color=#000000][font=Times New Roman]SW2#vlan database
SW2(vlan)#vtp client
SW2(vlan)#vtp domain sy
SW2(vlan)#vtp password cisco
SW2(vlan)#exit
第二步,配置中继
[color=blue][font=Times New Roman]3550:
[font=Times New Roman][color=#000000]3550(config)#int range f0/1 - 2
3550(config-if-range)#switchport mode trunk
3550(config-if-range)#switchport trunk encapsulation dot1q
3550(config-if-range)#end
SW1:
[font=Times New Roman][color=#000000]SW1#conf t
SW1(config)#int f0/15
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#end
SW2:
[color=#000000][font=Times New Roman]SW2#conf t
SW2(config)#int f0/15
SW2(config-if)#switchport mode trunk
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#end
第三步,创建[font=Times New Roman]VLAN,客户机学习
[font=Times New Roman]3550:
[font=Times New Roman][color=#000000]3550#vlan database
3550(vlan)#vlan 2
3550(vlan)#vlan 3
3550(vlan)#vtp pruning
3550(vlan)#exit
3550#show vtp status
[i][size=10pt][font=Times New Roman][color=#000000]VTP Version : 2
[color=blue][font=Times New Roman]Configuration Revision : 4
[font=Times New Roman][color=#000000]Maximum VLANs supported locally : 256
Number of existing VLANs : 7
[font=Times New Roman][color=blue]VTP Operating Mode : Server
VTP Domain Name : sy
VTP Pruning Mode : Enabled
[font=Times New Roman][color=#000000]VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xC1 0x0C 0x8F 0x5D 0x5A 0x3C 0xAE 0xF4
Configuration last modified by 0.0.0.0 at 3-1-02 02:09:54
Local updater ID is 0.0.0.0 (no valid interface found)
[color=blue][font=Times New Roman]SW1:
[font=Times New Roman][color=#000000]SW1#show vtp status
[i][size=10pt][font=Times New Roman][color=#000000]VTP Version : 2
Configuration Revision : 4
[font=Times New Roman][color=#000000]Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : sy
VTP Pruning Mode : Enabled
[font=Times New Roman][color=#000000]VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xC1 0x0C 0x8F 0x5D 0x5A 0x3C 0xAE 0xF4
Configuration last modified by 0.0.0.0 at 3-1-02 02:09:54
[color=blue][font=Times New Roman]SW2:
[font=Times New Roman][color=#000000]SW2#show vtp status
[i][size=10pt][font=Times New Roman][color=#000000]VTP Version : 2
Configuration Revision : 4
[font=Times New Roman][color=#000000]Maximum VLANs supported locally : 256
Number of existing VLANs : 7
[font=Times New Roman][color=blue]VTP Operating Mode : Client
VTP Domain Name : sy
VTP Pruning Mode : Enabled
[font=Times New Roman][color=#000000]VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xC1 0x0C 0x8F 0x5D 0x5A 0x3C 0xAE 0xF4
Configuration last modified by 0.0.0.0 at 3-1-02 02:09:54
第四步:端口加入到[font=Times New Roman]VLAN中
[font=Times New Roman]SW1:
[font=Times New Roman]SW1#conf t
SW1(config)#int f0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 2
SW1(config-if)#end
[font=Times New Roman]SW2:
[color=#000000][font=Times New Roman]SW2#conf t
SW2(config)#int f0/1
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 3
SW2(config-if)#end
第五步,配置三层交换,实现[font=Times New Roman]VLAN之间互通
[font=Times New Roman]3550:
[font=Times New Roman][color=#000000]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
第六步,客户机验证
[color=blue][font=Times New Roman]PC1:
[font=Times New Roman]PC1#ping 192.168.3.2
[size=10pt][font=Times New Roman]Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/194/288 ms
PC2:
[color=#000000]PC2#ping 192.168.2.2
[i][size=10pt][font=Times New Roman][color=#000000]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 = 204/250/360 ms
第七步,在三层交换机上配置路由功能,并启用动态路由协议
[color=blue][font=Times New Roman]3550:
[font=Times New Roman][color=#000000]3550#conf t
[font=Times New Roman][color=#000000]3550(config)#int f0/3
3550(config-if)#no switchport
3550(config-if)#ip address 10.0.0.2 255.255.255.0
3550(config-if)#no shutdown
3550(config-if)#exit
3550(config)#router ospf 1
3550(config-router)#network 192.168.0.0 0.0.255.255 area 0
3550(config-router)#network 10.0.0.0 0.0.0.255 area 0
3550(config-router)#end
3550#show ip route
[i][size=10pt][font=Times New Roman][color=#000000]Gateway of last resort is not set
[i][size=10pt][font=Times New Roman][color=#000000] 172.16.0.0/24 is subnetted, 1 subnets
[font=Times New Roman][color=blue]O 172.16.1.0 [110/2] via 10.0.0.1, 00:38:34, FastEthernet0/3
10.0.0.0/24 is subnetted, 1 subnets[attach]67204
[color=#000000]C 10.0.0.0 is directly connected, FastEthernet0/3
C 192.168.2.0/24 is directly connected, Vlan[color=#000000][font=Times New Roman]2
C 192.168.3.0/24 is directly connected, Vlan3
第八步,配置[color=fuchsia][font=宋体]路由器,并启用动态路由协议
[font=Times New Roman]Router:
[color=#000000]Router#conf t
[font=Times New Roman][color=#000000]Router(config)#int f0/0
Router(config-if)#ip address 10.0.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#int f1/0
Router(config-if)#ip address 172.16.1.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#router ospf 2
Router(config-router)#network 172.16.1.0 0.0.0.255 area 0
Router(config-router)#network 10.0.0.0 0.0.0.255 area 0
Router(config-router)#end
Router#show ip route
[i][size=10pt][font=Times New Roman]Gateway of last resort is not set
[size=10pt][font=Times New Roman] 172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet1/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0
[size=10pt][font=Times New Roman]O 192.168.2.0/24 [110/2] via 10.0.0.2, 00:39:14, FastEthernet0/0
O 192.168.3.0/24 [110/2] via 10.0.0.2, 00:39:14, FastEthernet0/0
第九步,客户机验证
[font=Times New Roman]PC1:
[font=Times New Roman][color=#000000]PC1#ping 172.16.1.1 [i][size=10pt][font=Times New Roman][color=#000000]Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 212/296/384 ms
[color=blue][font=Times New Roman]PC2:
[font=Times New Roman][color=#000000]PC2#ping 172.16.1.1[font=Times New Roman][color=#000000] [i][size=10pt][font=Times New Roman][color=#000000]Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 192/338/492 ms
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000]
[font=Times New Roman][color=#000000] [/font]
lymusicar 发表于 2008-1-31 12:28
好东西 可惜说的太粗略了 顶之:(:
detectivboys 发表于 2008-1-31 15:18
好东西,顶
xzy_8088 发表于 2008-1-31 15:53
好东西,顶
本文来自: 中国网管论坛(bbs.bitsCN.com) 详细出处参考:
http://bbs.bitscn.com/155090nympho058 发表于 2008-2-2 09:20
哈哈,大家如果有什么不明白的,可以提问啊
zhangshende 发表于 2008-2-2 10:48
看不太懂|~~~
哎
stonebaby 发表于 2008-2-2 15:55
太好了非常感谢
ming66618 发表于 2008-2-8 15:42
好东西,顶
本文来自: 中国网管论坛(bbs.bitsCN.com) 详细出处参考:
http://bbs.bitscn.com/155090