当前位置:文档之家› 配置端口聚合

配置端口聚合

实验二配置端口聚合(端口汇聚)
作用:A->B
要求聚合的端口工作在全双工,速度一致,在同一槽口且连续。

参数:ingress:源MAC, both:源和目的MAC
对于SwitchA:
[SwitchA]interface ethernet0/1
[SwitchA-Ethernet0/1]duplex full
[SwitchA-Ethernet0/1]speed 100
[SwitchA-Ethernet0/1]int e0/2
[SwitchA-Ethernet0/2]duplex full
[SwitchA-Ethernet0/2]speed 100
对于SwitchB:
[SwitchB]interface ethernet0/1
[SwitchB-Ethernet0/1]duplex full
[SwitchB-Ethernet0/1]speed 100
[SwitchB-Ethernet0/1]int e0/2
[SwitchB-Ethernet0/2]duplex full
[SwitchB-Ethernet0/2]speed 100
聚合操作:
[SwitchA]link-aggregation ethernet0/1 to ethernet0/2 both [SwitchB]link-aggregation ethernet0/1 to ethernet0/2 both [SwitchA]display link-aggregation ethernet0/1
[SwitchA]undo link-aggregation all
实验九静态路由实验
PCA:10.65.1.1 PCB:10.66.1.1 PCC:10.70.1.1 PCD:10.71.1.1 [RouterA]interface ethernet0
[RouterA-Ethernet0]ip addrress 10.65.1.2 255.255.0.0 [RouterA-Ethernet0]undo shutdown
[RouterA-Ethernet0]int e1
[RouterA-Ethernet1]ip addrress 10.66.1.2 255.255.0.0 [RouterA-Ethernet1]undo shutdown
[RouterA-Ethernet1]int s1
[RouterA-Serial1]ip addrress 10.68.1.2 255.255.0.0 [RouterA-Serial1]undo shutdown
[RouterA-Serial1]clock rate 64000
[RouterA-Serial1]quit
[RouterA]ip routing
[RouterA]dis curr
[RouterB]interface ethernet0
[RouterB-Ethernet0]ip addrress 10.70.1.2 255.255.0.0 [RouterB-Ethernet0]undo shutdown
[RouterB-Ethernet0]int e1
[RouterB-Ethernet1]ip addrress 10.71.1.2 255.255.0.0 [RouterB-Ethernet1]undo shutdown
[RouterB-Ethernet1]int s0
[RouterB-Serial0]ip addrress 10.68.1.1 255.255.0.0 [RouterB-Serial0]undo shutdown
[RouterB-Serial0]quit
[RouterB]ip routing
[RouterB]dis curr
[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0 [root@PCA root]#route add default gw 10.65.1.2
[root@PCA root]#ping 10.65.1.2 通
[root@PCA root]#ping 10.66.1.2 通
[root@PCA root]#ping 10.67.1.2 通
[root@PCA root]#ping 10.68.1.2 不通
[root@PCA root]#ping 10.69.1.2 不通
[RouterA]ip route-static 10.69.0.0 255.255.0.0 10.67.1.1 [root@PCA root]#ping 10.69.1.1 通
三个路由器的静态路由 (参考实验九图)
设置RouterA的IP:
f0/0: 10.65.1.2 --->PCA:10.65.1.1
f0/1: 10.66.1.2 --->PCB:10.66.1.1
s0/0: 10.67.1.2
s0/1: 10.68.1.2 --->接RouterC s0/0
设置RouterC的IP:
s0/0: 10.68.1.1 <---
s0/1: 10.78.1.2 --->接RouterB s0/0
设置RouterB的IP:
s0/0: 10.78.1.1 <---
s0/1: 10.67.1.1
f0/0: 10.69.1.2 --->PCC:10.69.1.1
f0/1: 10.70.1.2 --->PCD:10.70.1.1
设置从PCA到PCC的静态路由
ROA(config)#ip routing
ROA(config)#ip route 10.69.0.0 255.255.0.0 10.68.1.1
ROA#show ip route
ROB(config)#ip route 10.69.0.0 255.255.0.0 10.78.1.1
ROB#show ip route
[root@PCA root]#ping 10.69.1.1 (通)
[root@PCA root]#ping 10.78.1.1 (不通)
[root@PCA root]#ping 10.70.1.1 (不通)
为什么PCA 到10.78.1.1不通呢?它是去10.69.1.1要经过的地方啊,这是由于在
RouterA上,没有去10.78.0.0网络的路由,所以到这个网络它不知道要向哪去送。

如何让PCA到10.70.1.1 (PCD)通呢,像10.69.0.0网络一样,在路径的路由器上

再各写一条到10.70.0.0网络的静态路由就可以了。

如果每一条路径都写一组静态路由显然不好,由于PCA在这个网络中实际只有一条
主通路,所以使用默认路由较好。

我们再做一个使用默认路由的小实验,先去掉原有的静态路由。

ROA(config)#no ip route 10.69.0.0 255.255.0.0 10.68.1.1
ROA#sh ip ro
ROB(config)#no ip route 10.69.0.0 255.255.0.0 10.78.1.1
ROB#sh ip ro
[root@PCA root]#ping 10.69.1.1 (不通)
ROA(config)#ip route 0.0.0.0. 0.0.0.0 10.68.1.1
ROA#sh ip ro
ROB(config)#ip route 0.0.0.0. 0.0.0.0 10.69.1.1
ROB#sh ip ro
[root@PCA root]#ping 10.69.1.1 (通)
[root@PCA root]#ping 10.70.1.1 (通)
[root@PCA root]#ping 10.78.1.1 (通)
路由表是路由器实现路由的指导思想。

到一个网络通不通,要看路由
表中有没有去
目的网络的路由表项,动态路由可以自动创建路由表,定时更新。

[RouterB-Serial0]undo ip addrress 10.67.1.1 255.255.0.0
[RouterB-Serial0]ip addrress 10.70.1.1 255.255.0.0
[RouterC]interface serial0
[RouterC-Serial0]ip addrress 10.67.1.1 255.255.0.0
[RouterC-Serial0]undo shutdown
[RouterC-Serial0]clock rate 64000
[RouterC-Serial0]int s1
[RouterC-Serial1]ip addrress 10.70.1.1 255.255.0.0
[RouterC-Serial1]undo shutdown
[RouterC-Serial1]quit
[RouterC]ip route-static 10.69.0.0 255.255.0.0 10.70.1.1 [RouterC]dis curr
[root@PCA root]#ping 10.69.1.1 通
[root@PCA root]#ping 10.68.1.1 不通。

相关主题