概念:
内部流量的负载分担:
识别到流量后强制更改下一跳
冗余备份:
如果一侧链路断开会走另一条链路
- 配置接口地址
RSR1:
int g0/2
no switch
ip add 192.168.100.1 24
RSR2:
int g0/0
no switch
ip add 192.168.100.2 24
int g0/1
no switch
ip add 1.1.1.1 24
int g0/2
no switch
ip add 2.2.2.1 24
RSR3:
int g0/0
no switch
ip add 1.1.1.2
int g0/1
no switch
ip add 3.3.3.1
RSR4:
int g0/0
no switch
ip add 2.2.2.2 24
int g0/1
no switch
ip add 4.4.4.1 24
RSR5:
int g0/0
no switch
ip add 3.3.3.2 24
int g0/1
no switch
ip add 4.4.4.2 24
配置缺省路由:
RSR2:
ip route 0.0.0.0 0.0.0.0 1.1.1.2
ip route 0.0.0.0 0.0.0.0 2.2.2.2
当通向1.1.1.2的链路断开则会走向2.2.2.2来保证冗余备份
配置返程路由:
RSR2:
ip route 192.168.10.0 255.255.255.0 192.168.100.1
ip route 192.168.20.0 255.255.255.0 192.168.100.1
网络地址转换:
access-list 1 permit any - 允许所有流量通过g0/1/g0/2出去时做地址转换
int g0/0
ip nat inside
ex
int g0/1
ip nat outside
ex
int g0/2
ip nat outside
ex
ip nat inside source list 1 int g0/1 overload - 匹配所有流量从这个接口出去时做地址转换
access-list 2 permit any
ip nat inside source list2 int g0/2 overload
ospf:
RSR3:
ro ospf 10
network 3.3.3.1 0.0.0.0 a 0
redistribute connetcted subnets
RSR4:
ro ospf 10
network 4.4.4.1 0.0.0.0 a 0
redistribute connetcted subnets
RSR5:
ro ospf 10
network 3.3.3.2 0.0.0.0 a 0
network 4.4.4.2 0.0.0.0 a 0
network 8.8.8.8 0.0.0.0 a 0
如果要使pc1的流量直走左侧,pc2直走右侧,则需要配置访问控制列表:
RSR1:
access-list 10 permit 192.168.10.0 0.0.0.255
access-list 20 permit 192.168.20.0 0.0.0.255
策略路由:
route-map to3-4 10(to3-4为策略路由名称,10为之前配置的acl)
match ip add 10(匹配之前配置的acl 10)
set ip next-hop 1.1.1.2(配置下一跳)
route-map to3-4 20
match ip add 20
set ip next-hop
标签:锐捷,g0,int,ip,no,笔记,add,0.0,路由 From: https://blog.csdn.net/2301_79175680/article/details/143096632