交换机与路由器之间进行链路聚合知识总结

交换机与路由器之间进行链路聚合知识总结

为了增加交换机与路由器,或者路由器与路由器之间的带宽和稳定性,需要采用链路聚合技术,相关思路及操作如下:

1.搭建网络模型

2.工作站设备基本配置

3.交换机配置:链路聚合配置,静态路由配置

4.路由器配置:链路聚合配置,静态路由配置(需要将聚合链路二层接口变为三层接口,在Eth-trunk接口上配置IP地址)

5.连通测试

 

1.搭建网络模型

 

 

  

2.工作站设备基本配置

    

3.交换机配置:链路聚合配置,静态路由配置

//SW1 配置:

//交换机上配置vlan及IP地址

[SW1] vlan batch 10 100

[SW1] interface Vlanif 10

[SW1-Vlanif10] ip address 192.168.10.1 24

[SW1] interface Vlanif 100

[SW2-Vlanif100] ip address 192.168.100.1 24

//做链路聚合,这个与路由器相对应的eth-trunk只能是采用link-type  access

[SW1] interface Eth-Trunk 1

[SW1-Eth-Trunk1] mode lacp-static 

[SW1-Eth-Trunk1] trunkport GigabitEthernet 0/0/1

[SW1-Eth-Trunk1] trunkport GigabitEthernet 0/0/2

[SW1-Eth-Trunk1] port link-type access 

[SW1-Eth-Trunk1] port default vlan 100

//SW1 静态路由配置

[SW1] ip route-static 192.168.12.0 24 192.168.100.254
[SW1] ip route-static 192.168.200.0 24 192.168.100.254
[SW1] ip route-static 192.168.20.0 24 192.168.100.254

 

//SW2 配置

//交换机上配置vlan及IP地址

[SW2] vlan batch 20 200

[SW2] interface Vlanif 20

[SW2-Vlanif20] ip address 192.168.20.1 24

[SW2] interface Vlanif 200

[SW2-Vlanif200] ip address 192.168.200.1 24

//做链路聚合,这个与路由器相对应的eth-trunk只能是采用link-type  access

[SW1] interface Eth-Trunk 1

[SW1-Eth-Trunk2] mode lacp-static 

[SW1-Eth-Trunk2] trunkport GigabitEthernet 0/0/1

[SW1-Eth-Trunk2] trunkport GigabitEthernet 0/0/2

[SW1-Eth-Trunk2] port link-type access 

[SW1-Eth-Trunk2] port default vlan 20

//SW2 静态路由配置

[SW2]ip route-static 192.168.12.0 24 192.168.200.254

[SW2]ip route-static 192.168.10.0 24 192.168.200.254
[SW2]ip route-static 192.168.100.0 24 192.168.200.254

 

4.路由器配置:链路聚合配置,静态路由配置(需要将聚合链路二层接口变为三层接口,在Eth-trunk接口上配置IP地址)

//Router1链路配置

[Router1] interface Eth-Trunk1  //路由器与交换机之间的链路聚合

[Router1-Eth-Trunk1] undo portswitch   //这一步很重要,需要将聚合链路二层接口变为三层接口,在Eth-trunk接口上配置IP地址,只有三层接口才能配置IP地址。

[Router1-Eth-Trunk1] mode lacp-static 

[Router1-Eth-Trunk1] trunkport GigabitEthernet 2/0/1

[Router1-Eth-Trunk1] trunkport GigabitEthernet 2/0/2

[Router1-Eth-Trunk1] ip address 192.168.100.254 24

//

[Router1] interface Eth-Trunk3 //路由器与路由器之间的链路聚合

[Router1-Eth-Trunk3] undo portswitch   //接口转换,由二类口转换成三类口

[Router1-Eth-Trunk3] mode lacp-static 

[Router1-Eth-Trunk3] trunkport GigabitEthernet 0/0/0

[Router1-Eth-Trunk3] trunkport GigabitEthernet 0/0/1

[Router1-Eth-Trunk3] ip address 192.168.12.1 24

//Router1 路由配置

[Router1] ip route-static 192.168.10.0 24 192.168.100.1
[Router1] ip route-static 192.168.200.0 24 192.168.12.2
[Router1] ip route-static 192.168.20.0 24 192.168.12.2

 

//Router2链路配置

[Router2] interface Eth-Trunk2  //eth-trunk接口是二层接口

[Router2-Eth-Trunk2] undo portswitch   //这一步很重要,只有三层接口才能配置IP地址。

[Router2-Eth-Trunk2] mode lacp-static 

[Router2-Eth-Trunk2] trunkport GigabitEthernet 2/0/1

[Router2-Eth-Trunk2] trunkport GigabitEthernet 2/0/2

[Router2-Eth-Trunk2] ip address 192.168.100.254 24

//

[Router2] interface Eth-Trunk3 //路由器与路由器之间的链路聚合

[Router2-Eth-Trunk3] undo portswitch   //接口转换,由二类口转换成三类口

[Router2-Eth-Trunk3] mode lacp-static 

[Router2-Eth-Trunk3] trunkport GigabitEthernet 0/0/0

[Router2-Eth-Trunk3] trunkport GigabitEthernet 0/0/1

[Router2-Eth-Trunk3] ip address 192.168.12.2 24

//Router2 路由配置

[Router2] ip route-static 192.168.20.0 24 192.168.200.1
[Router2] ip route-static 192.168.100.0 24 192.168.12.1
[Router2] ip route-static 192.168.10.0 24 192.168.12.1

 

5.连通测试(PC6  ping PC1) 

PC>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fe87:2dfe
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.20.222
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.20.1
Physical address..................: 54-89-98-87-2D-FE
DNS server........................:

PC>ping 192.168.10.111

Ping 192.168.10.111: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.10.111: bytes=32 seq=2 ttl=124 time=78 ms
From 192.168.10.111: bytes=32 seq=3 ttl=124 time=78 ms
From 192.168.10.111: bytes=32 seq=4 ttl=124 time=62 ms
From 192.168.10.111: bytes=32 seq=5 ttl=124 time=63 ms

--- 192.168.10.111 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/70/78 ms

 

posted on 2022-06-13 01:35  人生不开窍  阅读(4843)  评论(2编辑  收藏  举报

导航