Monday, 10 April 2017

No-Export Community configuration example -BGP



BGP has few well known community and No-export is one of them. In IGP we uses Tagging to identity perticular routes but in bgp there is no tagging but in BGP we have Communities. 

Community is very much similar to tagging which can be set on a router and send to the neighbor routers. Neighbor routers can match these community to apply policies.

Routes which are learn with no-Export community are not sent further to any eBGP neighbors and can be send to iBGP neighbors only as shown in above diagram.

R1:-

interface Loopback0
 ip address 1.1.1.1 255.255.255.255

interface FastEthernet2/0
Description “ Connected to R2”
 ip address 12.12.12.1 255.255.255.0
 no shut

router bgp 1
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 12.12.12.2 remote-as 2
 neighbor 12.12.12.2 send-community both  --<< Without it Community will not send to neighbor
 neighbor 12.12.12.2 route-map setCommunity out
 no auto-summary

route-map setCommunity permit 10
 set community no-export  -<< Set the no export community to all R1 Routes 

R2:-

interface Loopback0
 ip address 2.2.2.2 255.255.255.255

interface FastEthernet0/0
 ip address 23.23.23.2 255.255.255.0
 speed auto
 duplex auto

interface FastEthernet1/0
Description “Connected to R5”
 ip address 25.25.25.2 255.255.255.0
no shut

interface FastEthernet2/0
Description “Connected to R1”
 ip address 12.12.12.2 255.255.255.0
no shut

Router eigrp 2    ----<< To provide connectivity between AS2 Routers
 network 23.23.23.2 0.0.0.0

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 2.2.2.2 mask 255.255.255.255
 neighbor 12.12.12.1 remote-as 1
 neighbor 23.23.23.3 remote-as 2
 neighbor 23.23.23.3 next-hop-self
 neighbor 23.23.23.3 send-community both
 neighbor 25.25.25.5 remote-as 3
 no auto-summary

R3:-

interface Loopback0
 ip address 3.3.3.3 255.255.255.255

interface FastEthernet0/1
Description “Connected to R4”
 ip address 34.34.34.3 255.255.255.0
 no shut


interface FastEthernet0/0
Description “Connected to R3”
 ip address 23.23.23.3 255.255.255.0
no shut

router eigrp 2
 network 23.23.23.3 0.0.0.0
 network 34.34.34.3 0.0.0.0

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 3.3.3.3 mask 255.255.255.255
 neighbor 23.23.23.2 remote-as 2
 neighbor 23.23.23.2 route-reflector-client  --<< R3 is RR for R2 and R4
 neighbor 34.34.34.4 remote-as 2
 neighbor 34.34.34.4 route-reflector-client --<< R3 is RR for R2 and R4
 neighbor 34.34.34.4 send-community both
 no auto-summary

R4:-

interface Loopback0
 ip address 4.4.4.4 255.255.255.255

interface FastEthernet0/1
Description “Connected to R4”
 ip address 34.34.34.4 255.255.255.0

router eigrp 2
 network 34.34.34.4 0.0.0.0
!
router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 4.4.4.4 mask 255.255.255.255
 neighbor 34.34.34.3 remote-as 2
 no auto-summary

R5:-

interface Loopback0
 ip address 5.5.5.5 255.255.255.255

interface FastEthernet1/0
Description “Connected to R2”
 ip address 25.25.25.5 255.255.255.0

router bgp 3
 no synchronization
 bgp log-neighbor-changes
 network 5.5.5.5 mask 255.255.255.255
 neighbor 25.25.25.2 remote-as 2
 no auto-summary

Verification:-

R1:-

R1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [20/0] via 12.12.12.2, 02:33:00
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [20/0] via 12.12.12.2, 01:38:37
      4.0.0.0/32 is subnetted, 1 subnets
B        4.4.4.4 [20/0] via 12.12.12.2, 01:31:59
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [20/0] via 12.12.12.2, 01:28:17
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet2/0
L        12.12.12.1/32 is directly connected, FastEthernet2/0

R1#sh ip bgp
BGP table version is 10, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       0.0.0.0                  0         32768 i
*> 2.2.2.2/32       12.12.12.2               0             0 2 i
*> 3.3.3.3/32       12.12.12.2                             0 2 i
*> 4.4.4.4/32       12.12.12.2                             0 2 i
*> 5.5.5.5/32       12.12.12.2                             0 2 3 i

R2:-

