Home > Articles > Cisco Network Technology > IP Communications/VoIP > Cisco OSPF Route Redistribution

Cisco OSPF Route Redistribution

Configuration Example 9: Modifying the Tag Value of Redistributed Routes Using a Route Map

Modify the configuration on Router B (see Figure 14-3) to set the tag value for the classless routes to 1 and the classful routes to 2.

Router B
router ospf 1
 redistribute eigrp 1 subnets route-map control-eigrp
 network 10.1.1.0 0.0.0.3 area 0
!
access-list 1 permit 6.0.0.0 0.15.255.255
access-list 1 permit 146.6.0.0 0.0.15.255
access-list 1 permit 206.6.6.0 0.0.0.15
access-list 1 permit 10.1.1.4 0.0.0.3
route-map control-eigrp permit 10
 match ip address 1
 set metric 200
 set tag 1
!
route-map control-eigrp permit 20
 set metric 100
 set metric-type type-1
 set tag 2

Verification

Verify that the tags have been set on the redistributed EIGRP routes.

rtrB#show ip ospf database external 5.0.0.0
    OSPF Router with ID (2.2.2.2) (Process ID 1)
        Type-5 AS External Link States
 LS age: 164
 Options: (No TOS-capability, DC)
 LS Type: AS External Link
 Link State ID: 5.0.0.0 (External Network Number )
 Advertising Router: 2.2.2.2
 LS Seq Number: 80000007
 Checksum: 0x2299
 Length: 36
 Network Mask: /8
    Metric Type: 1 (Comparable directly to link state metric)
    TOS: 0
    Metric: 100
    Forward Address: 0.0.0.0
    External Route Tag: 2
rtrA#show ip route 206.6.6.0 255.255.255.240
Routing entry for 206.6.6.0/28
 Known via "ospf 1", distance 110, metric 200
 Tag 1, type extern 2, forward metric 1562
 Last update from 10.1.1.2 on Serial0/1, 00:04:40 ago
 Routing Descriptor Blocks:
 * 10.1.1.2, from 2.2.2.2, 00:04:40 ago, via Serial0/1
   Route metric is 200, traffic share count is 1
10. Configuration Example 10: Controlling Route Redistribution Based on Tag Values | Next Section Previous Section