Friday, August 10, 2012

Load Balancing - Using Cisco IOS SLB Dispatched Mode

PHYSICAL TOPOLOGY


LOGICAL TOPOLOGY



In Today's post I am going to present fairly an old IOS feature Called Server load balancing, but still I believe not many people are aware of it. Most importantly the feature is documented very well in IOS 12.4(15)T guides 
which means some Evil CCIE Proctor or lab writer can turn your lab day into horrific experience by introducing something like this into configuration section of lab or into troubleshooting, which of course will be more obnoxious.

Now Before moving onto the configuration part, let's talk a little about Load Balancer or I should say application load balancing. The idea is simple: The traffic towards the Application originated from outer world is going to hit the Virtual IP or VIP. The VIP basically represents the IP Address towards which the traffic is sent out in order to access the application. Now Behind the load balancer we have our Physical Servers running that application. The job of the load balancer now is to distribute the incoming connections from outer world towards the Physical Servers. The distribution pretty much depends upon the Algorithm we have chosen for configuration. While most of load balancers in market choose ROUND ROBIN as the default method. Other may choose different ones like Weight Based where a certain Weight is assigned to a physical server to ensure it handles more requests compare to server with 
less weight. Which of course makes sense if server with Higher weight is a large Server compare to server with less weight which is say a P4 PC running Server application.

If you really want to dig a little deeper about load balancers from vendor independent point of view, I would recommend a fairly small book: Server Load Balancing From O'Reilly Publishers.

Now talking about Vendors, actually there are couple market players in Load Balancer Segment like - F5, Cisco, Citrix, Barracuda etc. 

From Implementation perspective, The load balancer can work on LAN side as well as WAN side. For example F5 has LAN Based load balancer products called LTM and WAN based load balancer products called GTM. In similar fashion Cisco has dedicated load balancer products for LAN side called ACE series and WAN based called GSS.

Now coming back to IOS Based SLB implementation. It provides a very basic LAN based load balancing features. Since it's not a dedicated load balancer products so granularity is of course going to be less. But again an idle feature for SOHO environments for things like FTP load balancing etc.

Talking about IOS SLB implementation, there are basically two ways of doing it or I should say two modes:

> Dispatched Mode
> Directed Mode

The basic difference between Dispatched Mode Vs Directed Mode is that in Dispatched mode the limitation is the Physical Servers should have direct Layer 2 reach-ability with Load Balancer. While this is not the case with Directed mode which essentially uses NAT feature to load balance.

From CCIE Lab perspective, since the current IOS version devices running is 12.4(15)T. The feature is documented under  - Server Load Balancing Configuration Guide. Which I believe is recent change since if I remember correctly when I took the lab last year it was documented under - IP Application Services Configuration Guide. Same logic applies to Command Reference guide just in case.


IP Application Services Configuration Guide, Cisco IOS Release 12.4T 

http://www.cisco.com/en/US/docs/ios-xml/ios/ipapp/configuration/12-4t/iap-12-4t-book.html

Server Load Balancing Configuration Guide, Cisco IOS Release 12.4T 




Now in this post I'll be covering "Dispatched Mode" Implementation. Let's first establish the basic connectivity using our initials before jumping into SLB specific configuration:


R1
==

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R1
!
int lo0
 ip add 1.1.1.1 255.255.255.255
 exit
!
int f0/0
 ip add 12.12.12.1 255.255.255.0
 no sh
 exit
!
router eigrp 100
 no auto
 net 1.1.1.1 0.0.0.0
 net 12.12.12.1 0.0.0.0
 exit
!
end
!
wr
!
=============================================

R2
==

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R2
!
int lo0
 ip add 2.2.2.2 255.255.255.0
 exit
!
int f0/0
 ip add 12.12.12.2 255.255.255.0
 no sh
 exit
!
int f0/1
 ip add 23.23.23.2 255.255.255.0
 no sh
 exit
!
router eigrp 100
 no auto
 net 2.2.2.2 0.0.0.0
 net 12.12.12.2 0.0.0.0
 net 23.23.23.2 255.255.255.0
 exit
!
end
!
wr
!

=============================================

R3
==

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R3
!
int lo0
 ip add 3.3.3.3 255.255.255.0
 exit