R2#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [20/0] via 12.12.12.1, 01:22:32
      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [200/0] via 23.23.23.3, 01:39:19
      4.0.0.0/32 is subnetted, 1 subnets
B        4.4.4.4 [200/0] via 34.34.34.4, 01:32:11
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [20/0] via 25.25.25.5, 01:28:29
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet2/0
L        12.12.12.2/32 is directly connected, FastEthernet2/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/0
L        23.23.23.2/32 is directly connected, FastEthernet0/0
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.2/32 is directly connected, FastEthernet1/0
      34.0.0.0/24 is subnetted, 1 subnets
D        34.34.34.0 [90/30720] via 23.23.23.3, 01:32:16, FastEthernet0/0

R2#sh ip bgp
BGP table version is 11, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       12.12.12.1               0             0 1 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*>i3.3.3.3/32       23.23.23.3               0    100      0 i
*>i4.4.4.4/32       34.34.34.4               0    100      0 i
*> 5.5.5.5/32       25.25.25.5               0             0 3 i

R2#sh ip bgp 1.1.1.1/32
BGP routing table entry for 1.1.1.1/32, version 11
Paths: (1 available, best #1, table default, not advertised to EBGP peer)
  Advertised to update-groups:
     5
  1
    12.12.12.1 from 12.12.12.1 (1.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Community: no-export --<<< Learning Community which is set on R1

R3:-

R3#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [200/0] via 23.23.23.2, 05:39:39
      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [200/0] via 23.23.23.2, 05:49:37
      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback0
      4.0.0.0/32 is subnetted, 1 subnets
B        4.4.4.4 [200/0] via 34.34.34.4, 05:49:37
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [200/0] via 23.23.23.2, 05:45:36
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/0
L        23.23.23.3/32 is directly connected, FastEthernet0/0
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet0/1
L        34.34.34.3/32 is directly connected, FastEthernet0/1

R3#sh ip bgp
BGP table version is 13, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       23.23.23.2               0    100      0 1 i
*>i2.2.2.2/32       23.23.23.2               0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
*>i4.4.4.4/32       34.34.34.4               0    100      0 i
*>i5.5.5.5/32       23.23.23.2               0    100      0 3 i

R3#sh ip bgp 1.1.1.1/32
BGP routing table entry for 1.1.1.1/32, version 13
Paths: (1 available, best #1, table default, not advertised to EBGP peer)
  Advertised to update-groups:
     3
  1, (Received from a RR-client)
    23.23.23.2 from 23.23.23.2 (2.2.2.2)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Community: no-export

R4:-

R4#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [200/0] via 23.23.23.2, 05:40:19
      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [200/0] via 23.23.23.2, 05:49:25
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [200/0] via 34.34.34.3, 05:56:59
      4.0.0.0/32 is subnetted, 1 subnets
C        4.4.4.4 is directly connected, Loopback0
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [200/0] via 23.23.23.2, 05:46:16
      23.0.0.0/24 is subnetted, 1 subnets
D        23.23.23.0 [90/30720] via 34.34.34.3, 05:49:30, FastEthernet0/1
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet0/1
L        34.34.34.4/32 is directly connected, FastEthernet0/1
      45.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        45.45.45.0/24 is directly connected, FastEthernet2/0
L        45.45.45.4/32 is directly connected, FastEthernet2/0

R4#sh ip bgp
BGP table version is 12, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       23.23.23.2               0    100      0 1 i
*>i2.2.2.2/32       23.23.23.2               0    100      0 i
*>i3.3.3.3/32       34.34.34.3               0    100      0 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
*>i5.5.5.5/32       23.23.23.2               0    100      0 3 i

R4#sh ip bgp 1.1.1.1/32
BGP routing table entry for 1.1.1.1/32, version 12
Paths: (1 available, best #1, table default, not advertised to EBGP peer)
  Not advertised to any peer
  1
    23.23.23.2 (metric 30720) from 34.34.34.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Community: no-export
      Originator: 2.2.2.2, Cluster list: 3.3.3.3

R5:-

R5#sh ip bgp --<<< No R1 Route advertised from R2 to R5
BGP table version is 7, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       25.25.25.2               0             0 2 i
*> 3.3.3.3/32       25.25.25.2                             0 2 i
*> 4.4.4.4/32       25.25.25.2                             0 2 i
*> 5.5.5.5/32       0.0.0.0                  0         32768 i

R5#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets --<<< No R1 Route advertised from R2 to R5
B        2.2.2.2 [20/0] via 25.25.25.2, 01:30:55
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [20/0] via 25.25.25.2, 01:30:55
      4.0.0.0/32 is subnetted, 1 subnets
B        4.4.4.4 [20/0] via 25.25.25.2, 01:30:55
      5.0.0.0/32 is subnetted, 1 subnets
C        5.5.5.5 is directly connected, Loopback0
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.5/32 is directly connected, FastEthernet1/0



Wednesday, 5 April 2017

PBR configuration Example.

Below is the configuration example of policy based routing.

Routing is done only based on destination but PBR is the method by which routing can be done based on the source as well.

In below example we want that Traffic from PC1 to PC2 must go via R2 and Traffic between PC3 and PC4 will go via Direct connectivity between R1 and R3.

Without PBR R1 will always choose direct link to R3 based on the lowest metric. We manipulated it by configuring PBR to send traffic coming from PC1 and destined to PC2 via R2. 

All other trafic will chose the shortest method.








PC1:-

PC1> show ip

NAME        : PC1[1]
IP/MASK     : 10.1.1.10/24
GATEWAY     : 10.1.1.1
DNS         :
MAC         : 00:50:79:66:68:00
LPORT       : 10005
RHOST:PORT  : 127.0.0.1:10004
MTU:        : 1500

PC3:-

PC3> show ip

NAME        : PC3[1]
IP/MASK     : 30.1.1.10/24
GATEWAY     : 30.1.1.1
DNS         :
MAC         : 00:50:79:66:68:02
LPORT       : 10011
RHOST:PORT  : 127.0.0.1:10010
MTU:        : 1500

R1:-

interface FastEthernet0/0
Description “Connected to R2”
 ip address 12.12.12.1 255.255.255.0
 no shut

interface FastEthernet1/0
Description “Connected to R3”
 ip address 13.13.13.1 255.255.255.0
 no shut

interface FastEthernet2/0
Description “Connected to PC1”
 ip address 10.1.1.1 255.255.255.0
 ip policy route-map PC1_PC2_route
 no shut

interface FastEthernet3/0
Description “Connected to PC3”
 ip address 30.1.1.1 255.255.255.0
 speed auto
 duplex auto

router eigrp 10
 network 10.1.1.1 0.0.0.0
 network 12.12.12.1 0.0.0.0
 network 13.13.13.1 0.0.0.0
 network 30.1.1.1 0.0.0.0

ip access-list extended PC1_PC2_route
 permit ip host 10.1.1.10 host 20.1.1.10

route-map PC1_PC2_route permit 10
 match ip address PC1_PC2_route
 set ip next-hop 12.12.12.2

R2:-

interface FastEthernet0/0
Description “Connected to R1”
 ip address 12.12.12.2 255.255.255.0
 no shut

interface FastEthernet0/1
Description “Connected to R3”
 ip address 23.23.23.2 255.255.255.0
no shut

router eigrp 10
 network 12.12.12.2 0.0.0.0
network 23.23.23.2 0.0.0.0

R3:-

interface FastEthernet0/1
Description “Connected to R2”
 ip address 23.23.23.3 255.255.255.0
no shut

interface FastEthernet1/0
Description “Connected to R1”
 ip address 13.13.13.3 255.255.255.0
no shut

interface FastEthernet2/0
Description “Connected to PC2”
 ip address 20.1.1.1 255.255.255.0
 ip policy route-map PC1_PC2_route
no shut

interface FastEthernet3/0
Description “Connected to PC4”
 ip address 40.1.1.1 255.255.255.0
no shut

router eigrp 10
 network 13.13.13.3 0.0.0.0
 network 20.1.1.1 0.0.0.0
 network 23.23.23.3 0.0.0.0
 network 40.1.1.1 0.0.0.0

ip access-list extended PC1_PC2_route
 permit ip host 20.1.1.10 host 10.1.1.10

route-map PC1_PC2_route permit 10
 match ip address PC1_PC2_route
 set ip next-hop 23.23.23.2


PC2:-

PC2> show ip

NAME        : PC2[1]
IP/MASK     : 20.1.1.10/24
GATEWAY     : 20.1.1.1
DNS         :
MAC         : 00:50:79:66:68:01
LPORT       : 10007
RHOST:PORT  : 127.0.0.1:10006
MTU:        : 1500

PC4:-

Verification:-

PC1:-

PC1> trace 20.1.1.10
trace to 20.1.1.10, 8 hops max, press Ctrl+C to stop
 1   10.1.1.1   15.600 ms  15.600 ms  15.600 ms
 2   12.12.12.2   46.801 ms  46.800 ms  46.800 ms  --<< Going Via R2
 3   23.23.23.3   62.401 ms  62.400 ms  62.401 ms
 4   *20.1.1.10   93.600 ms (ICMP type:3, code:3, Destination port unreachable)

PC1> trace 40.1.1.10
trace to 40.1.1.10, 8 hops max, press Ctrl+C to stop
 1   10.1.1.1   15.600 ms  15.600 ms  15.600 ms
 2   13.13.13.3   46.801 ms  31.200 ms  46.800 ms --<< Going Via R3
 3   *40.1.1.10   93.601 ms (ICMP type:3, code:3, Destination port unreachable)


PC3:-

PC3> trace 20.1.1.10
trace to 20.1.1.10, 8 hops max, press Ctrl+C to stop
 1   30.1.1.1   15.600 ms  15.600 ms  15.600 ms
 2   13.13.13.3   31.200 ms  31.200 ms  46.801 ms
 3   *20.1.1.10   62.400 ms (ICMP type:3, code:3, Destination port unreachable)

PC3> trace 40.1.1.10
trace to 40.1.1.10, 8 hops max, press Ctrl+C to stop
 1   30.1.1.1   15.600 ms  15.601 ms  15.600 ms
 2   13.13.13.3   46.800 ms  31.200 ms  46.801 ms
 3   *40.1.1.10   46.800 ms (ICMP type:3, code:3, Destination port unreachable)

R1:-

R1#sh ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(10)
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   13.13.13.3              Fa1/0             14 05:00:31   38   228  0  23
0   12.12.12.2              Fa0/0             11 05:03:24   55   330  0  23

R1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, FastEthernet2/0
L        10.1.1.1/32 is directly connected, FastEthernet2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.1/32 is directly connected, FastEthernet0/0
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.13.13.0/24 is directly connected, FastEthernet1/0
L        13.13.13.1/32 is directly connected, FastEthernet1/0
      20.0.0.0/24 is subnetted, 1 subnets
D        20.1.1.0 [90/30720] via 13.13.13.3, 04:24:59, FastEthernet1/0
      23.0.0.0/24 is subnetted, 1 subnets
D        23.23.23.0 [90/30720] via 13.13.13.3, 05:00:47, FastEthernet1/0
                    [90/30720] via 12.12.12.2, 05:00:47, FastEthernet0/0
      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        30.1.1.0/24 is directly connected, FastEthernet3/0
L        30.1.1.1/32 is directly connected, FastEthernet3/0
      40.0.0.0/24 is subnetted, 1 subnets
D        40.1.1.0 [90/30720] via 13.13.13.3, 05:00:35, FastEthernet1/0

R2:-
R2# sh ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(10)
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.23.23.3              Fa0/1             11 05:01:39   34   204  0  24
0   12.12.12.1              Fa0/0             13 05:04:26  246  1476  0  22

R2#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/24 is subnetted, 1 subnets
D        10.1.1.0 [90/30720] via 12.12.12.1, 05:01:33, FastEthernet0/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.2/32 is directly connected, FastEthernet0/0
      13.0.0.0/24 is subnetted, 1 subnets
D        13.13.13.0 [90/30720] via 23.23.23.3, 05:01:35, FastEthernet0/1
                    [90/30720] via 12.12.12.1, 05:01:35, FastEthernet0/0
      20.0.0.0/24 is subnetted, 1 subnets
D        20.1.1.0 [90/30720] via 23.23.23.3, 04:25:45, FastEthernet0/1
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/1
L        23.23.23.2/32 is directly connected, FastEthernet0/1
      30.0.0.0/24 is subnetted, 1 subnets
D        30.1.1.0 [90/30720] via 12.12.12.1, 04:39:35, FastEthernet0/0
      40.0.0.0/24 is subnetted, 1 subnets
D        40.1.1.0 [90/30720] via 23.23.23.3, 05:01:21, FastEthernet0/1

R3:-

R3#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/24 is subnetted, 1 subnets
D        10.1.1.0 [90/30720] via 13.13.13.1, 05:07:18, FastEthernet1/0
      12.0.0.0/24 is subnetted, 1 subnets
D        12.12.12.0 [90/30720] via 23.23.23.2, 05:07:18, FastEthernet0/1
                    [90/30720] via 13.13.13.1, 05:07:18, FastEthernet1/0
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.13.13.0/24 is directly connected, FastEthernet1/0
L        13.13.13.3/32 is directly connected, FastEthernet1/0
      20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        20.1.1.0/24 is directly connected, FastEthernet2/0
L        20.1.1.1/32 is directly connected, FastEthernet2/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/1
L        23.23.23.3/32 is directly connected, FastEthernet0/1
      30.0.0.0/24 is subnetted, 1 subnets
D        30.1.1.0 [90/30720] via 13.13.13.1, 04:45:20, FastEthernet1/0
      40.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        40.1.1.0/24 is directly connected, FastEthernet3/0
L        40.1.1.1/32 is directly connected, FastEthernet3/0

PC2:-


PC2> trace 10.1.1.10
trace to 10.1.1.10, 8 hops max, press Ctrl+C to stop
 1   20.1.1.1   15.600 ms  15.600 ms  15.600 ms
 2   23.23.23.2   31.200 ms  46.800 ms  46.801 ms
 3   12.12.12.1   46.800 ms  31.200 ms  46.801 ms
 4   *10.1.1.10   62.400 ms (ICMP type:3, code:3, Destination port unreachable)

PC2> trace 30.1.1.10
trace to 30.1.1.10, 8 hops max, press Ctrl+C to stop
 1   20.1.1.1   15.600 ms  15.600 ms  15.600 ms
 2   13.13.13.1   46.801 ms  46.800 ms  46.800 ms
 3   *30.1.1.10   62.401 ms (ICMP type:3, code:3, Destination port unreachable)

PC4:-

PC4> trace 10.1.1.10
trace to 10.1.1.10, 8 hops max, press Ctrl+C to stop
 1   40.1.1.1   15.600 ms  15.600 ms  15.600 ms
 2   13.13.13.1   46.801 ms  46.800 ms  46.800 ms
 3   *10.1.1.10   46.800 ms (ICMP type:3, code:3, Destination port unreachable)

PC4> trace 30.1.1.10
trace to 30.1.1.10, 8 hops max, press Ctrl+C to stop
 1   40.1.1.1   15.600 ms  15.600 ms  15.601 ms
 2   13.13.13.1   46.800 ms  31.200 ms  46.801 ms
 3   *30.1.1.10   46.800 ms (ICMP type:3, code:3, Destination port unreachable)




Saturday, 1 April 2017

Static route configuration with Track





R1:-

interface FastEthernet0/0
 ip address 12.12.12.1 255.255.255.0
no shut

ip route 0.0.0.0 0.0.0.0 12.12.12.2 track 10

ip sla 10
 icmp-echo 12.12.12.2
ip sla schedule 10 life forever start-time now


track 10 ip sla 10 reachability

R2:-

interface FastEthernet0/0
 ip address 12.12.12.2 255.255.255.0
no shut

verification:-

R1# show track 10
Track 10
  IP SLA 10 reachability
  Reachability is Up
    4 changes, last change 00:02:43
  Latest operation return code: OK
  Latest RTT (millisecs) 18
  Tracked by:
    STATIC-IP-ROUTING 0
R1#

R1#sh ip sla statistics

Round Trip Time (RTT) for       Index 10
Type of operation: icmp-echo

R1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is 12.12.12.2 to network 0.0.0.0

S*    0.0.0.0/0 [1/0] via 12.12.12.2
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.1/32 is directly connected, FastEthernet0/0
R1#
        Latest RTT: 32 ms
Latest operation start time: *14:58:56.863 UTC Sat Apr 1 2017
Latest operation return code: OK
Number of successes: 5
Number of failures: 3
Operation time to live: Forever

R1#sh ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "static", distance 1, metric 0, candidate default path
  Routing Descriptor Blocks:
  * 12.12.12.2
      Route metric is 0, traffic share count is 1
R1#

Test1:- Remove Ip from R2

R2(config)#int fa0/0
R2(config-if)#no ip add
R2(config-if)#

Verification:-


R1# show track 10
*Apr  1 15:01:04.151: %TRACKING-5-STATE: 10 ip sla 10 reachability Up->Down
R1# show track 10
Track 10
  IP SLA 10 reachability
  Reachability is Down
    5 changes, last change 00:00:10
  Latest operation return code: Timeout
  Tracked by:

R1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.1/32 is directly connected, FastEthernet0/0

R1#