需求:实现20.0和30.0互通,并负载均衡
按路径配置 | ||||||||
R2-R3路径 | R2 | ip route | 192.168.30.0 | 255.255.255.0 | 192.168.3.3 | 去 | ||
R3 | ip route | 192.168.20.0 | 255.255.255.0 | 192.168.3.2 | 回 | |||
R2-R1-R3路径 | R2 | ip route | 192.168.30.0 | 255.255.255.0 | 192.168.1.1 | 去 | ||
R1 | ip route | 192.168.30.0 | 255.255.255.0 | 192.168.2.3 | 去 | |||
R1 | ip route | 192.168.20.0 | 255.255.255.0 | 192.168.1.2 | 回 | |||
R3 | ip route | 192.168.20.0 | 255.255.255.0 | 192.168.2.1 | 回 |
中心思想 | 在经过的路由器上里,配置20.0和30.0两段的路由 | ||||||
站路由器角度,按网段配置 | 在R2上,配去30.0两条路由,从3.3和2.3口走 | R2 | ip route | 192.168.30.0 | 255.255.255.0 | 192.168.3.3 | |
ip route | 192.168.30.0 | 255.255.255.0 | 192.168.2.3 | ||||
在R1上,配去30.0路由从2.3口走;配去20.0路由从1.2口走 | R1 | ip route | 192.168.30.0 | 255.255.255.0 | 192.168.2.3 | ||
ip route | 192.168.20.0 | 255.255.255.0 | 192.168.1.2 | ||||
在R3上,配去20.0两条路由,从3.2和1.2口走 | R3 | ip route | 192.168.20.0 | 255.255.255.0 | 192.168.3.2 | ||
ip route | 192.168.20.0 | 255.255.255.0 | 192.168.1.2 |
配好后在R2上traceroute192.168.30.0,跟踪数据包走向,负载均衡
在此需求基础上再实现全网互通
2 | 全网互通 | 每个路由器配自己不知道的网段 | ||||||
R2 | ip route | 192.168.2.0 | 255.255.255.0 | 192.168.1.1 | 全网互通 | |||
R3 | ip route | 192.168.1.0 | 255.255.255.0 | 192.168.2.1 | 全网互通 |
无论在哪个路由器,都能ping通另2个路由器
时间: 2024-10-09 02:42:01