!
int f0/0
 ip add 23.23.23.3 255.255.255.0
 no sh
 exit
!
int f1/0
 ip add 33.33.33.3 255.255.255.0
 no sh
 exit
!
int lo 100
 ip add 100.100.100.100 255.255.255.255
 exit
!
router eigrp 100
 no auto
 net 3.3.3.3 0.0.0.0
 net 23.23.23.3 0.0.0.0
 net 33.33.33.3 0.0.0.0
 net 100.100.100.100 0.0.0.0
 exit
!
line vty 0 4
 no login
 exit
!
end
!
wr
!

=============================================

R5
==

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R5
!
int lo0
 ip add 5.5.5.5 255.255.255.0
 exit
!
int f0/0
 ip add 33.33.33.5 255.255.255.0
 no sh
 exit
!
int lo 100
 ip add 100.100.100.100 255.255.255.255
 exit
!
router eigrp 100
 no auto
 net 5.5.5.5 0.0.0.0
 net 33.33.33.5 0.0.0.0
 net 100.100.100.100 0.0.0.0
 exit
!
line vty 0 4
 no login
 exit
!
end
!
wr
!
=============================================

R6
==

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R6
!
int lo0
 ip add 6.6.6.6 255.255.255.0
 exit
!
int f0/0
 ip add 33.33.33.6 255.255.255.0
 no sh
 exit
!
int lo 100
 ip add 100.100.100.100 255.255.255.255
 exit
!
router eigrp 100
 no auto
 net 6.6.6.6 0.0.0.0
 net 33.33.33.6 0.0.0.0
 net 100.100.100.100 0.0.0.0
 exit
!
line vty 0 4
 no login
 exit
!
end
!
wr
!

========

Now as you can see, the VIP or virtual IP address we chose earlier -  100.100.100.100 is configured not only on Router R3 acting as SLB but also on physical servers. Actually it's one of requirements of IOS SLB Dispatched Mode implementation. In dispatched mode the VIP address needs to configured on Physical Servers either as Secondary Address or on the loopback. In our scenario I am using loopbacks for this purpose. 

Now let's configure Router R3 as Server Load Balancer (SLB):


!
ip slb serverfarm DISPATCHED_MODE <- Pick any name you want here
 real 33.33.33.5 <- Physical Address Of First Server
 inservice <- This Command Enables the real server for use by IOS SLB
 maxconns 2 <- Optional
 weight 1 <- Optional
 exit
 real 33.33.33.6 <- Similar Steps to be repeated for 2nd Physical Server
 inservice
 maxconns 2
 weight 1
 exit
 exit
 exit
!
ip slb vserver ANYCAST_ADDRESS <- Let's Create the VIP
 virtual 100.100.100.100 tcp telnet <- Here we are configuring Telnet SLB
 serverfarm DISPATCHED_MODE <- Server Farm Configured Earlier
 inservice
 advertise 
 exit
!

Verification:
========


R1>telnet 100.100.100.100
Trying 100.100.100.100 ... Open

R5>exit


[Connection to 100.100.100.100 closed by foreign host]


R1>telnet 100.100.100.100

Trying 100.100.100.100 ... Open

R6>exit


[Connection to 100.100.100.100 closed by foreign host]


So as you can see our Telnet connections are getting load balanced between both Physical Server.


R3#sh ip slb stats

Pkts via normal switching:  60
Pkts via special switching: 0
Connections Created:        2
Connections Established:    2
Connections Destroyed:      2
Connections Reassigned:     0
Zombie Count:               0


R3#sh ip slb serverfarms detail
DISPATCHED_MODE, predictor = ROUNDROBIN, nat = none
                 virtuals inservice: 1, reals = 2, bind id = 0
  Real servers:
    33.33.33.5, weight = 1, OPERATIONAL, conns = 0
    33.33.33.6, weight = 1, OPERATIONAL, conns = 0
  Total connections = 0


Since there is no active connection, the connection count is 0. Let's initiate one connection:

R1>telnet 100.100.100.100
Trying 100.100.100.100 ... Open

R5>



