Showing posts with label troubleshooting. Show all posts
Showing posts with label troubleshooting. Show all posts

Saturday, 8 September 2012

Multicast Troubleshooting relating to RP

We will be using the same topology and config as the previous lab.
But in this lab I will raise the R3 candidate-rp priority value to 1 to make sure R4 is the RP used by all the routers.

R3 Config
ip pim rp-candidate Loopback0 priority 1

R1#show ip pim rp mapping
PIM Group-to-RP Mappings

Group(s) 224.0.0.0/4
  RP 4.4.4.4 (?), v2
    Info source: 2.2.2.2 (?), via bootstrap, priority 0, holdtime 150
         Uptime: 00:32:13, expires: 00:01:53
  RP 3.3.3.3 (?), v2
    Info source: 2.2.2.2 (?), via bootstrap, priority 1, holdtime 150
         Uptime: 03:03:06, expires: 00:01:54

R4#show ip mroute

(*, 235.0.0.1), 00:01:33/00:02:23, RP 4.4.4.4, flags: SJC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    FastEthernet2/1, Forward/Sparse, 00:01:33/00:02:23

(*, 235.0.0.2), 00:00:06/00:02:53, RP 4.4.4.4, flags: SJC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    FastEthernet2/1, Forward/Sparse, 00:00:06/00:02:53

(*, 224.0.1.40), 00:02:35/00:02:12, RP 0.0.0.0, flags: DCL
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Loopback0, Forward/Sparse, 00:02:35/00:02:12

Then I will inject one fault which could lead R5 not being able to ping 235.0.0.1 to which address R7 is listening.


R5#ping 235.0.0.1 repeat 10

Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to 235.0.0.1, timeout is 2 seconds:
....

-It is failed. So let's try to check the RP mapping information and pim adjacency between R1 and R4.
We will see that R4(4.4.4.4) is the prefer RP to be used. We have pim adjacency between R1 and R4.
R4 has multicast receiver for 235.0.0.1 and 235.0.0.2. Then why it is failed at the first place.

R1#show ip pim rp mapping
PIM Group-to-RP Mappings

Group(s) 224.0.0.0/4
  RP 4.4.4.4 (?), v2
    Info source: 2.2.2.2 (?), via bootstrap, priority 0, holdtime 150
         Uptime: 00:02:00, expires: 00:02:11
  RP 3.3.3.3 (?), v2
    Info source: 2.2.2.2 (?), via bootstrap, priority 1, holdtime 150

R1#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      P - Proxy Capable, S - State Refresh Capable, G - GenID Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
192.168.12.2      FastEthernet1/0          03:28:29/00:01:29 v2    1 / DR S P G
192.168.14.4      FastEthernet1/1          02:32:11/00:01:16 v2    1 / DR S P G


R4#show ip mroute

(*, 235.0.0.1), 00:10:03/00:02:53, RP 4.4.4.4, flags: SJC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    FastEthernet2/1, Forward/Sparse, 00:10:03/00:02:53

(*, 235.0.0.2), 00:08:36/00:02:52, RP 4.4.4.4, flags: SJC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    FastEthernet2/1, Forward/Sparse, 00:08:36/00:02:52

(*, 224.0.1.40), 00:11:05/00:02:39, RP 0.0.0.0, flags: DCL
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Loopback0, Forward/Sparse, 00:11:05/00:02:39

-Now let's try to ping whether we can reach the RP address itself or not.

R5#ping 4.4.4.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)

-We find that even though we have RP(4.4.4.4) information in the multicast routing domain wide, but in fact we don't even have the reach-ability to RP. It is really tricky, right. We have RP information that we can reach and essentially we are using that RP for multicast traffic forwarding.

-This is the fault I injected by not advertising the R4 Loopback0 network into OSPF.
So I will  correct this back.

R4(config)#int loo 0
R4(config-if)#ip ospf 1 area 0


-Now R5 can ping to RP and multicast feeds sending to 235.0.0.1 is successful.

R5#ping 4.4.4.4
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/57/92 ms

R5#ping 235.0.0.1
Reply to request 0 from 192.168.47.7, 192 ms





Wednesday, 5 September 2012

Simple Routing Loop


