- Router A
- access-list 1 permit 1.1.1.0 255.255.255.0
- access-list 1 permit 2.2.2.0 255.255.255.0
- access-list 2 permit 3.3.3.0 255.255.255.0
- !
- route-map route-tag permit 10
- match ip address 1
- set tag 111 --tag the 1st two remote sites with 111
- !
- route-map route-tag permit 20
- match ip address 2
- set tag 222 -- tag the 3rd remote site with 222
- !
- route-map route-tag permit 30 -- without this, all other routes will be dropped
- !
- router ospf 1
- redistribute bgp 65001 subnets route-map route-tag -- redistribute ISP routes into IGP
- ...
- ...
- Router B
- route-map tag-filter deny 10
- match tag 111 -- filter off sites with tag 111
- !
- route-map tag-filter permit 20
- match tag 222 --permit only sites with tag 222
- !
- router ospf 2
- distribute-list route-map tag-filter in
To verify, perform the necessary "show ip route" commands on both router A and B to ensure the route entries are in order. Do note that tagging does not work with BGP. The alternative in BGP is to use community string in AA:NN format (e.g. 100:300). For the adverting routers (typically on customer edge), use "set community" in place of "set tag" in the route-map statement. For the recieving routers (typically on provider edge), use "ip community-list" to describe the community string and "match community". For further example on using BGP community, see this Cisco example.
No comments:
Post a Comment