R3#sh ip slb serverfarms detail
DISPATCHED_MODE, predictor = ROUNDROBIN, nat = none
                 virtuals inservice: 1, reals = 2, bind id = 0
  Real servers:
    33.33.33.5, weight = 1, OPERATIONAL, conns = 1
    33.33.33.6, weight = 1, OPERATIONAL, conns = 0
  Total connections = 1

The IOS Version used for this SLB Test Bed is:


R3#sh ver | i IOS
Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.4(13a), RELEASE SOFTWARE (fc1)

HTH...
DEEPAK ARORA
EVIL CCIE

Wednesday, August 8, 2012

BGP Next Hop Issues & How Do We Fix It Using Different Ways .... With Some Troubleshooting Along The Way (Not For Soft Heart People ;-p)



R1
===

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R1
!
int lo0
 ip add 1.1.1.1 255.255.255.255
 exit
!
int f0/0
 ip add 12.12.12.1 255.255.255.0
 no sh
 exit
!
router bgp 100
 no auto
 no sync
 nei 12.12.12.2 remote 200
 net 1.1.1.1 mask 255.255.255.255
 exit
!
end
!
wr
!
#########################

R2
===

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R2
!
int lo0
 ip add 2.2.2.2 255.255.255.255
 exit
!
int f1/0
 ip add 12.12.12.2 255.255.255.0
 no sh
 exit
!
int f1/1
 ip add 23.23.23.2 255.255.255.0
 no sh
 exit
!
int f2/0
 ip add 24.24.24.2 255.255.255.0
 no sh
 exit
!
router eigrp 200
 no auto
 net 2.2.2.2 0.0.0.0
 net 23.23.23.2 0.0.0.0
 net 24.24.24.2 0.0.0.0
 exit
!
router bgp 200
 no au
 no sync
 nei 3.3.3.3 remote 200
 nei 3.3.3.3 update lo0
 nei 4.4.4.4 remote 200
 nei 4.4.4.4 update lo0
 nei 12.12.12.1 remote 100
 net 2.2.2.2 mask 255.255.255.255
 exit
 end
!
wr
!
#########################

R3
===

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R3
!
int lo0
 ip add 3.3.3.3 255.255.255.255
 exit
!
int f0/0
 ip add 23.23.23.3 255.255.255.0
 no sh
 exit
!
int f0/1
 ip add 53.53.53.3 255.255.255.0
 no sh
 exit
!
router eigrp 200
 no auto
 net 3.3.3.3 0.0.0.0
 net 23.23.23.3 0.0.0.0
 exit
!
router bgp 200
 no auto
 no sync
 nei 2.2.2.2 remote 200
 nei 2.2.2.2 update lo0
 nei 53.53.53.5 remote 300
 net 3.3.3.3 mask 255.255.255.255
 exit
!
end
!
wr
!
#########################

R4
===

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R4
!
int lo0
 ip add 4.4.4.4 255.255.255.255
 exit
!
int f0/0
 ip add 24.24.24.4 255.255.255.0
 no sh
 exit
!
int f0/1 
 ip add 46.46.46.4 255.255.255.0
 no sh 
 exit
!
router eigrp 200
 no auto
 net 4.4.4.4 0.0.0.0
 net 24.24.24.4 0.0.0.0
 net 46.46.46.4 0.0.0.0
 exit
!
router bgp 200
 no auto
 no sync
 nei 2.2.2.2 remote 200
 nei 2.2.2.2 update lo0
 nei 2.2.2.2 route-reflector-client
 nei 6.6.6.6 remote 200
 nei 6.6.6.6 update lo0
 nei 6.6.6.6 route-reflector-client
 net 4.4.4.4 mask 255.255.255.255
 exit
!
end
!
wr
!
#########################

R5
===

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R5
!
int lo0
 ip add 5.5.5.5 255.255.255.255
 exit
!
int f0/0
 ip add 53.53.53.5 255.255.255.0
 no sh
 exit
!
router bgp 300
 no auto
 no sync
 nei 53.53.53.3 remote 200
 net 5.5.5.5 mask 255.255.255.255
 exit
!
end
!
wr
!
#########################

R6
===

!
en
!
conf t
!
no ip do lo
no cdp run
!
ho R6
!
int lo0
 ip add 6.6.6.6 255.255.255.255
 exit
!
int f0/0
 ip add 46.46.46.6 255.255.255.0
 no sh
 exit
