Friday, December 30, 2011

OSPF P2MUL NON BROADCAST + LOOPBACK + PATH SELECTION

Today I finished off looking at ospf network types with point to multipoint non broadcast and loopback.
OSPF Network type Point-to-Multipoint Non Broadcast
-----------------------------------------------------
to enable use the command
ip ospf network point-to-multipoint non-broadcast
you manually define address with the neighbor command
This was brought in mainly to support a situation where you have multiple pvcs which are different speeds
we can use the neighbor command in the config to specify cost so cost can be given on per neighbor basis
NO DR/BDR election
it does the same next hop processing as point to multi

router ospf
neighbor 'ip' cost
neighbor 'ip' cost

OSPF network type loopback
---------------------------
ospf has a special network type for loopback (Software based loopbacks) and looped back interfaces (hardware based interfaces)
OSPF will always advertises these as /32 irregardless if the network specfied is not /32
we can change this behavious by using the command ip ospf network point-to-point if this is used it will advertise the correct mask


OSPF PATH SELECTION
--------------------
Once the database are synched between all routers path selection begins
Each router lsa includes a cost value
Best path to a link is lowest end to end cost
Cisco implementation uses bandwidth for deciding cost rfc is arbitiary on defention on how the cost should be caluclated so depends on vendor
- default cisco cost = 100 mbs/link bw

the 100 mbs is the referenced bandwith the cost for 100 mbs link is 1 the cost for 1000mb(1 gb) link is also 1  so we can see a potential issue if you
have higher bandwidth links in your organisation you would want to change the reference value to higher number using the
auto-cost reference bandwidth command under router ospf

When deceding the best path the ospf spf algorithm will look at firstly as normal the longest prefix match if there is multiple prefix matches
then the next thing it looks at is how the ospf router was learnt so in order of preference it is
Intra Area Routes  (o)
Inter Area Routes (oia)
External Type 1 (E1)
External Type 2 (E2)
NSSA Type 1 (N1)
NSSA Type 2 (N2)
then it will look at metric n distance etc

The way ospf works is that for all intra Area so internal ospf routes it will caluclate the metric using the spf algorith and taken into account all the link
states to get to that network in the area
For Inter area routes ospf will calculate the metric to the ABR the ABR will also advertise via type 3 lsa including the abr metric t links external to the
area. So the ospf internal router will add these so it cost to the ABR and ABR advertised cost to the network this will give it the ospf metric for routes
external to the area
if you do
sh ip ospf database summary "ip address" you will see the advertised distance that the abr is sending so the abr metric to the link
When a network changes externally to an area maybe on the backup route to the link the router internally in the area will recieve a update from the ABR
saying it adverised distance has changed as the distance to the ABR has not changed the router only has to do Paritial route calculation. This is much
lighter than the spf algorithm running on the routers which would happen there was internal area change. This is one of the reason it is best pratice to
split ospf into multiple areas.

Modifying Path Selection
--------------------------
OSPF uses bandwidth based cost
so we have few options for changing or influencing path selection
we could edit
on the interface the bandwidth thus affecting the cost ( this is not ideal as other things use bandwidth info which could have knock on affect for example
qos uses bandwidth on the interface
We could use the command
ip ospf cost referenced bandwidth - this would be more ideal just changing the bandwidth in relation to ospf
we could also change reference bandwidth to higher lower cost we do this with the autocost referecne bandwidth command
we could use the command neighbor 'ip ' cost
LAB
----
I will setup point to mulipoint non broadcast with various different speed links
I will also look at path selection dividing the topology into multiple areas.

First lab is the point to multipoint we will do with
r2 is the hub connecting to r1 and  r3
R1 and R3 do not have direct layer 2 connectivity to each other
R1 is higher bandwidth link than r2
 


At the moment all ospf is configured but r1,r2 and r3 are point to multipoint and r1 & r2 have p2p connection to s1
we will take a look at the routing table on r2 as it has 2 paths to s1 loopback 15.15.15.15 via r1  and via r2
r2#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 192.168.1.1, 00:00:15, Serial0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.168.1.3, 00:00:15, Serial0/0
     22.0.0.0/24 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/65] via 192.168.1.1, 00:00:16, Serial0/0
     192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
