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:
|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:
|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 |
|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|
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.
|Number of LSAs field|
|Flags and Number of Links field|
|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 18.104.22.168/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 22.214.171.124/30 64 P2P 1/1 RT3#
Below shows the Type-1 Router-LSA originated from RT2:
RT1#sh ip ospf database router 126.96.36.199 OSPF Router with ID (188.8.131.52) (Process ID 100) Router Link States (Area 0) LS age: 78 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 184.108.40.206 Advertising Router: 220.127.116.11 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: 18.104.22.168 (Link Data) Router Interface address: 22.214.171.124 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 126.96.36.199 (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#