!
router eigrp 200
 no auto
 net 6.6.6.6 0.0.0.0
 net 46.46.46.6 0.0.0.0
 exit
!
router bgp 200
 no auto
 no sync
 nei 4.4.4.4 remote 200
 nei 4.4.4.4 update lo0
 net 6.6.6.6 mask 255.255.255.255
 exit
!
end
!
wr
!
==============================================================


PEERING STATUS
---------------------------


R1#sh ip bgp summary | b N
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4   200      68      61        8    0    0 00:56:14        4



R2#sh ip bgp summary | b N
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.3         4          200      53      58       15    0    0 00:47:01        2
4.4.4.4         4          200      21      17       15    0    0 00:09:43        2
12.12.12.1      4          100      62      70       15    0    0 00:57:26        1



R3#sh ip bgp summary | b N
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4   200      58      53        5    0    0 00:47:25        2
53.53.53.5      4   300      33      34        5    0    0 00:28:57        1



R4#sh ip bgp summary | b N
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4   200      51      51       12    0    0 00:10:46        2
6.6.6.6         4   200      33      39       12    0    0 00:10:35        1



R5#sh ip bgp summary | b N
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
53.53.53.3      4   200      36      35        4    0    0 00:30:11        2



R6#sh ip bgp summary | b N
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
4.4.4.4         4   200      40      34       12    0    0 00:11:48        2

=======================================================================


BGP TABLE VIEW
---------------------------


R1#sh ip bgp | b N
   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 200 i
*> 3.3.3.3/32       12.12.12.2                             0 200 i
*> 4.4.4.4/32       12.12.12.2                             0 200 i
*> 6.6.6.6/32       12.12.12.2                             0 200 i



R2#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       12.12.12.1               0             0 100 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
r>i3.3.3.3/32       3.3.3.3                  0    100      0 i
r>i4.4.4.4/32       4.4.4.4                  0    100      0 i
* i5.5.5.5/32       53.53.53.5               0    100      0 300 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i



R3#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
*> 5.5.5.5/32       53.53.53.5               0             0 300 i

R3#sh ip route 12.12.12.1
% Network not in table



R4#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i

R4#sh ip route 12.12.12.1
% Network not in table



R5#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       53.53.53.3                             0 200 i
*> 3.3.3.3/32       53.53.53.3               0             0 200 i
*> 5.5.5.5/32       0.0.0.0                  0         32768 i



R6#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
r>i4.4.4.4/32       4.4.4.4                  0    100      0 i
*> 6.6.6.6/32       0.0.0.0                  0         32768 i

=======================================================================


Fixing Next Hop Issues
-------------------------------


Method 1 => Advertising Next Hop Into IGP
###########################################


R2(config)#router eigrp 200
R2(config-router)#net 12.12.12.2 0.0.0.0
R2(config-router)#end


R3(config)#router eigrp 200
R3(config-router)#net 53.53.53.3 0.0.0.0
R3(config-router)#end


R4 Before
=========

R4#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i

R4#sh ip route 12.12.12.1
% Network not in table


R4 After
========

R4#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i


R4#sh ip route 12.12.12.1
Routing entry for 12.12.12.0/24
  Known via "eigrp 200", distance 90, metric 284160, type internal
  Redistributing via eigrp 200
  Last update from 24.24.24.2 on FastEthernet0/0, 00:02:25 ago
  Routing Descriptor Blocks:
  * 24.24.24.2, from 24.24.24.2, 00:02:25 ago, via FastEthernet0/0
      Route metric is 284160, traffic share count is 1
      Total delay is 1100 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1


R3 Before
=========

R3#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
*> 5.5.5.5/32       53.53.53.5               0             0 300 i

R3#sh ip route 12.12.12.1
% Network not in table


R3 After
========

R3#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
*> 5.5.5.5/32       53.53.53.5               0             0 300 i


R3#sh ip route 12.12.12.1
Routing entry for 12.12.12.0/24
  Known via "eigrp 200", distance 90, metric 284160, type internal
  Redistributing via eigrp 200
  Last update from 23.23.23.2 on FastEthernet0/0, 00:03:58 ago
  Routing Descriptor Blocks:
  * 23.23.23.2, from 23.23.23.2, 00:03:58 ago, via FastEthernet0/0
      Route metric is 284160, traffic share count is 1
      Total delay is 1100 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1



