GNS3 模拟icmp禁止不可达

R1 :

conf t

int f0/0

no shutdown

ip add 192.168.1.1 255.255.255.0

no ip routing

end

 

R2 f0/0:

conf t

int f0/0

no shutdown

ip add 192.168.1.254 255.255.255.0

end

 

R2 f1/0:

conf t

int f0/0

no shutdown

ip add 192.168.2.254 255.255.255.0

end

 配置路由禁止:

conf t

access-list 1 deny any

int f0/0

ip access-group 1 in

end

 

R3 :

conf t

int f0/0

no shutdown

ip add 192.168.2.1 255.255.255.0

no ip routing

end

 

在R1里面添加 ip route 0.0.0.0 0.0.0.0 192.168.1.254映射从R1的路由表,然后ping 192.168.2.1

 

posted @ 2016-01-13 20:27  QQ76211822  阅读(230)  评论(0编辑  收藏  举报