O       192.168.1.1/32 [110/64] via 192.168.1.1, 00:00:17, Serial0/0
C       192.168.1.0/24 is directly connected, Serial0/0
O       192.168.1.3/32 [110/64] via 192.168.1.3, 00:00:17, Serial0/0
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/65] via 192.168.1.3, 00:00:18, Serial0/0
     15.0.0.0/32 is subnetted, 1 subnets
O       15.15.15.15 [110/66] via 192.168.1.3, 00:00:18, Serial0/0
                    [110/66] via 192.168.1.1, 00:00:18, Serial0/0
r2#
As there both equal cost derived from the interface bandwidth of s0/0 which they are connected to it will just divide the bandwidth equally
CEF switching will decide on load balancing suppose the dlci connecting to r1 is 1mb and the dlci connecting to r3 is 512 kb. realistically there is a chance
that r3 dlci could be selected continioulsy i.e default load balancing source + destination mac
We may want to influence this decision this is what ospf point-to-multipoint non broadcast was designed for 
lets start the config on r2

r2
---
r2(config)#int s0/0
r2(config-if)#ip ospf network point-to-multipoint non-broad
ok so network type is changed under the ospf process i need to specify neighbors we will first specify with default cost than we will do unequal costs


r2(config)#router ospf 1
r2(config-router)#neighbor 192.168.1.3
r2(config-router)#neighbor 192.168.1.1
r2(config-router)#exit

r2(config)#do sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 192.168.1.1, 00:00:04, Serial0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.168.1.3, 00:00:04, Serial0/0
     22.0.0.0/24 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/65] via 192.168.1.1, 00:00:04, Serial0/0
     192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
O       192.168.1.1/32 [110/64] via 192.168.1.1, 00:00:05, Serial0/0
C       192.168.1.0/24 is directly connected, Serial0/0
O       192.168.1.3/32 [110/64] via 192.168.1.3, 00:00:05, Serial0/0
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/65] via 192.168.1.3, 00:00:06, Serial0/0
     15.0.0.0/32 is subnetted, 1 subnets
O       15.15.15.15 [110/66] via 192.168.1.3, 00:00:06, Serial0/0
                    [110/66] via 192.168.1.1, 00:00:06, Serial0/0
r2#sh ip ospf database router 22.22.22.22
            OSPF Router with ID (22.22.22.22) (Process ID 1)
                Router Link States (Area 0)
  LS age: 67
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 22.22.22.22
  Advertising Router: 22.22.22.22
  LS Seq Number: 80000009
  Checksum: 0xA07E
  Length: 72
  Number of Links: 4
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 3.3.3.3
     (Link Data) Router Interface address: 192.168.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 1.1.1.1
     (Link Data) Router Interface address: 192.168.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 192.168.1.2
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 0
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 22.22.22.22
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

r2#

ok we see both routes in the routing table in the sh ip ospf database both have cost of 64
ok so in our scenerio we  want r1 to be the priority as it is faster dlci than r3 so lets manipulate the costs
r2(config)#router ospf 1
r2(config-router)#neighbor 192.168.1.3 cost 100
r2(config-router)#neighbor 192.168.1.1 cost 12
r2(config-router)#exit

r2#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 192.168.1.1, 00:01:18, Serial0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/4] via 192.168.1.1, 00:01:18, Serial0/0
     22.0.0.0/24 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/2] via 192.168.1.1, 00:01:18, Serial0/0
     192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
O       192.168.1.1/32 [110/1] via 192.168.1.1, 00:01:19, Serial0/0
C       192.168.1.0/24 is directly connected, Serial0/0
O       192.168.1.3/32 [110/3] via 192.168.1.1, 00:01:19, Serial0/0
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/3] via 192.168.1.1, 00:01:21, Serial0/0
     15.0.0.0/32 is subnetted, 1 subnets
