Monday, 25 January 2016

Redstribute stactic route with tag


scenario: Redistribute static route with tag is very useful in many scenario. The above diagram shows one.There are four routers in  the picture. Router R1,R2 & R3 are running EIGRP routing protocol to advertise their network.But router R1 & R2 are exchanging static route to advertise their network.Router R1 having three more static route to other network. We want to advertise only single network i.e. 12.12.12.0/24 " to other two routers(R2 & R3) from R1. The following configuration defining the scenario. The route distribution using TAG is done on router R1.

R1

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
ip tcp synwait-time 5
!
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.10.10.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 11.11.11.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet2/0
ip address 9.9.9.1 255.255.255.252
 shutdown
 duplex auto
 speed auto
!
router eigrp 100
 redistribute static route-map san
 network 5.0.0.0
 network 10.0.0.0
 no auto-summary
!
no ip http server
no ip http secure-server
!
ip route 12.12.12.0 255.255.255.0 11.11.11.1 tag 20
ip route 19.19.19.0 255.255.255.0 9.9.9.1
ip route 20.20.20.0 255.255.255.0 9.9.9.1
ip route 21.21.21.0 255.255.255.0 9.9.9.1

!
!
no cdp log mismatch duplex
!
route-map san permit 1
 match tag 20
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

R2
 version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
!
ip tcp synwait-time 5
!
!
interface FastEthernet0/0
 ip address 10.10.10.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 10.10.10.5 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
router eigrp 100
 network 10.0.0.0
 no auto-summary
!
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

 R3
 !
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
!
ip tcp synwait-time 5
!
!
interface Loopback0
 ip address 6.6.6.6 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 10.10.10.6 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
router eigrp 100
 network 6.0.0.0
 network 10.0.0.0
 no auto-summary
!
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

 R4

 !version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
archive
 log config
  hidekeys
!
!
ip tcp synwait-time 5
ip ssh version 1
!
interface Loopback0
 ip address 12.12.12.12 255.255.255.0
!
interface FastEthernet0/0
 ip address 11.11.11.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 11.11.11.2
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end


The out put of show ip route at router R4 shown below.