R2 is redistributing RIP routes into OSPF domain.
R3 is redistributing OSPF routes in RIP domain with a metric of 1.
R5 is redistributing connected Loopback0 network which is 192.168.5.0/24 with a metric of 1.

R1 Config

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.123.1 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.123.1 0.0.0.0 area 0

R2 Config

interface FastEthernet0/0
 ip address 192.168.123.2 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.234.2 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 redistribute rip subnets
 network 192.168.123.2 0.0.0.0 area 0
!
router rip
 version 2
 network 192.168.234.0
 no auto-summary

R3 Config

interface FastEthernet0/0
 ip address 192.168.123.3 255.255.255.0
 !
interface FastEthernet0/1
 ip address 192.168.234.3 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 192.168.123.3 0.0.0.0 area 0
!
router rip
 version 2
 redistribute ospf 1 metric 1
 network 192.168.234.0
 no auto-summary

R4 Config

interface FastEthernet0/0
 ip address 192.168.234.4 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.45.4 255.255.255.0
!
router rip
 version 2
 network 192.168.45.0
 network 192.168.234.0
 no auto-summary

R5 Config

interface Loopback0
 ip address 192.168.5.5 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.45.5 255.255.255.0
!
router rip
 version 2
 redistribute connected metric 1
 network 192.168.45.0
 no auto-summary

Verification

-R5 is learning the prefix 1.1.1.1/32.

R5#show ip route

R    192.168.123.0/24 [120/2] via 192.168.45.4, 00:00:26, FastEthernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
R       1.1.1.1 [120/2] via 192.168.45.4, 00:00:26, FastEthernet0/0
C    192.168.45.0/24 is directly connected, FastEthernet0/0
R    192.168.234.0/24 [120/1] via 192.168.45.4, 00:00:26, FastEthernet0/0
C    192.168.5.0/24 is directly connected, Loopback0

-Now R4 is learning the prefix 1.1.1.1/32 from the both R3 and R5 being the metric 1 from both sources.

R4#show  ip route

R    192.168.123.0/24 [120/1] via 192.168.234.3, 00:00:09, FastEthernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
R       1.1.1.1 [120/1] via 192.168.234.3, 00:00:09, FastEthernet0/0
C    192.168.45.0/24 is directly connected, FastEthernet0/1
C    192.168.234.0/24 is directly connected, FastEthernet0/0
R    192.168.5.0/24 [120/1] via 192.168.234.3, 00:00:09, FastEthernet0/0
                    [120/1] via 192.168.45.5, 00:00:01, FastEthernet0/1


-From R3 point of view, it takes the route 1.1.1.1/32 learn from R3becasue the metric from R3 is better than R4.

R2#show ip route

C    192.168.123.0/24 is directly connected, FastEthernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/11] via 192.168.123.1, 00:08:38, FastEthernet0/0
R    192.168.45.0/24 [120/1] via 192.168.234.4, 00:00:13, FastEthernet0/1
                     [120/1] via 192.168.234.3, 00:00:22, FastEthernet0/1
C    192.168.234.0/24 is directly connected, FastEthernet0/1
R    192.168.5.0/24 [120/1] via 192.168.234.3, 00:00:22, FastEthernet0/1

-But for R3, it thinks the route learn from R2 is better because the AD of OSPF is better than RIP.

R3#show ip route

C    192.168.123.0/24 is directly connected, FastEthernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/11] via 192.168.123.1, 00:08:54, FastEthernet0/0
O E2 192.168.45.0/24 [110/20] via 192.168.123.2, 00:08:54, FastEthernet0/0
C    192.168.234.0/24 is directly connected, FastEthernet0/1
O E2 192.168.5.0/24 [110/20] via 192.168.123.2, 00:08:54, FastEthernet0/0

-So when the actual forwarding takes place, the path that the packets taking would be like this.

R5#ping 1.1.1.1 source loopback 0
.....
Success rate is 0 percent (0/5)

Forward path R5>R4>R3>R1>
Return path R1>R2>R3>R2>R3>R2.......

Then the packets will be looping between R2 and R3 till the ttl expired and never be able to get back the source router.




Saturday, 1 September 2012

Traffic Black-holing in BGP