O       15.15.15.15 [110/3] via 192.168.1.1, 00:01:21, Serial0/0
we are only seeing the route via r1

r2#sh ip ospf database router 22.22.22.22
            OSPF Router with ID (22.22.22.22) (Process ID 1)
                Router Link States (Area 0)
  LS age: 52
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 22.22.22.22
  Advertising Router: 22.22.22.22
  LS Seq Number: 8000000B
  Checksum: 0x924
  Length: 72
  Number of Links: 4
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 3.3.3.3
     (Link Data) Router Interface address: 192.168.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 100
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 1.1.1.1
     (Link Data) Router Interface address: 192.168.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 12
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 192.168.1.2
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 0
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 22.22.22.22
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

r2#

we can see why as the metrics in the ospf database have changed.

so this is basically the function of point to multipoint non broadcast networks

Ok for the loopback network i specfied the loopback on sw1 to be 15.15.15.15/24

if we look at the routing table above it is coming in as /32

switch 1
----------
switch1#sh ip int lo0
Loopback0 is up, line protocol is up
  Internet address is 15.15.15.15/24

this is default loopback network type in ospf behaviour if we want to change it we can change the ospf network type to point to point

switch1(config)#int lo0
switch1(config-if)#ip ospf network point-to-point
switch1(config-if)#

Now r2
------
r2#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/13] via 192.168.1.1, 00:00:22, Serial0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/15] via 192.168.1.1, 00:00:22, Serial0/0
     22.0.0.0/24 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/13] via 192.168.1.1, 00:00:22, Serial0/0
     192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
O       192.168.1.1/32 [110/12] via 192.168.1.1, 00:00:23, Serial0/0
C       192.168.1.0/24 is directly connected, Serial0/0
O       192.168.1.3/32 [110/14] via 192.168.1.1, 00:00:23, Serial0/0
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/14] via 192.168.1.1, 00:00:24, Serial0/0
     15.0.0.0/24 is subnetted, 1 subnets
O       15.15.15.0 [110/14] via 192.168.1.1, 00:00:24, Serial0/0
r2#

the 15 network is now /24

ok for the next lab we need to widen it out a bit including ospf areas to view interarea etc




I have configured as per diagram
we will take a look r3 routing table
r3#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/794] via 192.168.1.2, 00:00:13, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/783] via 192.168.1.2, 00:00:13, Serial1/0
     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
O IA    4.4.4.4 [110/784] via 192.168.1.2, 00:00:13, Serial1/0
     5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/848] via 192.168.1.2, 00:00:13, Serial1/0
     6.0.0.0/32 is subnetted, 1 subnets
O IA    6.6.6.6 [110/784] via 192.168.1.2, 00:00:14, Serial1/0
     172.25.0.0/24 is subnetted, 1 subnets
O IA    172.25.13.0 [110/847] via 192.168.1.2, 00:00:16, Serial1/0
     22.0.0.0/32 is subnetted, 1 subnets
O       22.22.22.22 [110/782] via 192.168.1.2, 00:00:16, Serial1/0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O IA    10.10.10.10/32 [110/783] via 192.168.1.2, 00:00:16, Serial1/0
O IA    10.229.254.0/24 [110/783] via 192.168.1.2, 00:00:16, Serial1/0
O       10.164.49.0/24 [110/782] via 192.168.1.2, 00:00:16, Serial1/0
     192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
O       192.168.1.1/32 [110/793] via 192.168.1.2, 00:00:16, Serial1/0
C       192.168.1.0/24 is directly connected, Serial1/0
O       192.168.1.2/32 [110/781] via 192.168.1.2, 00:00:16, Serial1/0

we now see a bunch of ia routes for example 6.6.6.6 network which is in area 0

