【技术分享】配置策略路由
发布作者:微思网络 发布时间:2026-01-13 浏览量:0次
近期开班计划

网络拓扑

说明:用户使用NBR2000作为网吧出口路由器,接入线路共3条,两条电信线路,一条网通线路。由于NBR2000只有2个WAN口,因此两条电信线路通过一台二层交换机连接到NBR2000的WAN 0口上,WAN 0口配置两个IP地址(其中一个为second ip),WAN 1口连接网通线路。IP地址如图所示。
功能需求
访问网通的网络走网通线路,访问其他网络使用负载均衡的方式分别走两条电信线路。
这是一种以前很少碰到的方案需求。

配置实现
access-list 90 permit 192.168.0.0 0.0.0.254 //定义偶数IP access-list 91 permit 192.168.0.1 0.0.0.254 //定义奇数IP route-map Telcom permit 10 match ip address 90 set ip default next-hop 202.109.204.1 //定义偶数IP往电信1线路转发 route-map Telcom permit 20 match ip address 91 set ip default next-hop 61.154.8.1 //定义奇数IP往电信2线路转发 ip nat pool pool1 prefix-length 24 address 202.109.204.2 202.109.204.2 match interface GigabitEthernet 0/1 address 210.51.32.2 210.51.32.2 match interface FastEthernet 0/2 ip nat pool pool2 prefix-length 24 address 61.154.8.2 61.154.8.2 match interface GigabitEthernet 0/1 address 210.51.32.2 210.51.32.2 match interface FastEthernet 0/2 ! ip nat inside source list 90 pool pool1 ip nat inside source list 91 pool pool2 //定义奇偶IP nat地址池 ! ip route 58.16.0.0 255.255.0.0 220.249.160.97 省略若干网通路由 ip route 222.160.0.0 255.252.0.0 220.249.160.97 //路由表中只存在网通路由




