r1(config-router)#distribute-list 1 in f0/0
r1(config-router)#
set up the distribute-list first, then set up the acl to inhibit/allow routes...
r1(config)#do sh ip route ospf
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 192.168.1.2, 00:00:06, FastEthernet0/0
10.0.0.0/32 is subnetted, 1 subnets
O 10.1.1.1 [110/2] via 192.168.1.2, 00:00:06, FastEthernet0/0
r1(config)#no access-list 1
r1(config)#access-list 1 deny 2.2.2.0 0.0.0.255
r1(config)#access-list 1 permit 10.1.1.0 0.0.0.255
r1(config)#end
r1#sh ip route ospf
Gateway of last resort is not set
10.0.0.0/32 is subnetted, 1 subnets
O 10.1.1.1 [110/2] via 192.168.1.2, 00:00:37, FastEthernet0/0
it's very exciting... note how you set up the interface in router configuration mode... of course if you don't permit something, you'll deny everything...
you know the drill...
No comments:
Post a Comment