r3#sh ip ospf database
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         278         0x80000005 0x008B09 3
3.3.3.3         3.3.3.3         214         0x80000003 0x00DDCC 3
10.10.10.10     10.10.10.10     391         0x80000003 0x00C3F1 2
22.22.22.22     22.22.22.22     216         0x80000007 0x00F71B 6
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
2.2.2.2         10.10.10.10     401         0x80000001 0x000A02
4.4.4.4         10.10.10.10     401         0x80000001 0x00B74B
5.5.5.5         10.10.10.10     401         0x80000001 0x000CB2
6.6.6.6         10.10.10.10     402         0x80000001 0x005B9F
10.10.10.10     10.10.10.10     402         0x80000001 0x009853
10.229.254.0    10.10.10.10     401         0x80000001 0x0028FC
172.25.13.0     10.10.10.10     401         0x80000001 0x006799
r3#

we now are getting summary links state all originating from 10.10.10.10 which has become s2 route id. SW2 is the abr for our area
if we look 6.6.6.6 as an example
r3#sh ip ospf database summary 6.6.6.6
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Summary Net Link States (Area 1)
  Routing Bit Set on this LSA
  LS age: 955
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 6.6.6.6 (summary Network Number)
  Advertising Router: 10.10.10.10
  LS Seq Number: 80000001
  Checksum: 0x5B9F
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2
r3#
we can see the metric is 2 this metric refers to the abr metric to 6.6.6.6 not our so the total metric would be our metric to 10.10.10.10 + this metric of 2


We will do a debug of spf and take down the 6.6.6.6 network and see the affect it has on r3

on r3
-----
*Mar  1 03:21:31.212: OSPF: Detect change in LSA type 3, LSID 6.6.6.6, from 10.10.10.10 area 1
*Mar  1 03:21:31.212: OSPF: Schedule partial SPF - type 3 id 6.6.6.6 adv rtr 10.10.10.10
*Mar  1 03:21:31.212: OSPF: Service partial SPF 1/0/0
*Mar  1 03:21:31.212: OSPF process partial spfQ entry
*Mar  1 03:21:31.212: OSPF process partial spfQ LSA id 6.6.6.6: mask 255.255.255.255, type 3 adv_rtr 10.10.10.10, age 3600, seq 0x80000002 (Area 1)
*Mar  1 03:21:31.216: OSPF process summary partial ABR 0x0 txit 0x0 LSA 6.6.6.6: mask 255.255.255.255, t3 adv 10.10.10.10, age 3600, seq 0x80000002 (Area 1)
so it does partial recalculation only for an interarea network
lets take a look if we take down 1.1.1.1 r1 loopback which is in the same area
Mar  1 03:23:29.094: OSPF: Detect change in LSA type 1, LSID 1.1.1.1, from 1.1.1.1 area 1
*Mar  1 03:23:29.094: OSPF: Schedule SPF in area 1
      Change in LS ID 1.1.1.1, LSA type R, , spf-type Full
*Mar  1 03:23:34.098: OSPF: running SPF for area 1, SPF-type Full
*Mar  1 03:23:34.098: OSPF: Initializing to run spf
*Mar  1 03:23:34.098:  OSPF - spf_intra() - rebuilding the tree
*Mar  1 03:23:34.098:  It is a router LSA 3.3.3.3. Link Count 3
*Mar  1 03:23:34.098:   Processing link 0, id 22.22.22.22, link data 192.168.1.3, type 1
*Mar  1 03:23:34.098:    Add better path to LSA ID 22.22.22.22, gateway 192.168.1.2, dist 781
*Mar  1 03:23:34.098: OSPF: putting LSA on the clist LSID 22.22.22.22, Type 1, Adv Rtr. 22.22.22.22
*Mar  1 03:23:34.102:    Add path: next-hop 192.168.1.2, interface Serial1/0
*Mar  1 03:23:34.102:   Processing link 1, id 192.168.1.3, link data 255.255.255.255, type 3
*Mar  1 03:23:34.102:    Add better path to LSA ID 192.168.1.3, gateway 192.168.1.3, dist 0
*Mar  1 03:23:34.102:    Add path: next-hop 192.168.1.3, interface Serial1/0
*Mar  1 03:23:34.102:   Processing link 2, id 3.3.3.3, link data 255.255.255.255, type 3
*Mar  1 03:23:34.106:    Add better path to LSA ID 3.3.3.3, gateway 3.3.3.3, dist 1
*Mar  1 03:23:34.106:    Add path: next-hop 3.3.3.3, interface Loopback0
*Mar  1 03:23:34.106: OSPF: downheap LSA on the clist LSID 22.22.22.22, Type 1, Adv Rtr. 22.22.22.22,
                              from index 1 to index 1