AS1234 is using OSPF as IGP to peer IBGP neighbors only. No other users subnets are advertised into IGP.
BGP policy mandates the smallest prefix announce to internet is /23 and the prefixes should be as less numbers as possible.
R3 and R4 are the routes generation routers.
For the redundancy purpose, R3 and R4 are generating supernets 203.81.0.0/22 into BGP.
So supernet generation is done on R3 first and then on R4.

R1 Config

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.13.1 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.15.1 255.255.255.0
!
interface FastEthernet1/0
 ip address 192.168.12.1 255.255.255.0
!
router ospf 1
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 0
 network 192.168.13.1 0.0.0.0 area 0
!
router bgp 1234
 no synchronization
 bgp log-neighbor-changes
 neighbor ibgp peer-group
 neighbor ibgp remote-as 1234
 neighbor ibgp update-source Loopback0
 neighbor ibgp next-hop-self
 neighbor 2.2.2.2 peer-group ibgp
 neighbor 3.3.3.3 peer-group ibgp
 neighbor 4.4.4.4 peer-group ibgp
 neighbor 192.168.15.5 remote-as 5
 no auto-summary

R2 Config

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.24.2 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.26.2 255.255.255.0
!
interface FastEthernet1/0
 ip address 192.168.12.2 255.255.255.0
!
router ospf 1
 network 2.2.2.2 0.0.0.0 area 0
 network 192.168.12.2 0.0.0.0 area 0
 network 192.168.24.2 0.0.0.0 area 0
!
router bgp 1234
 no synchronization
 bgp log-neighbor-changes
 neighbor ibgp peer-group
 neighbor ibgp remote-as 1234
 neighbor ibgp update-source Loopback0
 neighbor ibgp next-hop-self
 neighbor 1.1.1.1 peer-group ibgp
 neighbor 3.3.3.3 peer-group ibgp
 neighbor 4.4.4.4 peer-group ibgp
 neighbor 192.168.26.6 remote-as 6
 no auto-summary

R3 Config

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
 ip address 203.81.1.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.13.3 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.34.3 255.255.255.0
!
router ospf 1
 network 3.3.3.3 0.0.0.0 area 0
 network 192.168.13.3 0.0.0.0 area 0
 network 192.168.34.3 0.0.0.0 area 0
!
router bgp 1234
 no synchronization
 bgp log-neighbor-changes
 redistribute static route-map redistribute-supernet
 neighbor ibgp peer-group
 neighbor ibgp remote-as 1234
 neighbor ibgp update-source Loopback0
 neighbor ibgp next-hop-self
 neighbor 1.1.1.1 peer-group ibgp
 neighbor 2.2.2.2 peer-group ibgp
 neighbor 4.4.4.4 peer-group ibgp
 no auto-summary
!
ip prefix-list supernet seq 5 permit 203.81.0.0/22
!
route-map redistribute-supernet permit 10
 match ip address prefix-list supernet

R4 Config

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Loopback1
 ip address 203.81.2.4 255.255.254.0
!
interface FastEthernet0/0
 ip address 192.168.24.4 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.34.4 255.255.255.0
!
router ospf 1
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.24.4 0.0.0.0 area 0
 network 192.168.34.4 0.0.0.0 area 0
!
router bgp 1234
 no synchronization
 bgp log-neighbor-changes
 redistribute connected route-map redistribute-user
 redistribute static route-map redistribute-supernet
 neighbor ibgp peer-group
 neighbor ibgp remote-as 1234
 neighbor ibgp update-source Loopback0
 neighbor ibgp next-hop-self
 neighbor 1.1.1.1 peer-group ibgp
 neighbor 2.2.2.2 peer-group ibgp
 neighbor 3.3.3.3 peer-group ibgp
 no auto-summary
!
ip route 203.81.0.0 255.255.252.0 Null0 254
!
ip prefix-list supernet seq 5 permit 203.81.0.0/22
!
ip prefix-list user seq 5 permit 203.81.2.0/23
!
route-map redistribute-supernet permit 10
 match ip address prefix-list supernet
!
route-map redistribute-user permit 10
 match ip address prefix-list user

R5 Config

interface Loopback0
 ip address 5.5.5.5 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.15.5 255.255.255.0
!
router bgp 5
 no synchronization
 bgp log-neighbor-changes
 network 5.5.5.0 mask 255.255.255.0
 neighbor 192.168.15.1 remote-as 1234
 no auto-summary

