Allied Telesis x908, X8100 manual Examples, Example B Match on a prefix-list that denies an entry

Models: X8100 x908

1 52
Download 52 pages 56.44 Kb
Page 36
Image 36

Examples

Examples

Example A A route map that matches on a prefix-list and sets the route metrics

1.Create a prefix list that matches just 52.0.0.0/8

awplus(config)#ip prefix-list test1 permit 52.0.0.0/8

2.Then, create a route map to match on this prefix-list, and set the metric of matching routes to 665:

awplus(config)#route-map test1 permit 1 awplus(config-route-map)#match ip address prefix-list test1

awplus(config-route-map)#set metric 665

3.Configure the route-map to operate on incoming updates from neighbor 45.45.45.46 awplus(config-router)#neighbor 45.45.45.46 route-map test1 in

Example B Match on a prefix-list that denies an entry

1.Create a prefix list that excludes 52.0.0.0/8, then includes all other routes: awplus(config)#ip prefix-list test2 deny 52.0.0.0/8 awplus(config)#ip prefix-list test2 permit any

2.Create a route map to match on this prefix-list:

awplus(config)#route-map test2 permit 1 awplus(config-route-map)#match ip address prefix-list test2 awplus(config-route-map)#set metric 665

The route map is:

route-map test2, permit, sequence 1 Match clauses:

ip address prefix-list test2 Set clauses:

metric 665

3.Shut down the neighbor, and then bring it up again:

awplus(config-router)#neighbor 45.45.45.46 shutdown awplus(config-router)#neighbor 45.45.45.46 no shutdown

4.Check the route table. This time, the only route learnt from the peer is 45.0.0.0/8, and it still has metric 665. The prefix-list has explicitly matched all routes except 52.0.0.0/8, so all routes except 52.0.0.0/8 have been permitted by the first entry of the route map. Then 52.0.0.0/8 has been denied by the implicit deny-all entry at the end of the route map.

awplus#show ip route

Page 36 Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes

Page 36
Image 36
Allied Telesis x908, X8100 manual Examples, Example B Match on a prefix-list that denies an entry, awplus#show ip route