*Mar  1 03:23:34.106:  It is a router LSA 22.22.22.22. Link Count 6
*Mar  1 03:23:34.106:   Processing link 0, id 1.1.1.1, link data 192.168.1.2, type 1
*Mar  1 03:23:34.106:    Add better path to LSA ID 1.1.1.1, gateway 192.168.1.1, dist 793
*Mar  1 03:23:34.110: OSPF: putting LSA on the clist LSID 1.1.1.1, Type 1, Adv Rtr. 1.1.1.1
*Mar  1 03:23:34.110:    Add path: next-hop 192.168.1.2, interface Serial1/0
*Mar  1 03:23:34.110:   Processing link 1, id 3.3.3.3, link data 192.168.1.2, type 1
*Mar  1 03:23:34.110:   Ignore newdist 881 olddist 0
*Mar  1 03:23:34.110:   Processing link 2, id 192.168.1.2, link data 255.255.255.255, type 3
*Mar  1 03:23:34.114:    Add better path to LSA ID 192.168.1.2, gateway 192.168.1.2, dist 781
*Mar  1 03:23:34.114:    Add path: next-hop 192.168.1.2, interface Serial1/0
*Mar  1 03:23:34.114:   Processing link 3, id 22.22.22.22, link data 255.255.255.255, type 3
*Mar  1 03:23:34.114:    Add better path to LSA ID 22.22.22.22, gateway 22.22.22.22, dist 782
*Mar  1 03:23:34.118:    Add path: next-hop 192.168.1.2, interface Serial1/0
*Mar  1 03:23:34.118:   Processing link 4, id 10.10.10.10, link data 10.164.49.22, type 1
*Mar  1 03:23:34.118:    Add better path to LSA ID 10.10.10.10, gateway 10.164.49.2, dist 782
*Mar  1 03:23:34.118: OSPF: putting LSA on the clist LSID 10.10.10.10, Type 1, Adv Rtr. 10.10.10.10
*Mar  1 03:23:34.122: OSPF: upheap LSA on the clist LSID 10.10.10.10, Type 1, Adv Rtr. 10.10.10.10,
                              from index 2 to index 1
*Mar  1 03:23:34.122:    Add path: next-hop 192.168.1.2, interface Serial1/0
*Mar  1 03:23:34.122:   Processing link 5, id 10.164.49.0, link data 255.255.255.0, type 3
*Mar  1 03:23:34.126:    Add better path to LSA ID 10.164.49.255, gateway 10.164.49.0, dist 782
*Mar  1 03:23:34.126:    Add path: next-hop 192.168.1.2, interface Serial1/0
*Mar  1 03:23:34.126: OSPF: downheap LSA on the clist LSID 1.1.1.1, Type 1, Adv Rtr. 1.1.1.1,
                              from index 1 to index 1