R6 Config

interface Loopback0
 ip address 6.6.6.6 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.26.6 255.255.255.0
!
router bgp 6
 no synchronization
 bgp log-neighbor-changes
 network 6.6.6.0 mask 255.255.255.0
 neighbor 192.168.26.2 remote-as 1234
 no auto-summary

Verification

R5#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*> 5.5.5.0/24       0.0.0.0                  0         32768 i
*> 6.6.6.0/24       192.168.15.1                           0 1234 6 i
*> 203.81.0.0/22    192.168.15.1                           0 1234 ?
*> 203.81.2.0/23    192.168.15.1                           0 1234 ?

R3#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*>i5.5.5.0/24       1.1.1.1                  0    100      0 5 i
*>i6.6.6.0/24       2.2.2.2                  0    100      0 6 i
*> 203.81.0.0/22    0.0.0.0                  0         32768 ?
*>i203.81.2.0/23    4.4.4.4                  0    100      0 ?

R4#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*>i5.5.5.0/24       1.1.1.1                  0    100      0 5 i
*>i6.6.6.0/24       2.2.2.2                  0    100      0 6 i
*>i203.81.0.0/22    3.3.3.3                  0    100      0 ?
*> 203.81.2.0/23    0.0.0.0                  0         32768 ?

-Note that 203.81.0.0/22 is originated from R3 and R4 doesn't have a chance to originate its own supernet using the Null 0 static route as a placeholder. Because IBGP administrative distance 200 versus null static AD 254.
What if R3(HANTHARWADDY) fiber links connecting to R1 and R4(HLAING) is failed for 30 seconds and then comes back online.
 For the labbing purpose, I shut and unshut the fa0/0 and fa0/1 on R3.
 
R1#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*> 5.5.5.0/24       192.168.15.5             0             0 5 i
*>i6.6.6.0/24       2.2.2.2                  0    100      0 6 i
* i203.81.0.0/22    4.4.4.4                  0    100      0 ?
*>i                 3.3.3.3                  0    100      0 ?
*>i203.81.2.0/23    4.4.4.4                  0    100      0 ?

R2#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*>i5.5.5.0/24       1.1.1.1                  0    100      0 5 i
*> 6.6.6.0/24       192.168.26.6             0             0 6 i
*>i203.81.0.0/22    4.4.4.4                  0    100      0 ?
* i                 3.3.3.3                  0    100      0 ?
*>i203.81.2.0/23    4.4.4.4                  0    100      0 ?

-Now R3 and R4 are generating the supernet at the same time.
From R1 and R2 perspective, they are now receiving 203.81.0.0/22 from both R3 and R4.
Each preferring from the nearest neighbor, R1 prefer from R3 and R2 prefer from R4.
As a result, when the packets source from 203.81.1.0/24 destined to R6, the packets drop at R4 on its way back.
Forward path R3>R1>R2>R6 is sucessful
Return path R6>R2>R4(drop here) and is unsucessful due to R4 doesn't have 203.81.1/0/24 info and dropping to Null interface.

R4#show ip route
O    192.168.12.0/24 [110/11] via 192.168.24.2, 00:11:03, FastEthernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/12] via 192.168.24.2, 00:11:03, FastEthernet0/0
O    192.168.13.0/24 [110/20] via 192.168.34.3, 00:11:03, FastEthernet0/1
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 192.168.24.2, 00:11:03, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/11] via 192.168.34.3, 00:11:03, FastEthernet0/1
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
C    192.168.24.0/24 is directly connected, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
B       5.5.5.0 [200/0] via 1.1.1.1, 00:23:47
     6.0.0.0/24 is subnetted, 1 subnets
B       6.6.6.0 [200/0] via 2.2.2.2, 00:23:24
C    192.168.34.0/24 is directly connected, FastEthernet0/1
C    203.81.2.0/23 is directly connected, Loopback1
S    203.81.0.0/22 is directly connected, Null0

R3#ping 5.5.5.5 source loo 1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/28/48 ms

R3#ping 6.6.6.6 sou
R3#ping 6.6.6.6 source loo 1
.....
Success rate is 0 percent (0/5)