Getting Rid of BGP Split Horizon Issue By Configuring R2 as Route Reflector
==========================================================

R2(config)#router bgp 200
R2(config-router)#nei 3.3.3.3 route-reflector-client
R2(config-router)#nei 4.4.4.4 route-reflector-client
R2(config-router)#end


R3 Before
=========

R3#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
*> 5.5.5.5/32       53.53.53.5               0             0 300 i


R3 After
========

R3#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       12.12.12.1               0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
r>i4.4.4.4/32       4.4.4.4                  0    100      0 i
*> 5.5.5.5/32       53.53.53.5               0             0 300 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i


############################################################################


Reachability Check Using TCL Scripting
======================================

tclsh
foreach address {
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
5.5.5.5
6.6.6.6
} {ping $address source lo0 repeat 3}



R1#tclsh
R1(tcl)#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 4/4/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 112/306/496 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 416/597/876 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 232/378/552 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 616/1136/1624 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 376/642/796 ms


Fixing Next Hop Issues
--------------------------


Method 2 => Redistributing Specific Connected Route Into IGP
#############################################################


Let's Rollback Method 1
===================


R2(config)#router eigrp 200
R2(config-router)#no  network 12.12.12.2 0.0.0.0
R2(config-router)#end

R3(config)#router eigrp 200
R3(config-router)#no  network 53.53.53.3 0.0.0.0
R3(config-router)#end

Let's do reachability test again from R1
==============================

R1#tclsh

R1(tcl)#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 1/3/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
.!!
Success rate is 66 percent (2/3), round-trip min/avg/max = 288/334/380 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)


Let's try to fix it with second option:
===========================

R2
###

R2(config)#route-map CONN-F1/0 per 10
R2(config-route-map)#match interface f1/0
R2(config-route-map)#exit

R2(config)#router eigrp 200
R2(config-router)#redistribute connected metric 1 1 1 1 1 route-map CONN-F1/0
R2(config-router)#end

R3
###

R3(config)#ip prefix-list CONN-F0/1 pe
R3(config)#ip prefix-list CONN-F0/1 permit 53.53.53.3/24

R3(config)#route-map CONN-F0/1 per 10
R3(config-route-map)#match ip add prefix-list CONN-F0/1
R3(config-route-map)#exit

R3(config)#router eigrp 200
R3(config-router)#redis conn metric 1 1 1 1 1 route-map CONN-F0/1
R3(config-router)#end


Reachability Check Using TCL Scripting From R1
=====================================

tclsh
foreach address {
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
5.5.5.5
6.6.6.6
} {ping $address source lo0 repeat 3}



R1#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 1/3/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 12/104/168 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 408/572/868 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 388/557/812 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 688/1002/1364 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 996/1112/1212 ms




Method 3 => Neighbor Next Hop Self Command
###########################################


Let's Rollback Method 2
==================

R2(config)#router eigrp 200
R2(config-router)#no redistribute connected metric 1 1 1 1 1 route-map CONN-F1/0
R2(config-router)#end

R3(config)#router eigrp 200
R3(config-router)#no redistribute connected metric 1 1 1 1 1 route-map CONN-F0/1
R3(config-router)#end


Reachability Check Using TCL Scripting From R1
=====================================

tclsh
foreach address {
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
5.5.5.5
6.6.6.6
} {ping $address source lo0 repeat 3}



R1(tcl)#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 1/3/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 32/50/64 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
...
Success rate is 0 percent (0/3)


Let's Try to fix the situation using Next-Hop-Self Option
===========================================


R2(config)#router bgp 200
R2(config-router)#nei 3.3.3.3 next-hop-self
R2(config-router)#nei 4.4.4.4 next-hop-self
R2(config-router)#end


R3(config)#router bgp 200
R3(config-router)#nei 2.2.2.2 next-hop-self
R3(config-router)#end



Let's Verify the solution
==================

R1#sh ip bgp | b N
   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 200 i
*> 3.3.3.3/32       12.12.12.2                             0 200 i
*> 4.4.4.4/32       12.12.12.2                             0 200 i
*> 5.5.5.5/32       12.12.12.2                             0 200 300 i
*> 6.6.6.6/32       12.12.12.2                             0 200 i


