Monday, December 26, 2011

OSPF Type-1 Router-LSA

Network Setup for Type-1 Router-LSA and Type-2 Network-LSA

Type-1 Router-LSAs are originated from every router to other routers in the same area about the status information of its directly connected links (interfaces) to other routers and networks. Type-1 LSAs are flooded within the originating area only and never crosses an area boundary. The Link-State ID of a Type-1 Router-LSA is the Router ID of the originating router. The Link-State ID and Advertising Router fields in the LSA header are same for Router-LSAs.

OSPF Type-1 Router-LSA Format

Below lists the fields in the OSPF Type-1 Router-LSA:



Field


Description
V bit Indicates whether the advertising router is an endpoint of a virtual link.
E bit Indicates whether the advertising router is an Autonomous System Border Router (ASBR).
B bit Indicates whether the advertising router is an Area Border Router (ABR).
Number of Links Indicates the number of links of the advertising router. A Router-LSA would contain the information of all router links of the advertising router.
Link Type Indicates the 4 types of router links. Note: There are 2 types of point-to-point links – numbered and unnumbered.
Link ID and Link Data The Link ID and Link Data values vary according to the Link Type. The Link ID identifies the object to which a link connects to; while the Link Data provides extra information for a link.
Note: The LSA header contains the Link-State ID while an LSA entry contains the Link ID allowing for easier differentiation.
Metric Indicates the OSPF cost of a router link.
ToS, ToS Metric Represent the Type of Service and are normally set to 0.

The Link ID, Link Data, Link Type, Number of TOS, Metric, TOS, and TOS metric fields appear one or more times in a Router-LSA corresponding to the Number of Links field.
Note: Cisco supports only TOS = 0. The ToS and ToS Metric fields appear corresponding to the Number of TOS field. Ex: If Number of TOS is 2, there will be 2 32-bit words containing 2 instances of these fields. If Number of TOS is 0, there will be no instances of these fields.

Below lists the Link ID and Link Data values for the various Type-1 Router-LSA link types:



Type


Description


Link ID


Link Data
1 Point-to-point numbered connection to another router The Router ID of neighboring router Physical interface IP address of the router to the network
1 Point-to-point unnumbered connection to another router The Router ID of neighboring router The MIB-II ifIndex value of the unnumbered interface [1]
2 Connection to a transit network Physical interface IP address of the DR Physical interface IP address of the router to the network
3 Connection to a stub network IP network number or subnet number Subnet mask
4 Virtual link The Router ID of virtual link neighbor Physical interface IP address of the router to reach the virtual link neighbor
[1] – This value usually starts with 0.

When the connected object is another router, the Link ID is same as the Link-State ID in the Router-LSA header of the neighboring router. The Link ID is being used to find the Router-LSA of the neighboring router during the route computation process.

A transit interface is a broadcast or NBMA interface with at least one OSPF neighbor. A transit network is described by a Type-2 Network-LSA. A stub interface could be a loopback, broadcast, point-to-point, or multipoint interface on which there is no OSPF neighbor. An OSPF router advertises a multi-access interface as a stub link as long as it has no OSPF neighbors reachable through the interface. When the adjacency to the first OSPF neighbor reaches the FULL state, the OSPF router replaces the stub link as a transit link and advertises its Router-LSA with an incremented sequence number.

An OSPF router generates a single Type-1 Router-LSA for each area that it belongs to. Note: A Router-LSA OSPF packet is fragmented when there are more than 119 LSA entries in a single unauthenticated OSPF packet over an Ethernet link with 1500-byte MTU.

20-byte
IP header
24-byte
OSPF header
4-byte
Number of LSAs field
20-byte
Router-LSA header
4-byte
Flags and Number of Links field
1428 bytes
119 LSA entries; 12-byte per entry. 119 x 12-byte = 1428 bytes
Total = 1500 bytes

Below shows the interfaces on RT1, RT2, and RT3:
RT1#sh ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          100   0               192.168.1.1/32     1     LOOP  0/0
Fa0/0        100   0               10.10.10.1/24      1     BDR   1/1
RT1#
----------------------------------------------------------------------
RT2#sh ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Se1/0        100   0               20.20.20.1/30      64    P2P   1/1
Fa0/0        100   0               10.10.10.2/24      1     DR    1/1
RT2#
----------------------------------------------------------------------
RT3#sh ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Fa1/0        100   0               192.168.2.1/24     1     DR    0/0
Se0/0        100   0               20.20.20.2/30      64    P2P   1/1
RT3#

Below shows the Type-1 Router-LSA originated from RT2:
RT1#sh ip ospf database router 22.22.22.22

            OSPF Router with ID (11.11.11.11) (Process ID 100)

                Router Link States (Area 0)

  LS age: 78
  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: 80000002
  Checksum: 0x8A1D
  Length: 60
  Number of Links: 3

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 33.33.33.33
     (Link Data) Router Interface address: 20.20.20.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 20.20.20.0
     (Link Data) Network Mask: 255.255.255.252
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 10.10.10.2
     (Link Data) Router Interface address: 10.10.10.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 1


RT1#

1 comment: