70110">
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服务器,我们目的也达到了。
本文来源:不详 作者:佚名