Sweet!!! Imagine in the real network, what if DNS servers are sitting on the segment 203.81.1.0/24.
The reason which makes more painful to troubleshoot this kind of scenario is 203.81.1.0/24 doesn't loose connectivity the whole internet.







Routing Unefficiently with Traffic-engineering Autoroute Announce

If we change OSPF cost as per diagram, from the router R1 perspective, it has to go through R2 in order to reach 3.3.3.3/32.
And there is tunnel 1 terminating at R2.
So when the forwarding takes place, the actual path going through will be R1>R4>R2>R4>R3.
It is really an unefficient path which goes through R4 twice.

R1(config)#int fa0/1
R1(config-if)#ip ospf cost 20

R2(config)#int fa0/1
R2(config-if)#ip ospf cost 20



R1#show ip route ospf
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/2] via 0.0.0.0, 00:08:57, Tunnel1
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/4] via 0.0.0.0, 00:08:57, Tunnel1
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/3] via 0.0.0.0, 00:08:57, Tunnel1
O    192.168.24.0/24 [110/2] via 0.0.0.0, 00:08:57, Tunnel1
O    192.168.23.0/24 [110/4] via 0.0.0.0, 00:08:57, Tunnel1
O    192.168.34.0/24 [110/3] via 0.0.0.0, 00:08:57, Tunnel1

R1#traceroute 3.3.3.3

  1 192.168.14.4 [MPLS: Label 20 Exp 0] 32 msec 28 msec 20 msec
  2 192.168.24.2 24 msec 20 msec 16 msec
  3 192.168.24.4 [MPLS: Label 21 Exp 0] 56 msec 20 msec 60 msec
  4 192.168.34.3 40 msec *  44 msec




Traffic-engineering Routing Loops with Static Routes



mpls traffic-eng tunnels
mpls traffic-eng reoptimize timers frequency 30
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Tunnel1
 ip unnumbered Loopback0
 tunnel destination 2.2.2.2
 tunnel mode mpls traffic-eng
 tunnel mpls traffic-eng path-option 10 explicit name R1-R4-R2
 tunnel mpls traffic-eng path-option 20 dynamic
!
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet0/1
 ip address 192.168.14.1 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet1/0
 ip address 192.168.15.1 255.255.255.0
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 0
 network 192.168.14.1 0.0.0.0 area 0
 network 192.168.15.1 0.0.0.0 area 0
!
ip explicit-path name R1-R4-R2 enable
 index 2 next-address 192.168.14.4
 index 4 next-address 192.168.24.2

R2 Config

mpls traffic-eng tunnels
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.12.2 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet0/1
 ip address 192.168.23.2 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet1/0
 ip address 192.168.24.2 255.255.255.0
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 network 2.2.2.2 0.0.0.0 area 0
 network 192.168.12.2 0.0.0.0 area 0
 network 192.168.23.2 0.0.0.0 area 0
 network 192.168.24.2 0.0.0.0 area 0

R3 Config

mpls traffic-eng tunnels
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
 ip address 3.3.3.33 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.23.3 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet0/1
 ip address 192.168.34.3 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet1/0
 ip address 192.168.35.3 255.255.255.0
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 network 3.3.3.3 0.0.0.0 area 0
 network 3.3.3.3 0.0.0.0 area 0
 network 192.168.23.3 0.0.0.0 area 0
 network 192.168.34.3 0.0.0.0 area 0
 network 192.168.35.3 0.0.0.0 area 0

R4 Config

mpls traffic-eng tunnels
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.14.4 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet0/1
 ip address 192.168.34.4 255.255.255.0
 ip ospf cost 10
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
interface FastEthernet1/0
 ip address 192.168.24.4 255.255.255.0
 ip ospf cost 1
 mpls ip
 mpls traffic-eng tunnels
 ip rsvp bandwidth
!
router ospf 1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.14.4 0.0.0.0 area 0
 network 192.168.24.4 0.0.0.0 area 0
 network 192.168.34.4 0.0.0.0 area 0

R5 Config

interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.15.5 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.35.5 255.255.255.0
!
router ospf 1
 network 5.5.5.5 0.0.0.0 area 0
 network 192.168.15.5 0.0.0.0 area 0
 network 192.168.35.5 0.0.0.0 area 0

