uRPF实验

发布时间:2020-07-02 11:54:04 作者:墨鱼排骨汤
来源:网络 阅读:1017

uRPF实验

  实验要求:

1.R1和R3上添加默认路由,R2先不添加静态.在R1上分别以Fa0/0和Lo0接口为源ping R3;观察现象,思考原因.

2.在R2上启用uRPF;

3.在R1上用 Lo0接口为源ping R3,测试连通性, 分析与1的现象的不同. 思考uRPF的工作原理.

4.在R2上添加一条默认路由,指向R1,测试连通性, 如果希望ping通,应当如何解决。思考uRPF与默认路由的关系.

5.思考uRPF的严格模式和宽松模式。

  其他:

1.CEF与uRPF

2.启用uRPF的情况下,怎样ping 自己?

3.对某写流量不做uRPF, 如何做?

#############################################

基本配置:

R1的配置

R1(config)#int f0/0

R1(config-if)#ip add 12.1.1.1 255.255.255.0

R1(config-if)#no sh

R1(config)#int lo 0

R1(config-if)#ip add 1.1.1.1 255.255.255.0

R2的配置

R2(config)#int f0/0

R2(config-if)#ip add 12.1.1.2 255.255.255.0

R2(config-if)#no sh

R2(config)#int s1/0

R2(config-if)#ip add 23.1.1.2 255.255.255.0

R2(config-if)#no sh

R3的配置

R3(config)#int s1/0

R3(config-if)#ip add 23.1.1.3 255.255.255.0

R3(config-if)#no sh

实验一:

R1(config)#ip route 0.0.0.0 0.0.0.0 12.1.1.2 // 以太网口默认路由写下一跳

R3(config)#ip route 0.0.0.0 0.0.0.0 s1/0  // 串口无所谓

实验现象:

R1#ping 23.1.1.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 23.1.1.3, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 52/59/68 ms

R1#ping 23.1.1.3 so lo 0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 23.1.1.3, timeout is 2 seconds:

Packet sent with a source address of 1.1.1.1 

.....

Success rate is 0 percent (0/5)

pingR3的包,如果源是12.1.1.1,R2能到达;如果源是1.1.1.1,回包的时候R2没有条目不能到达

实验二:

R2(config)#ip cef  // 必须开启;默认开启

R2(config)#int f0/0

R2(config-if)#ip verify unicast source reachable-via any // 启用uRPF松散模式

这时候pingR3的包现象同上,但是去R3的包因为R2没有条目而直接丢弃

实验四:

R2(config)#int f0/0

R2(config-if)#ip verify unicast source reachable-via any // 启用uRPF松散模式

R1#ping 23.1.1.3 so lo 0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 23.1.1.3, timeout is 2 seconds:

Packet sent with a source address of 1.1.1.1 

.....

Success rate is 0 percent (0/5)

R2(config-if)#ip verify unicast source reachable-via any allow-default // 默认不会通过默认路由检查

R1#ping 23.1.1.3 so lo 0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 23.1.1.3, timeout is 2 seconds:

Packet sent with a source address of 1.1.1.1 

.!!!!

Success rate is 0 percent (0/5)

其他:
R2(config-if)#ip verify unicast source reachable-via any allow-default 

R2#ping 12.1.1.2 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:

.....

Success rate is 0 percent (0/5)

R2(config-if)#ip verify unicast source reachable-via any allow-default allow-self-ping

R2#ping 12.1.1.2 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:

!!!!!

Success rate is 0 percent (0/5)

 //启用uRPF后ping自己默认是不通的,除非+allow-self-ping

推荐阅读:
  1. vPC基础实验
  2. Summer School实验

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

urpf rp

上一篇:当把CocoaPods生成的workspace移动到上层目录时

下一篇:C语言怎么用\0字符标志字符串结束

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》