校园网双出口方案

  • 格式:doc
  • 大小:71.50 KB
  • 文档页数:3

验证策略路由的正确性
测试编号9.7.1验证策略路由的正确性
测试过程和结果:
步骤2:
Internet :
interface Ethernet0/0
ip address 192.168.1.254 255.255.255.0
full-duplex
interface Ethernet0/0.1
encapsulation dot1Q 2
ip address 192.168.2.254 255.255.255.0
interface Serial1/0
ip address 202.202.202.2 255.255.255.252
interface Serial1/1
ip address 200.200.200.2 255.255.255.252
serial restart-delay 0
电信:
Inter lo 0
Ip add 2.2.2.2 255.255.255.255
Int s1/0
Ip add 202.202.202.1 255.255.255.252
教育网:
Inter lo 0
Ip add 3.3.3.3 255.255.255.255
Int s1/0
Ip add 200.200.200.1 255.255.255.252
步骤3:默认所有流量往电信走;做NAT,对图书馆的数据流量使用策略路由往教育网出口走
ip route 0.0.0.0 0.0.0.0 202.202.202.1 30 // 默认流量走电信出口
ip route 0.0.0.0 0.0.0.0 200.200.200.1 40 //在电信出口故障的情况下将会使用这条路由
int s1/0
ip nat outside
int s1/1
ip nat outside
int e0/0
ip nat inside
int e0/0.1 //注意子接口也要配置nat 边界
ip nat inside
route-map nat-dianxin permit
match interface s1/0
router-map nat-jiaoyu permit
match interface s1/1
ip nat inside source route-map nat-dianxin interface s1/0 overload
ip nat inside source route-map nat-jiaoyu interface s1/1 overload
access-list 100 permit ip 192.168.2.0 0.0.0.255 any //匹配感兴趣流量
route-map jiaoyu permit 1
match ip address 100
set ip next-hop 200.200.200.1 //将下一跳设置为200.200.200.1 ,然后路由器在查路由表转发,随即知道往S1/1发送
步骤4:查看数据走向
在图书馆网段上:192.168.2.0/24 网段(走教育网)
在网段192.168.1.0/24
SW1#traceroute 2.2.2.2
Type escape sequence to abort.
Tracing the route to 2.2.2.2
1 192.168.1.254 76 msec 7
2 msec 16 msec
2 202.202.202.1 40 msec * 64 msec //走电信网
SW1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/71/96 ms
总结:①配置默认流量走电信
②使用策略路由将感兴趣流量走教育网
③做NA T配置。

NA T感兴趣流量为到达NA T出接口的流量
④注意使用no ip route-cache 清除route缓存。