R2#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       12.12.12.1               0             0 100 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
r>i3.3.3.3/32       3.3.3.3                  0    100      0 i
r>i4.4.4.4/32       4.4.4.4                  0    100      0 i
*>i5.5.5.5/32       3.3.3.3                  0    100      0 300 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i


R3#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       2.2.2.2                  0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
r>i4.4.4.4/32       4.4.4.4                  0    100      0 i
*> 5.5.5.5/32       53.53.53.5               0             0 300 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i


R4#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       2.2.2.2                  0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
r>i3.3.3.3/32       3.3.3.3                  0    100      0 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
*>i5.5.5.5/32       3.3.3.3                  0    100      0 300 i
r>i6.6.6.6/32       6.6.6.6                  0    100      0 i


R5#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       53.53.53.3                             0 200 100 i
*> 2.2.2.2/32       53.53.53.3                             0 200 i
*> 3.3.3.3/32       53.53.53.3               0             0 200 i
*> 4.4.4.4/32       53.53.53.3                             0 200 i
*> 5.5.5.5/32       0.0.0.0                  0         32768 i
*> 6.6.6.6/32       53.53.53.3                             0 200 i


R6#sh ip bgp | b N
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       2.2.2.2                  0    100      0 100 i
r>i2.2.2.2/32       2.2.2.2                  0    100      0 i
r>i3.3.3.3/32       3.3.3.3                  0    100      0 i
r>i4.4.4.4/32       4.4.4.4                  0    100      0 i
*>i5.5.5.5/32       3.3.3.3                  0    100      0 300 i
*> 6.6.6.6/32       0.0.0.0                  0         32768 i



Reachability Check Using TCL Scripting From R1
=====================================

tclsh
foreach address {
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
5.5.5.5
6.6.6.6
} {ping $address source lo0 repeat 3}


R1#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 4/4/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 24/53/96 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 48/77/100 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 36/74/132 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 96/138/200 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 80/102/128 ms



Method 4 => Using Default Route For BGP Next-Hop Reachability
##############################################################



Let's Rollback Method 3
===================

R2(config)#router bgp 200
R2(config-router)#no  neighbor 3.3.3.3 next-hop-self
R2(config-router)#no  neighbor 4.4.4.4 next-hop-self
R2(config-router)#end


R3(config)#router bgp 200
R3(config-router)#no  neighbor 2.2.2.2 next-hop-self
R3(config-router)#end



Now Let's try our Final Method 4
=========================

R2(config)#ip route 0.0.0.0 0.0.0.0 null 0

R2(config)#router eigrp 200
R2(config-router)#redistribute static metric 1 1 1 1 1
R2(config-router)#end


R2#sh ip route 53.53.53.5
% Network not in table


R2#sh ip route | b ^G
Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S*    0.0.0.0/0 is directly connected, Null0
      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [20/0] via 12.12.12.1, 00:03:36
      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
D        3.3.3.3 [90/156160] via 23.23.23.3, 00:03:32, FastEthernet1/1
      4.0.0.0/32 is subnetted, 1 subnets
D        4.4.4.4 [90/156160] via 24.24.24.4, 00:03:32, FastEthernet2/0
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [200/0] via 53.53.53.5, 00:02:47
      6.0.0.0/32 is subnetted, 1 subnets
D        6.6.6.6 [90/412160] via 24.24.24.4, 00:03:32, FastEthernet2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet1/0
L        12.12.12.2/32 is directly connected, FastEthernet1/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet1/1
L        23.23.23.2/32 is directly connected, FastEthernet1/1
      24.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        24.24.24.0/24 is directly connected, FastEthernet2/0
L        24.24.24.2/32 is directly connected, FastEthernet2/0
      46.0.0.0/24 is subnetted, 1 subnets
D        46.46.46.0 [90/284160] via 24.24.24.4, 00:03:34, FastEthernet2/0




R3(config)#ip route 0.0.0.0 0.0.0.0 null0

R3(config)#router eigrp 200
R3(config-router)#redistribute static metric 1 1 1 1 1
R3(config-router)#end


R2#sh ip route | b ^G
Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S*    0.0.0.0/0 is directly connected, Null0
      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [20/0] via 12.12.12.1, 00:09:18
      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
