OSPF - Type 1 LSA
OSPF uses various types of Link State Advertisements (LSAs) to share network information and to populate their OSPF link state database (LSDB). Type 1 LSAs are those that are flooded to all OSPF routers within an OSPF area.
Within a Type1 LSA, you will find a list with all the directly connected links of this router. Each link is identified with two elements:
- A Link ID which is the the network prefix in question
- A Link Type which describes the nature of the specific link
The following is a Wireshark packet capture of a Type1 LSA:
Frame 15: 434 bytes on wire (3472 bits), 434 bytes captured (3472 bits) Ethernet II, Src: c2:04:55:cc:04:01 (c2:04:55:cc:04:01), Dst: c2:00:46:ad:00:00 (c2:00:46:ad:00:00) Internet Protocol Version 4, Src: 192.168.12.1, Dst: 192.168.12.2 Open Shortest Path First OSPF Header Version: 2 Message Type: LS Update (4) Packet Length: 400 Source OSPF Router: 1.1.1.1 Area ID: 0.0.0.20 Checksum: 0xd794 [correct] Auth Type: Null (0) Auth Data (none): 0000000000000000 LS Update Packet Number of LSAs: 11 LSA-type 1 (Router-LSA), len 48 .000 0001 1011 1110 = LS Age (seconds): 446 0... .... .... .... = Do Not Age Flag: 0 Options: 0x22, (DC) Demand Circuits, (E) External Routing LS Type: Router-LSA (1) Link State ID: 5.5.5.5 Advertising Router: 5.5.5.5 Sequence Number: 0x80000004 Checksum: 0x7caa Length: 48 Flags: 0x00 Number of Links: 2 Type: Stub ID: 192.168.120.0 Data: 255.255.255.0 Metric: 10 Link ID: 192.168.120.0 - IP network/subnet number Link Data: 255.255.255.0 Link Type: 3 - Connection to a stub network Number of Metrics: 0 - TOS 0 Metric: 10 Type: Transit ID: 192.168.12.2 Data: 192.168.12.2 Metric: 10 Link ID: 192.168.12.2 - IP address of Designated Router Link Data: 192.168.12.2 Link Type: 2 - Connection to a transit network Number of Metrics: 0 - TOS 0 Metric: 10 LSA-type 1 (Router-LSA), len 36 LSA-type 2 (Network-LSA), len 32 LSA-type 3 (Summary-LSA (IP network)), len 28 LSA-type 3 (Summary-LSA (IP network)), len 28 LSA-type 3 (Summary-LSA (IP network)), len 28 LSA-type 4 (Summary-LSA (ASBR)), len 28 LSA-type 5 (AS-External-LSA (ASBR)), len 36 LSA-type 5 (AS-External-LSA (ASBR)), len 36 LSA-type 5 (AS-External-LSA (ASBR)), len 36 LSA-type 5 (AS-External-LSA (ASBR)), len 36
This OSPF update has two Type1 LSAs. The first has a link ID of 192.168.20.0 and has a stub link type, while the second has a link ID of 10.0.20.2 and a link type of transit.
There are four link types:
- Point-to-point
- Transit
- Stub
- Virtual link
Notice that the destination address of the IP packet containing this LSA is unicast. This is the case because this particular OSPF LS update packet contains multiple LSA types, some of which need to be sent in unicast. However, when an LS Update contains only Type 1 LSAs, the LSA is indeed flooded to the whole area. Notice the following packet:
Frame 15: 110 bytes on wire (880 bits), 110 bytes captured (880 bits) Ethernet II, Src: c2:00:56:ab:00:00 (c2:00:56:ab:00:00), Dst: IPv4mcast_05 (01:00:5e:00:00:05) Internet Protocol Version 4, Src: 10.0.20.2, Dst: 224.0.0.5 Open Shortest Path First OSPF Header Version: 2 Message Type: LS Update (4) Packet Length: 76 Source OSPF Router: 5.5.5.5 Area ID: 0.0.0.20 Checksum: 0x3b48 [correct] Auth Type: Null (0) Auth Data (none): 0000000000000000 LS Update Packet Number of LSAs: 1 LSA-type 1 (Router-LSA), len 48 .000 0000 0000 0001 = LS Age (seconds): 1 0... .... .... .... = Do Not Age Flag: 0 Options: 0x22, (DC) Demand Circuits, (E) External Routing LS Type: Router-LSA (1) Link State ID: 5.5.5.5 Advertising Router: 5.5.5.5 Sequence Number: 0x80000005 Checksum: 0x0a40 Length: 48 Flags: 0x00 Number of Links: 2 Type: Stub ID: 192.168.20.0 Data: 255.255.255.0 Metric: 10 Link ID: 192.168.20.0 - IP network/subnet number Link Data: 255.255.255.0 Link Type: 3 - Connection to a stub network Number of Metrics: 0 - TOS 0 Metric: 10 Type: Stub ID: 10.0.20.0 Data: 255.255.255.252 Metric: 10 Link ID: 10.0.20.0 - IP network/subnet number Link Data: 255.255.255.252 Link Type: 3 - Connection to a stub network Number of Metrics: 0 - TOS 0 Metric: 10
This LS Update contains only Type 1 LSAs, and thus the destination address is the Multicast address for all OSPF routers.