Re: FW: OSPF Metric of > 65535??? WTF!

From: Marko Milivojevic <markom_at_ipexpert.com>
Date: Tue, 19 Oct 2010 18:59:20 +0000

This is true only for inter-area summaries and external routes (both
type 5 and type 7), which have 24-bit field for metric. Intra-area
routes have 16-bit field for metric and have maximum value of 65535
for interface cost. However, total metric is the sum of all costs on
the path and can be higher than any of those values. It is, as
mentioned earlier, implementation-dependent, but usually 32-bit.

--
Marko Milivojevic - CCIE #18427
Senior Technical Instructor - IPexpert
FREE CCIE training: http://bit.ly/vLecture
Mailto: markom_at_ipexpert.com
Telephone: +1.810.326.1444
Web: http://www.ipexpert.com/
On Tue, Oct 19, 2010 at 18:42, Bob Sinclair <bob_at_bobsinclair.net> wrote:
> Hi Mike,
>
> I think you will find that the maximum OSPF metric is actually 2^24. B  This
> is the size of the metric field in the LSA.
>
> R5(config-router)#default-metric ?
> B <1-16777214> B OSPF default metric
>
> Above shows maximum metric that can still be advertised. B BTW; B a metric of
> 0 will also be advertised.
>
> Turn on debug ip ospf lsa-generation, kill an external route, and you will
> see the LSA is withdrawn by advertising the poisoned metric, 16777215
>
> R1#debug ip osp lsa-generation
> OSPF summary lsa generation debugging is on
> R1#
> *Oct 19 18:47:02.867: BGP(0): route 158.10.107.0/24 modified
> *Oct 19 18:47:02.991: OSPF: Generate external LSA 158.10.107.0, mask
> 255.255.255.0, type 5, age 3600, metric 16777215, tag 0, metric-type 2, seq
> 0x80000005
>
> HTH,
>
> Bob Sinclair CCIE 10427 CCSI 30427
> CIERS2 Online Instructor
> www.tinyurl.com/ciers2online
>
>
>
>> -----Original Message-----
>> From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf Of
>> Mike Kiefer
>> Sent: Tuesday, October 19, 2010 1:47 PM
>> To: ccielab_at_groupstudy.com
>> Subject: OSPF Metric of > 65535??? WTF!
>>
>> I was always under the impression the maximum metric of OSPF is 65535.
>> Anything beyond that wouldn't make it into the routing table. The
>> behavior
>> would be similar to a RIP route with a hop count of 16 that's
>> considered
>> unreachable.
>>
>> I noticed a few routes on our production network that exceeded 65535
>> mainly
>> because of network engineer stupidity.
>>
>> So I made a real simple lab in GNS3. R1 connects to R2 connects to R3.
>> R1, R2,
>> and R3 have 1.1.1.1, 2.2.2.2, and B 3.3.3.3 as loopbacks and all of the
>> links
>> are maxed out with ip ospf cost 65535.
>>
>>
>> R1(config-if)#do sh ip route
>> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
>> B  B  B  B D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
>> B  B  B  B N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
>> B  B  B  B E1 - OSPF external type 1, E2 - OSPF external type 2
>> B  B  B  B i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
>> level-2
>> B  B  B  B ia - IS-IS inter area, * - candidate default, U - per-user
>> static
>> route
>> B  B  B  B o - ODR, P - periodic downloaded static route
>>
>> Gateway of last resort is not set
>>
>> B  B  B 1.0.0.0/32 is subnetted, 1 subnets
>> C B  B  B  1.1.1.1 is directly connected, Loopback0
>> B  B  B 2.0.0.0/32 is subnetted, 1 subnets
>> O IA B  B 2.2.2.2 [110/131070] via 12.1.1.2, 00:07:10, FastEthernet0/0
>> B  B  B 3.0.0.0/32 is subnetted, 1 subnets
>> O IA B  B 3.3.3.3 [110/196605] via 12.1.1.2, 00:02:11, FastEthernet0/0
>> B  B  B 12.0.0.0/24 is subnetted, 1 subnets
>> C B  B  B  12.1.1.0 is directly connected, FastEthernet0/0
>> B  B  B 13.0.0.0/24 is subnetted, 1 subnets
>> O B  B  B  13.1.1.0 [110/131070] via 12.1.1.2, 00:02:21, FastEthernet0/0
>>
>>
>> R1(config-if)#do sh ip ospf data summ
>>
>> B  B  B  B  B  B  OSPF Router with ID (1.1.1.1) (Process ID 1)
>>
>> B  B  B  B  B  B  B  B  Summary Net Link States (Area 0)
>>
>> B  Routing Bit Set on this LSA
>> B  LS age: 654
>> B  Options: (No TOS-capability, DC, Upward)
>> B  LS Type: Summary Links(Network)
>> B  Link State ID: 2.2.2.2 (summary Network Number)
>> B  Advertising Router: 2.2.2.2
>> B  LS Seq Number: 80000002
>> B  Checksum: 0xEE3D
>> B  Length: 28
>> B  Network Mask: /32
>> B  B  B  B  TOS: 0 B Metric: 65535
>>
>> B  Routing Bit Set on this LSA
>> B  LS age: 471
>> B  Options: (No TOS-capability, DC, Upward)
>> B  LS Type: Summary Links(Network)
>> B  Link State ID: 3.3.3.3 (summary Network Number)
>> B  Advertising Router: 3.3.3.3
>> B  LS Seq Number: 80000001
>> B  Checksum: 0xA480
>> B  Length: 28
>> B  Network Mask: /32
>> B  B  B  B  TOS: 0 B Metric: 65535
>>
>> How do I get a routing metric > 65535? Why are both 2.2.2.2 and 3.3.3.3
>> only
>> showing 65535 in the DB and higher metrics in the routing table? Isn't
>> the
>> 65535 based on the fact that there are only 16 bits for metric?
>>
>> What gives???
>>
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>
>>
>>
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.862 / Virus Database: 271.1.1/3206 - Release Date:
>> 10/19/10 02:34:00
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
Blogs and organic groups at http://www.ccie.net
Received on Tue Oct 19 2010 - 18:59:20 ART

This archive was generated by hypermail 2.2.0 : Mon Nov 01 2010 - 06:42:06 ART