路由器MP故障的分析解决办法

运维 网络运维
一般在路由器上启用动态路由协议动态地学习网络拓扑,会遇到这样的问题,当一台非授权的网络设备接入网络,并发布路由协议更新时,有可能会使网络内的设备动态的产生错误的路由条目,从而造成数据包的丢失或者被路由到了错误的地方,这时我们就要用到PBR。

一般在路由器上启用动态路由协议动态地学习网络拓扑,会遇到这样的问题,当一台非授权的网络设备接入网络,并发布路由协议更新时,有可能会使网络内的设备动态的产生错误的路由条目,从而造成数据包的丢失或者被路由到了错误的地方,这时我们就要用到PBR。

一、所谓PBR是一种灵活的数据包路由转发机制,通过在路由器上应用策略路由,使路由器根据路由映射决定经过路由器的数据包如何处理,路由映射决定了一个数据包的下一跳转发路由器。

二、在路由器上应用策略路由,必须要指定策略路由使用的路由映射,并且要创建路由映射,一个路由映射由很多条策略组成,每个策略都定义了1个或多个匹配规则和对应操作。

三、一个接口应用策略路由后,将对该接口收到的所有包进行检查,不符合路由映射中所定义的数据包将会被按照正常路由转发进行处理,符合路由映射中的策略的数据包,就按照策略中定义的操作进行处理。

四、假设路由器的E0/0口作为内部网络的网关,地址为200.1.1.1,内部网络有一个WEB服务器,地址为200.1.1.100,和 WEB同一网段内有用户电脑一台,在外部网络有一个远程的用户,IP地址为199.1.1.100,允许远程用户能够访问WEB服务器,但不允许访问内部用户的电脑。

配置:

1、Router(config)#interface Ethernet0/0;

2、Router(config-if)#ip address 200.1.1.1 255.255.255.0;

3、Router(config-if)#exit;

4、Router(config)#interface Ethernet0/1;

5、Router(config-if)#ip address 199.1.1.1 255.255.255.0;

6、Router(config-if)#exit。

测试:

1、Router#ping 200.1.1.100;

2、Type escape sequence to abort.;

3、Sending 5, 100-byte ICMP Echos to 200.1.1.100, timeout is 2 seconds;

4、!!!!!;

5、Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms;

6、Router #ping 200.1.1.10;

7、Type escape sequence to abort;

8、Sending 5, 100-byte ICMP Echos to 200.1.1.10, timeout is 2 seconds;

9、!!!!!;

10、Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms;

11、Router #ping 199.1.1.100;

12、Type escape sequence to abort;

13、Sending 5, 100-byte ICMP Echos to 199.1.1.100, timeout is 2 seconds;

14、!!!!!;

15、Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms。

ACL:

Router(config)#access-list 100 permit ip host 199.1.1.1 host 200.1.1.10。

null0接口:

1、Router(config)#interface null 0;

2、Router(config-if)#no ip unreachables。

映射:

1、Router(config)#route-map pbr;

2、Router(config- route-map)#match ip address 100;

3、Router(config- route-map)#set interface null 0。

在E0/1接口上打开NETFLOW交换功能,并在该接口上调用PBR:

1、Router(config)#interface Ethernet0/1;

2、Router(config-if)#ip route-cache flow;

3、Router(config-if)# ip policy route-map pbr ;

4、Router(config-if)#exit。

连通性测试:

1、C:\>ping 200.1.1.100;

2、Pinging 200.1.1.100 with 32 bytes of data;

3、Reply from 200.1.1.100: bytes=32 time<1ms TTL=128;

4、Reply from 200.1.1.100: bytes=32 time<1ms TTL=128;

5、Reply from 200.1.1.100: bytes=32 time<1ms TTL=128;

6、Reply from 200.1.1.100: bytes=32 time<1ms TTL=128;

7、Ping statistics for 200.1.1.100;

8、Packets: Sent = 4, Received = 4, Lost = 0 (0% loss);

9、Approximate round trip times in milli-seconds;

10、Minimum = 0ms, Maximum = 0ms, Average = 0ms;

11、C:\>ping 200.1.1.10;

12、Pinging 200.1.1.10 with 32 bytes of data;

13、Request timed out;

14、Request timed out;

15、Request timed out;

16、Request timed out;

17、Ping statistics for 200.1.1.10;

18、Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)。

这时外网的远程用户已经无法ping通内部的用户了,但是还是可以ping通WEB服务器,我们目的也达到了。

责任编辑:遗忘者 来源: IT专家网
相关推荐

2011-08-05 08:53:26

路由器CSUDSU

2010-04-16 12:42:44

无线路由器故障

2010-09-06 10:24:31

无线路由器掉线问题

2013-03-01 15:25:56

路由器网络设备故障备分设备数据

2012-11-12 11:33:06

路由器组网H3C

2013-01-21 09:27:26

华为路由器路由设置

2011-08-10 10:39:47

路由器路由器故障

2012-12-04 09:41:40

2012-12-24 09:31:05

2010-08-11 15:44:26

无线路由器掉线

2010-08-17 08:55:11

无线路由器掉线问题

2009-11-09 16:30:11

路由器故障

2009-11-16 15:51:39

3Com路由器

2018-10-16 09:28:43

网站服务器故障

2010-08-25 14:10:34

2011-10-26 10:39:54

2009-11-23 10:19:54

路由器故障

2009-12-22 15:18:10

2009-02-06 09:52:00

路由器启动故障

2011-04-08 18:05:31

点赞
收藏

51CTO技术栈公众号