*Mar  1 03:23:34.126: OSPF: delete lsa id 10.10.10.10, type 1, adv rtr 10.10.10.10 from delete list
*Mar  1 03:23:34.130: OSPF: Add ABR Router Route to 10.10.10.10 via 192.168.1.2. Metric: 782. Area 1
*Mar  1 03:23:34.130: OSPF: insert route list LS ID 10.10.10.10, type 1, adv rtr 10.10.10.10
*Mar  1 03:23:34.130:  It is a router LSA 10.10.10.10. Link Count 2
*Mar  1 03:23:34.130:   Processing link 0, id 22.22.22.22, link data 10.164.49.2, type 1
*Mar  1 03:23:34.134:   Ignore newdist 783 olddist 781
*Mar  1 03:23:34.134:   Processing link 1, id 10.164.49.0, link data 255.255.255.0, type 3
*Mar  1 03:23:34.134:    Add better path to LSA ID 10.164.49.255, gateway 10.164.49.0, dist 783
*Mar  1 03:23:34.134:    Add path: next-hop 192.168.1.2, interface Serial1/0
*Mar  1 03:23:34.138: OSPF: downheap LSA on the clist LSID 1.1.1.1, Type 1, Adv Rtr. 1.1.1.1,
                              from index 1 to index 1
*Mar  1 03:23:34.138:  It is a router LSA 1.1.1.1. Link Count 2
*Mar  1 03:23:34.138:   Processing link 0, id 22.22.22.22, link data 192.168.1.1, type 1
*Mar  1 03:23:34.138:   Ignore newdist 857 olddist 781
*Mar  1 03:23:34.138:   Processing link 1, id 192.168.1.1, link data 255.255.255.255, type 3
*Mar  1 03:23:34.142:    Add better path to LSA ID 192.168.1.1, gateway 192.168.1.1, dist 793
*Mar  1 03:23:34.142:    Add path: next-hop 192.168.1.2, interface Serial1/0
this is only partial extract of the debug we can see we have to do a full spf recalculation this would happen all routers in the area

ok we will take a quick look at referenced bandwidth
on s1/0 i have set the bandwidth to 100 mb
int s1/0
r3(config-if)#bandwidth 100000
r3#sh ip ospf int
Serial1/0 is up, line protocol is up
  Internet Address 192.168.1.3/24, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:10
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 3
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 22.22.22.22
  Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
  Internet Address 3.3.3.3/32, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub Host
r3#

ospf cost is 1
i will now set the bandwidth to 10 gb
r3(config)#int s1/0
r3(config-if)#bandwidth 10000000
r3(config-if)#
r3#sh ip ospf int
Serial1/0 is up, line protocol is up
  Internet Address 192.168.1.3/24, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:27
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 3
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 22.22.22.22
  Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
  Internet Address 3.3.3.3/32, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub
the cost is the exact same so by default if we had a 10 g link and 100 mbs link we would look at them the same not definetly given preference to 10 g link
r3(config-router)#router ospf 1
r3(config-router)#auto-cost reference-bandwidth 1000000
% OSPF: Reference bandwidth is changed.
        Please ensure reference bandwidth is consistent across all routers.
r3(config-router)#

r3(config-if)#int s1/0
r3(config-if)#bandwidth 10000000  >>> 10 gb
r3(config-if)#exit
r3(config)#exit
r3#sh ip osp
*Mar  1 03:37:25.861: %SYS-5-CONFIG_I: Configured from console by consolef int
Serial1/0 is up, line protocol is up
  Internet Address 192.168.1.3/24, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 100
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:01
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 3
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 22.22.22.22
  Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
  Internet Address 3.3.3.3/32, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub Host


the cost for this is now 100
while if i do the 100 mbs again
r3#config t
Enter configuration commands, one per line.  End with CNTL/Z.
r3(config)#int s1/0
r3(config-if)#bandwidth 1000000
r3(config-if)#exit
r3(config)#exit

r3#sh ip ospf int
Serial1/0 is up, line protocol is up
  Internet Address 192.168.1.3/24, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 1000
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:11
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 3
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 22.22.22.22
  Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
  Internet Address 3.3.3.3/32, Area 1
  Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub Host
r3#

cost is 1000 so the 10 g is the most preference as of lower cost so now ospf can deal with higher bandwidth links

No comments:

Post a Comment