Saturday, May 10, 2014

OSPF External Path Selection, TCL PING Scripting

Lessons Learned:

Redistribution from the RIP process into the OSPF process
When the RIP router originates routes as long as the OSPF area is a normal area these are going to be TYPE 5 LSAs in the OSPF database.  Either the E1 or E2 routes, By default the routes will show as E2 and the default metric is 20.

Under the OSPF process –
We simply say –

R4(config-router)#redistribute rip
% Only classful networks will be redistributed (this is a backwards compatibility feature – only clasful summarize will be included in the OSPF database)

This will advertise the RIP routes with the default values.  To remove the classful subnets we need to add the keyword “subnets to the redist – process.

R4(config-router)#redistribute rip subnets
This should advertise anything running RIP including the connected interfaces running RIP into the OSPF database- TYPE 5 LSA”s

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag    192         0x80000001 0x00C0AA 0

Or we can view the External
  LS age: 231
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: (External Network Number )
  Advertising Router:
  LS Seq Number: 80000001
  Checksum: 0xC0AA
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address:
        External Route Tag: 0

All other OSPF routers in the topology should show the RIP routes as E2 routes:

R3#sh ip route
O E2 [110/20] via, 00:04:24, FastEthernet0/0

Also if we show the RIP route specifically

R3#sh ip route
Routing entry for
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 1
  Last update from on FastEthernet0/0, 00:06:14 ago
  Routing Descriptor Blocks:
  *, from, 00:06:14 ago, via FastEthernet0/0
      Route metric is 20, traffic share count is 1

This says – the metric is 20 the type is 2 and the forward is 1 – the forward is to get to the ASBR.
This is a function of the E2 routes. They separate the seed metric plus the metric to the ASBR.
Note: the farther away from the ASBR the Forward metric will increment. If there is ever a tie in the E2 routes, we will look at the forward Metric for the best path.

Note: if we set these routes as External type 1 routes, then there’s no difference between the metric and the forward metric. The only time this really matter is when there are multiple exit points for the domain.

We can set the metric type during redistribution.
Verify –
We need to verify can we reach the destination from the other protocol.

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/32/44 ms

And I can reach my RIP router. If we can reach the destination we can assume the redistribution is correct. If the Routing domain is large there would be a lot of checks.
For Verification of a large domain we can use TCL scripts

TCL – stands for the Tool Command Language – this is an open standards language.
IOS – supports TCL 8.3.4
-99% of programming is outside the CCIS scope
-useful in redistribution for automating PING scripts

Only problem with TCL Scripts is the syntax has to be exact and there’s not a real reference guide

TCL PING Script Example:
R3#tclsh  (staring a TCL Shell)
R3(tcl)#foreach X {  (this says create a forloop and define a variable X, for each value that X has, run the ping command for the variables value. )

#foreach x {            
+>(tcl)#} { ping $X }

The end result is it will ping these IP’s in order. 

No comments:

Post a Comment