-As per the above config, we have tunnel 1 on R1 terminating at R2.
But we are not using the tunnel forwarding down the traffic.
In this lab, our concerned is only 3.3.3.3/32 and 3.3.3.33/32.

R1#show ip route ospf
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/2] via 192.168.12.2, 00:01:35, FastEthernet0/0
     3.0.0.0/32 is subnetted, 2 subnets
O       3.3.3.3 [110/3] via 192.168.15.5, 00:01:35, FastEthernet1/0
                [110/3] via 192.168.12.2, 00:01:35, FastEthernet0/0
O       3.3.3.33 [110/3] via 192.168.15.5, 00:01:35, FastEthernet1/0
                 [110/3] via 192.168.12.2, 00:01:35, FastEthernet0/0

     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/2] via 192.168.14.4, 00:01:35, FastEthernet0/1
O    192.168.24.0/24 [110/2] via 192.168.14.4, 00:01:36, FastEthernet0/1
                     [110/2] via 192.168.12.2, 00:01:36, FastEthernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 192.168.15.5, 00:01:35, FastEthernet1/0
O    192.168.23.0/24 [110/2] via 192.168.12.2, 00:01:36, FastEthernet0/0
O    192.168.34.0/24 [110/3] via 192.168.15.5, 00:01:36, FastEthernet1/0
                     [110/3] via 192.168.12.2, 00:01:36, FastEthernet0/0
O    192.168.35.0/24 [110/2] via 192.168.15.5, 00:01:37, FastEthernet1/0

-If for some reason we need to forwarding down the traffic only to 3.3.3.3/32 through tunnel 1, so we need to add the static route to 3.3.3.3/32 point to tunnel 1.

R1#show run | in ip route
ip route 3.3.3.3 255.255.255.255 Tunnel1

R1#show ip route static
S       3.3.3.3 is directly connected, Tunnel1

R1#traceroute 3.3.3.3
  1 192.168.14.4 [MPLS: Label 20 Exp 0] 28 msec 40 msec 12 msec
  2 192.168.24.2 20 msec 20 msec 8 msec
  3 192.168.23.3 28 msec *  28 msec

-Forwarding to 3.3.3.33/32 is now load-balancing between R2 and R5.

R1#traceroute 3.3.3.33
  1 192.168.15.5 28 msec
    192.168.12.2 [MPLS: Label 24 Exp 0] 12 msec
    192.168.15.5 36 msec
  2 192.168.23.3 20 msec
    192.168.35.3 40 msec *


Note:  Before proceeding to read the latter part, think a while what will happen if the link between R2 and R3 failed. And the topology will become shown below.


-The traffic to 3.3.3.3/32 will endlessly loop between R1,R4, and R2 until the packet ttl expired.
But forwarding to 3.3.3.33 will still be taking the path R1>R5>R3

R1#traceroute 3.3.3.3

  1 192.168.14.4 [MPLS: Label 20 Exp 0] 48 msec 36 msec 28 msec
  2 192.168.24.2 24 msec 24 msec 32 msec
  3 192.168.12.1 [MPLS: Label 21 Exp 0] 56 msec 56 msec 72 msec
  4 192.168.14.4 [MPLS: Label 20 Exp 0] 64 msec 64 msec 56 msec
  5 192.168.24.2 60 msec 60 msec 64 msec
  6 192.168.12.1 [MPLS: Label 21 Exp 0] 100 msec 92 msec 112 msec
  7 192.168.14.4 [MPLS: Label 20 Exp 0] 128 msec 132 msec 108 msec
  8 192.168.24.2 88 msec 96 msec 92 msec
  9 192.168.12.1 [MPLS: Label 21 Exp 0] 108 msec 124 msec 132 msec
 10 192.168.14.4 [MPLS: Label 20 Exp 0] 116 msec 120 msec 136 msec
 11 192.168.24.2 128 msec 116 msec 108 msec
 12 192.168.12.1 [MPLS: Label 21 Exp 0] 100 msec 140 msec

R1#ping 3.3.3.3
.....
Success rate is 0 percent (0/5)

R1#ping 3.3.3.33
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/26/32 ms

R1#traceroute 3.3.3.33
  1 192.168.15.5 48 msec 4 msec 8 msec
  2 192.168.35.3 16 msec *  40 msec