Pages

Friday, January 15, 2010

Route-map and Tags

Network Diagram



In this lab, we'll learn how to control redistribution base on the tag. Setup your network as topology, addressing and routing protocol above. Make sure everything working correctly.

Create route-map and set tag using ACL.

filter the traffic we want to control using ACL, in this case we gonna create an ACL group of classless network coming from router C, done on router B

ip access-list standard CLASSLESS
 permit 10.1.1.4 0.0.0.3
 permit 6.0.0.0 0.15.255.255
 permit 146.6.0.0 0.0.15.255
 permit 206.6.6.0 0.0.0.15

create a route-map and set the specific tags

route-map SET_TAGS permit 10
 match ip address CLASSLESS
 set tag 1
!
route-map SET_TAGS permit 20
 set tag 2 //we didn't set ant match, anything don't match ant from above will fall under this group

now apply this route-map to be redistribute into OSPF 1


router ospf 1
 log-adjacency-changes
 redistribute eigrp 1 subnets route-map SET_TAGS
 network 10.1.1.2 0.0.0.0 area 0

show ip route from router A should now show all the network coming from router C

A>sh ip rou
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
O E2 205.5.5.0/24 [110/20] via 10.1.1.2, 00:30:59, Serial0/1
     206.6.6.0/28 is subnetted, 1 subnets
O E2    206.6.6.0 [110/20] via 10.1.1.2, 00:30:59, Serial0/1
O E2 5.0.0.0/8 [110/20] via 10.1.1.2, 00:30:59, Serial0/1
     6.0.0.0/12 is subnetted, 1 subnets
O E2    6.0.0.0 [110/20] via 10.1.1.2, 00:30:59, Serial0/1
O E2 145.5.0.0/16 [110/20] via 10.1.1.2, 00:30:59, Serial0/1
     10.0.0.0/30 is subnetted, 3 subnets
C       10.1.1.8 is directly connected, Serial0/0
C       10.1.1.0 is directly connected, Serial0/1
O E2    10.1.1.4 [110/20] via 10.1.1.2, 00:30:59, Serial0/1
     146.6.0.0/20 is subnetted, 1 subnets
O E2    146.6.0.0 [110/20] via 10.1.1.2, 00:30:59, Serial0/1

now apply redistribution into RIP from OSPF on Router A

router rip
 version 2
 redistribute ospf 1 metric 1
 passive-interface Serial0/1
 network 10.0.0.0
 no auto-summary


D>sh ip rou
R    205.5.5.0/24 [120/1] via 10.1.1.9, 00:00:15, Serial0/1
     206.6.6.0/28 is subnetted, 1 subnets
R       206.6.6.0 [120/1] via 10.1.1.9, 00:00:15, Serial0/1
R    5.0.0.0/8 [120/1] via 10.1.1.9, 00:00:15, Serial0/1
     6.0.0.0/12 is subnetted, 1 subnets
R       6.0.0.0 [120/1] via 10.1.1.9, 00:00:15, Serial0/1
R    145.5.0.0/16 [120/1] via 10.1.1.9, 00:00:15, Serial0/1
     10.0.0.0/30 is subnetted, 3 subnets
C       10.1.1.8 is directly connected, Serial0/1
R       10.1.1.0 [120/1] via 10.1.1.9, 00:00:15, Serial0/1
R       10.1.1.4 [120/1] via 10.1.1.9, 00:00:15, Serial0/1
     146.6.0.0/20 is subnetted, 1 subnets
R       146.6.0.0 [120/1] via 10.1.1.9, 00:00:15, Serial0/1


we already set on router B to tag all the classless network into tag 1, and the rest to tag 2 and allow both of the tag to be redistribute from EIGRP 1 to OSPF 1 and from OSPF 1 to RIP. Now we want tag 1 only to be redistribute from OSPF to RIP.

create a route-map to match tag 1 only on router A

route-map CHECK_TAG permit 10
 match tag 1

apply on the RIP

router rip
 version 2
 redistribute ospf 1 metric 1 route-map CHECK_TAG
 passive-interface Serial0/1
 network 10.0.0.0
 no auto-summary


D>sh ip rou
     206.6.6.0/28 is subnetted, 1 subnets
R       206.6.6.0 [120/1] via 10.1.1.9, 00:00:10, Serial0/1
     6.0.0.0/12 is subnetted, 1 subnets
R       6.0.0.0 [120/1] via 10.1.1.9, 00:00:10, Serial0/1
     10.0.0.0/30 is subnetted, 3 subnets
C       10.1.1.8 is directly connected, Serial0/1
R       10.1.1.0 [120/1] via 10.1.1.9, 00:00:10, Serial0/1
R       10.1.1.4 [120/1] via 10.1.1.9, 00:00:10, Serial0/1
     146.6.0.0/20 is subnetted, 1 subnets
R       146.6.0.0 [120/1] via 10.1.1.9, 00:00:10, Serial0/1

notice, only tag 1, which is classless network only on the routing table

Below is the final configuration for all the routers

Router A conf
Router B conf
Router C conf
Router D conf

1 comment: