Latest News

OSPF LSA: OSPF LSA Types | Link-State Advertisement Basics

OSPF LSA: OSPF LSA Types | Link-State Advertisement Basics

Author: - Amarjit Singh

NOTE: Help has been taken from Internet and various books.

NOTE: Type 6 is used for group membership in Multicast OSPF (MOSPF), which is not implemented by Cisco. Type 8 is unused, and Types 9–11 are used for Opaque LSA, which is not used for route calculation but is used for MPLS traffic engineering.

clip_image001 Each LSA has a 20-byte common LSA header, the format for which is illustrated in below Figure

Common LSA Header Format

clip_image003

The list that follows describes the fields in the LSA header

clip_image001[1] LS Age— gives the time, in seconds, since the LSA originated. The maximum age of the LSA is 3600 seconds; the refresh time is 1800 seconds. If the LS age reaches 3600 seconds, the LSA must be removed from the database.

clip_image001[2] Options— discussed earlier in “OSPF Key Points Master Document“

clip_image001[3] LS Type— represents the types of LSA

clip_image001[4] Link-State ID— Identifies the portion of the network that is being described by the LSA. This field changes according to the LS type

clip_image001[5] Advertising Router— Represents the router ID of the router originating the LSA.

clip_image001[6] LS Sequence Number— Detects old or duplicate LSAs. The maximum sequence number is represented by 0x7FFFFFFF. The first sequence number is always 0x80000001. The sequence number 0x80000000 is reserved.

clip_image001[7] LS Checksum— Performs checksum on the LSA, not including LS age. An LSA can be corrupted during flooding or while kept in the memory, so this checksum is necessary. This field cannot have a value of 0 because 0 means that the checksum has not been performed. The checksum is performed at the time of LSA generation or when the LSA is received. It is also performed every CheckAge interval, which, by default, is 10 minutes.

clip_image001[8] Length— Includes the length of the LSA, including the 20-byte header

Types of LSA

Type

LSA

Functionality

1

Router

Defines the state and cost of the link to the neighbor and IP prefix associated with the point-to-point link.

2

Network

Defines the number of routers attached to the segment. It gives information about the subnet mask on that segment.

3

Summary network

Describes the destination outside an area but within the OSPF domain. The summary for one area is flooded into other areas, and vice versa.

4

Summary ASBR

Describes the information about the ASBR. In a single area, there will be no summary Type 4 LSA.

5

External

Defines routes to destination external to OSPF domain. Every subnet is represented by a single external LSA.

6

Group membership

 

7

NSSA

Defines routes to an external destination, but in a separate LSA format known as Type 7.

8

Unused

 

9-11

Opaque

 
Router LSA

clip_image001[9] Router LSAs are generated by each router for each area to which the router belongs.

clip_image001[10] flooded only within a particular area, because every single router in OSPF would have to carry huge amounts of detailed information

clip_image001[11] The router indicates whether it's an ABR, ASBR, or an endpoint of a virtual link

Router LSA Packet Format

clip_image005

clip_image001[12] Bit V— This bit is used to determine whether it's an endpoint of a virtual link.

clip_image001[13] Bit E— This bit is used to determine whether this router is an Autonomous System Boundary Router (ASBR).

clip_image001[14] Bit B— This bit is used to determine whether this router is an Area Border Router (ABR).

clip_image001[15] Number of Links— This includes the number of router links. Note that the router LSA includes all the router links in a single LSA for an area.

clip_image001[16] Link ID, Link Data, and Type— The Type field represents the four types of router links. The other two fields, Link ID and Link Data, represent the 4-byte IP address value, depending on the network type. One thing to note here is that there can be two types of point-to-point links, numbered and unnumbered. In case of numbered point-to-point links, the Link Data field contains the interface address that connects to the neighbor. In the case of unnumbered links, the Link Data field contains the MIBII Ifindex value, a unique value that is associated with every interface.

clip_image001[17] ToS and ToS Metric— These fields represents the type of service and are normally set to 0

clip_image001[18] Metric— This field contains the OSPF cost of a specific link. The formula to calculate OSPF cost is 108/Link bandwidth

Different Router Link Types

Type

Description

Link ID

Link Data

1

Point-to-point numbered

Neighbor's router ID

Interface IP address

1

Point-to-point unnumbered

Neighbor's router ID

MIBII IfIndex value

2

Transit

IP address of the DR

Interface IP address

3

Stub

IP network number

Subnet mask

4

Virtual link

Neighbor's router ID

Interface IP address

Network LSA

The DR generates the network LSA. If no DR exist (for example, in point-to-point or point-to-multipoint networks), there will be no network LSA. The network LSA describes all the routers attached to the network

Network LSA Packet Format

clip_image007

clip_image001[19] Network Mask— This field indicates the network mask associated with the transit link.

clip_image001[20] Attached Router— This field includes the router ID of each router associated with this transit link. The designated router also lists itself in attached routers.

Summary LSA

clip_image001[21] The summary LSA describes the destination outside the area, but still within the AS.

clip_image001[22] Summary LSAs are generated when there is more than one area provided and Area 0 is configured

clip_image001[23] The purpose of the summary LSA is to send the reduced topological information outside the area

clip_image001[24] This LSA does not carry any topological information; it carries only an IP prefix. This LSA is originated by the ABR, as follows:

  • From a nonbackbone to a backbone area, summary LSAs are generated for:

- Connected routes

- Intra-area routes

NOTE:

Only intra-area routes are advertised into the backbone to avoid loops. If there are any inter-area routes coming from nonbackbone area it means that the backbone is discontiguous. A discontiguous backbone is not allowed in OSPF network

  • From a backbone to a nonbackbone area, summary LSAs are generated for the following:

- Connected routes

- Intra-area routes

- Interarea routes

Two types of summary LSAs exist:

  • Type 3— Used for the information about the network
  • Type 4— Used for the information about the ASBR

Summary LSA Packet Format

clip_image009

clip_image001[25] Network Mask— For the Type 3 summary LSA, this field contains the network mask associated with the network. For the Type 4 summary LSA, this field must be 0

clip_image001[26] Metric— This field represents the cost of the network.

clip_image001[27] ToS and ToS Metric— These fields are normally set to 0.

Both the Type 3 and Type 4 summary LSAs use the same packet format. The important things to remember about summary LSA Types 3 and 4 are as follows:

  • The network mask in Type 3 contains the subnet mask value of the network.
  • The network mask field must be 0.0.0.0 in Type 4 LSAs.
  • In Type 3 LSAs, the Link-State ID field should have the network number.
  • In Type 4 LSAs, the Link-State ID field should have the router ID of the ASBR.
  • The advertising router field must contain the router ID of the ABR generating the summary LSA. This is true for both Type 3 and 4 LSAs.

There is one special case of summary LSAs—in cases when a stub-area ABR generates a summary default route. In this case, the Link-State ID field as well as the network mask must be 0.0.0.0

External LSA

The external LSA defines routes to destinations external to the autonomous system Domain-wide, the default route can also be injected as an external route

External LSAs are flooded throughout the OSPF domain, except to stubby areas

To install an external LSA in the routing table, two essential things must take place:

  • The calculating router must see the ASBR through the intra-area or interarea route. This means that it should have either a router LSA for the ASBR or a Type 4 LSA for the ASBR, in case of multiple areas.
  • The forwarding address must be known through an intra- or interarea route.

External LSA Packet Format

clip_image011

clip_image001[28] Network Mask— Specifies the network mask of the external network.

clip_image001[29] Bit E— Specifies the external type. If set, it is an external Type 2; otherwise, it is Type 1. The difference between type and type external is that the Type 1 metric is similar to the OSPF metric and the cost gets changed every hop; in Type 2, however, the external metric doesn't change. The metric remains the same throughout the OSPF domain

clip_image001[30] Forwarding Address— Indicates the address to which data traffic to the advertised network should be forwarded. If the value is set to 0.0.0.0, this means that the traffic should be forwarded to the ASBR. In some situations, the forwarding address will be nonzero, to avoid suboptimal routing. The following list describes events that will produce a nonzero forwarding address:

  • OSPF is enabled on the ASBR's next-hop interface.
  • The ASBR's next-hop interface is nonpassive to OSPF.
  • The ASBR's next-hop interface network type is not point-to-point or point-to-multipoint.
  • The ASBR's next-hop interface address falls into the OSPF network range.

clip_image001[31] External Route Tag— Not used by OSPF.

External LSA Output

RouterE#show ip ospf database external 10.10.10.0

LS age: 954

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 10.10.10.0 (External Network Number)

Advertising Router: 141.108.1.21

LS Seq Number: 80000003

Checksum: 0x97D8

Length: 36

Network Mask: /24

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 20

Forward Address: 0.0.0.0

External Route Tag: 0

This is a Type 2 external LSA. There are a few important things to remember here:

  • The Link-State ID field represents the external network number.
  • The advertising router field contains the router ID of the ASBR.
  • Metric Type: 2 means that the metric—20, in this case—remains the same throughout the OSPF domain.
  • A forwarding address of 0.0.0.0 means that the traffic should be forwarded directly to the ASBR.
  • The route to the nonzero forwarding address must be known through an intra-area or interarea route; otherwise, the external route will not get installed in the routing table.

You can catch me on mail@amarjit.info

No comments:

Post a Comment

Contact Us

24x7 online , we happy to answer you
tamilcypc@gmail.com

Disclaimer

This Blog and its TUT's are intended for educational purposes only, no-one involved in the creation of this TuT may be held responsible for any illegal acts brought about by this Blog or TuT.



Featured Post

Custom Domains And HTTPS Redirection Code