D        3.3.3.3 [90/156160] via 23.23.23.3, 00:09:14, FastEthernet1/1
      4.0.0.0/32 is subnetted, 1 subnets
D        4.4.4.4 [90/156160] via 24.24.24.4, 00:09:14, FastEthernet2/0
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [200/0] via 53.53.53.5, 00:08:29
      6.0.0.0/32 is subnetted, 1 subnets
D        6.6.6.6 [90/412160] via 24.24.24.4, 00:09:14, FastEthernet2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet1/0
L        12.12.12.2/32 is directly connected, FastEthernet1/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet1/1
L        23.23.23.2/32 is directly connected, FastEthernet1/1
      24.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        24.24.24.0/24 is directly connected, FastEthernet2/0
L        24.24.24.2/32 is directly connected, FastEthernet2/0
      46.0.0.0/24 is subnetted, 1 subnets
D        46.46.46.0 [90/284160] via 24.24.24.4, 00:09:16, FastEthernet2/0


R2(config)#no ip route 0.0.0.0 0.0.0.0 null 0

R2(config)#do sh ip route | b ^G
Gateway of last resort is 23.23.23.3 to network 0.0.0.0

D*EX  0.0.0.0/0 [170/2560002816] via 23.23.23.3, 00:00:18, FastEthernet1/1
      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [20/0] via 12.12.12.1, 00:10:43
      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
D        3.3.3.3 [90/156160] via 23.23.23.3, 00:10:39, FastEthernet1/1
      4.0.0.0/32 is subnetted, 1 subnets
D        4.4.4.4 [90/156160] via 24.24.24.4, 00:10:39, FastEthernet2/0
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [200/0] via 53.53.53.5, 00:09:54
      6.0.0.0/32 is subnetted, 1 subnets
D        6.6.6.6 [90/412160] via 24.24.24.4, 00:10:39, FastEthernet2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet1/0
L        12.12.12.2/32 is directly connected, FastEthernet1/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet1/1
L        23.23.23.2/32 is directly connected, FastEthernet1/1
      24.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        24.24.24.0/24 is directly connected, FastEthernet2/0
L        24.24.24.2/32 is directly connected, FastEthernet2/0
      46.0.0.0/24 is subnetted, 1 subnets
D        46.46.46.0 [90/284160] via 24.24.24.4, 00:10:41, FastEthernet2/0





R1#ping 5.5.5.5

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

R1#sh ip route 53.53.53.0
% Network not in table


R2(config)#do ping 5.5.5.5

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


R2(config)#do ping 5.5.5.5 so lo0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/85/116 ms



Let's try to combine two solutions
=========================


R2(config)#ip route 0.0.0.0 0.0.0.0 null 0 254

R2(config)#router eigrp 200
R2(config-router)#redistribute static metric 1 1 1 1 1


R3(config)#router bgp 200
R3(config-router)# neighbor 2.2.2.2 next-hop-self
R3(config-router)#end



Final Reachability Check Using TCL Scripting From R1-R6
============================================

tclsh
foreach address {
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
5.5.5.5
6.6.6.6
} {ping $address source lo0 repeat 3}


R1#tclsh
R1#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 1/3/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 12/32/60 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 48/68/100 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 36/77/104 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 84/112/152 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 80/90/112 ms





R2#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 72/73/76 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 4/5/8 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 48/64/80 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 44/65/104 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 92/104/124 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 92/108/124 ms




R3(tcl)#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 64/70/80 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 24/66/104 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 1/3/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 72/84/92 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 32/70/116 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 92/113/140 ms




R4(tcl)#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 56/80/96 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 36/48/64 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 72/82/96 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 4/4/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 68/109/136 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 12/49/100 ms




R5(tcl)#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 96/102/112 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 40/82/108 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 40/52/68 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 64/106/132 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 4/4/4 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 132/168/240 ms




R6(tcl)#foreach address {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#6.6.6.6
+>(tcl)#} {ping $address source lo0 repeat 3}

Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 76/101/128 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 56/81/116 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 100/129/156 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 36/54/84 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 80/133/168 ms
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 4/4/4 ms

HTH...
Deepak Arora

Evil CCIE