Tuesday, December 20, 2011

EIGRP PATH SELECTION

I also looked at eigrp path selection
Eigrp chooses path with lowest composite metric
the metric is based on
Bandwidth- not the actual bandwidth but the invese lowest bandwidth(your bottle neck)
along the path in kbps scaled             by 10^7*256
Delay-  cumulative delay along the path in ten of microseconds scaled by 256
Load- highest load along the path
relability- lowest relability along the path

METRIC = [k1*bandwidth +(k2*bandwidth)/(256 - load) + k3 * delay]
if k5 is been used not equal to zero
metric = metrix * [k5/(relability+k4)
k1=bandwidth k2 = load k3= delay k4= reachability k5 = mtu

An interesting if we have 2 equal best equal cost routes from same eigrp process we will load balance if  we have 2 equal best cost routes from different eigrp process it will select the route from the lowest number AS.
By default it 
k1 and 3 are enabled 1 and the rest of the k values are 0 not enabled
The k values can be used for manual weighting of rotues
K values must agree across neighbors or adjacency will fail so effectively if you
modify the k values you must modify in the entire routing domain
WHen modifying metrics we need to understand the functionality of dual and how it
will select it routes
Dual Terms
----------
successor= best path to a destination
feasible distance (fd)= composite metric of best path
feasible successor(fs) = backup path to a destination
advertised distance (Ad)= composite metric learned from neighbor (so neighbors metric
to network)
local distance (ld)- is composite metric to reach local neighbor (so your metric to
neighbor)
Once the best path is choosen additional paths are examined for backup routes. The
idea you want to predefine loop free paths so you can move to without route
recalculation. 
Before a route can be considered backup or feasible successor as it is know it has to
adhere to the feasability condition this if ad of route via neighbor is less than my
best path feasible distance then that route is feasible
and can be used for backup. This feasability condition ensures there is no loop as if
your ad is less than my best path to the network you are closer to the network than i
am and as it less there is no way you are using me as a hop to the network so there
is no potential of loop. You should design with having feasible successors in mind.
Feasible successors will speed up the protocol in case of failures as there is no
recalculation.
Also only feasible successors can be used for unequal load cost balancing

Ok as for possible traffic enginerrring traffic to modify the metrics in order to
influence a routing path
Bandwidth is not really good one to edit as it is lowest bandwidth on the path like
for example if i am r1 connecting to r2 over 100 mbs line which connects to r3 over
100 mbs line which connects to r5 over 56 k line
if i go on r1 and edit bandwidth it will not do anything unless i go below the lowest
bandwidth of 56 k as it is not looking cumalative bandwidth it is looking at the
lowest bandwidth. This makes it more tricky to modify routing paths with this
attribute
a easier is delay as delay cumalative you can affect easier path selection using this
Load and relabiility are not used really in eigrp often as they frequently change
this would cause alot of route recalculations so by default they are not part of teh
route calc and where mainly put in as compatability with IGRP Cisco recommend not setting them.

sh int serial 0/1 | in load  to watch the load changing
to change the metric use
router eigrp 1
metric weight 0 0 0 1 0 0     - the first 0 is tos (used in qos) next 0 is k1 which
is bw next 0 is k2  load next k3                                  which is delay next
k4 which is relability next is k5 which is mtu
this particulare example is enabling only delay to be used in the calculation of the
metric

if you change on 1 router needs to be changeds on all routers

to edit delay
int s0/0/
delay 'delay in microsecs'
sh ip route "ip" see total delay
sh int 'interface id' to see delay on interface
LAB
---
for the lab i am going setup eigrp running between r2 sw2 sw1 sw4 r5
r5 will have a loopback 5.5.5.5 configured and advertised we need to see how
initially r2 will get to 5.5.5.5 and then we will look at editing attiributes to try
and traffic engineer to go a different path
it will ulitmately have 2 paths to go via sw2 - sw1 - r5 or via sw2-sw4 sw1 - r5

s2 will ultimately decide



ok so i have setup everything running eigrp we will particular look at this 5.5.5.5
network

r2#traceroute 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
  1 172.18.18.1 4 msec 4 msec 0 msec
  2 10.229.254.1 0 msec 0 msec 0 msec
  3 172.16.16.1 0 msec *  0 msec
r2#
ok so from r2 i am taken the expected path sw2 - s1 to r5

r2#sh ip eigrp top 5.5.5.5/32
IP-EIGRP (AS 1): Topology entry for 5.5.5.5/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 161280
  Routing Descriptor Blocks:
  172.18.18.1 (FastEthernet0/0), from 172.18.18.1, Send flag is 0x0
      Composite metric is (161280/158720), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5300 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 3
r2#

ok from r2 the feasible distance to 5.5.5.5 is 161280 we can see sw2 distance is
158720 we have only 1 possible path from r2 which is to sw2 i.e we have not got
multiple links from r2
we can see more info that min bandwidth so the lowest bw along the entire traffic
path is 100000 Kbit the accumalative delay is 5300 microseconds

sw2
---
switch2#sh ip eigrp top 5.5.5.5/32
IP-EIGRP (AS 1): Topology entry for 5.5.5.5/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 158720
  Routing Descriptor Blocks:
  10.229.254.1 (Port-channel2), from 10.229.254.1, Send flag is 0x0
      Composite metric is (158720/156160), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5200 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
  172.25.10.2 (Port-channel8), from 172.25.10.2, Send flag is 0x0
      Composite metric is (161280/158720), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5300 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 3
switch2#

we have 2 paths one via sw1 which is the succesor route and a route via sw4
sw1 feasible distance is 158720
sw4 feasible distance (seen as advertised distance on sw1) is 158720
so this is not a feasible succesor as it is not less than 158720 so dual will not
trust this as loop free path


sw4
---
switch4#sh ip eigrp top 5.5.5.5/32
IP-EIGRP (AS 1): Topology entry for 5.5.5.5/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 158720
  Routing Descriptor Blocks:
  172.25.11.1 (Port-channel7), from 172.25.11.1, Send flag is 0x0
      Composite metric is (158720/156160), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5200 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
  172.25.10.1 (Port-channel9), from 172.25.10.1, Send flag is 0x0
      Composite metric is (161280/158720), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5300 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 3
ok from switch 4 perspective it path is via s1 with feasible distance 158720 compared
to feasible disatnce 161280 via s2 so it selects s1 path successor route as again the
ad from sw2 is = the feasible distance it is not selected as a feasible successor

ok what we will attempt to do is try to influence sw2 to take the path via sw4 for
the 5.5.5.5 network we will start from
sw1 and work down but since we know switch 1 only has 1 path to 5.5.5. via direct
connection we move to sw 4

to make it easier we will base the metric on delay only for all router by enabling
the k value for delay

i started on switch 4

switch4(config)#router eigrp 1
switch4(config-router)#metric weight 0 0 0 1 0 0
switch4(config-router)#
00:55:41: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.25.10.1 (Port-channel9) is
down: metric changed
00:55:41: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.25.11.1 (Port-channel7) is
down: metric changed
00:55:41: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.25.11.1 (Port-channel7) is
down: K-value mismatch
00:55:44: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.25.10.1 (Port-channel9) is
down: K-value mismatch
notice i lose all my adjacency as of mismatch k value  i need to do this on all
routers/ switches

ok so i have done this on all switches/routers
the metrics should be lower

switch2#sh ip eigrp top 5.5.5.5/32
IP-EIGRP (AS 1): Topology entry for 5.5.5.5/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 133120
  Routing Descriptor Blocks:
  10.229.254.1 (Port-channel2), from 10.229.254.1, Send flag is 0x0
      Composite metric is (133120/130560), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5200 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
  172.25.10.2 (Port-channel8), from 172.25.10.2, Send flag is 0x0
      Composite metric is (135680/133120), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5300 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 3
switch2#

which they are sw2 still takes the path via sw1
ok we will modify the delay on sw4 2 interfaces to lower the delay
we could alternatively higher the delay sw1 interface to sw2

switch4#sh int po7
Port-channel7 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0015.2bd9.1dcb (bia 0015.2bd9.1dcb)
  Internet address is 172.25.11.2/24
  MTU 1500 bytes, BW 300000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Full-duplex, 100Mb/s, link type is auto, media type is unknown
  input flow-control is off, output flow-control is unsupported
  Members in this channel: Fa0/13 Fa0/14 Fa0/15
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:02, output 00:00:03, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1205 packets input, 144632 bytes, 0 no buffer
     Received 671 broadcasts (380 IP multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 669 multicast, 0 pause input
     0 input packets with dribble condition detected
     1708 packets output, 161634 bytes, 0 underruns
     0 output errors, 0 collisions, 3 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 PAUSE output
     0 output buffer failures, 0 output buffers swapped out
switch4#
we can see the delay is DLY 100 usec i will lower this to 1 this is the interface
connecting to sw1


sw4
---
switch4(config)#int po7
switch4(config-if)#delay ?
  <1-16777215>  Throughput delay (tens of microseconds)
switch4(config-if)#delay 1
switch4(config-if)#

switch2#sh ip eigrp top 5.5.5.5/32
IP-EIGRP (AS 1): Topology entry for 5.5.5.5/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 133120
  Routing Descriptor Blocks:
  10.229.254.1 (Port-channel2), from 10.229.254.1, Send flag is 0x0
      Composite metric is (133120/130560), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5200 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
  172.25.10.2 (Port-channel8), from 172.25.10.2, Send flag is 0x0
      Composite metric is (133376/130816), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5210 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 3

the metric via sw4 has dropped but it is not a succeor yet it is though a feasible
successor now so if we wanted just to get it as feasible succesor this would worked
ok now on sw4 i will shorten the delay on the interface pointing to s2
switch4(config)#int po9
switch4(config-if)#delay 1
switch4(config-if)#

switch2#sh ip eigrp top 5.5.5.5/32
IP-EIGRP (AS 1): Topology entry for 5.5.5.5/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 133120
  Routing Descriptor Blocks:
  10.229.254.1 (Port-channel2), from 10.229.254.1, Send flag is 0x0
      Composite metric is (133120/130560), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5200 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
  172.25.10.2 (Port-channel8), from 172.25.10.2, Send flag is 0x0
      Composite metric is (133376/130816), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5210 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 3
switch2#
this has not changed the delay i am not sure why maybe because it is directly
connected


switch1(config)#int po7
switch1(config-if)#delay 1
switch1(config-if)#
ok i see the issue i will do the solution then explain the issue i had the solution
is on sw2 interface pouinting the sw4 i lower the delay
switch2#config t
Enter configuration commands, one per line.  End with CNTL/Z.
switch2(config)#int po8
switch2(config-if)#delay 1
switch2(config-if)#exit
switch2(config)#exit

switch2#sh ip eigrp top 5.5.5.5/32
IP-EIGRP (AS 1): Topology entry for 5.5.5.5/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 131072
  Routing Descriptor Blocks:
  172.25.10.2 (Port-channel8), from 172.25.10.2, Send flag is 0x0
      Composite metric is (131072/130816), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5120 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 3
  10.229.254.1 (Port-channel2), from 10.229.254.1, Send flag is 0x0
      Composite metric is (133120/130560), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5200 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
switch2#
switch2#tracert 5.5.5.5
              ^
% Invalid input detected at '^' marker.
switch2#traceroute 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
  1 172.25.10.2 8 msec 0 msec 0 msec
  2 172.25.11.1 0 msec 0 msec 0 msec
  3 172.16.16.1 0 msec *  0 msec
switch2#
success it is going the alternate way via sw4 and sw1 then to r5
consequently r2 is taking the longer path via sw2 and sw4 and sw1 as of the lower
delay
the issue i had is that the interfaces i was changing do not affect the delay
the delay is taken from the interface the update was recieved on so for sw1 it is the interface pointing r5
for sw4 it is the interface pointing to sw1 for sw2 it is the interface connecting to sw1 for the sw1 path and the interface connecting to sw4 for the switch 4 path

so i was changing the interface sw4 to sw2 which has no affect on the total

No comments:

Post a Comment