Hi, everyone! Today I’m going to introduce OSPF link types. Please have a read below for more details.
In addition to defining the network type, OSPF also defines the link type, which are two different concepts. Link types are primarily used to describe the interfaces or neighbors of an OSPF router.
In Type 1 LSA, you can see all the links, the types of links and related content that the router that generated the LSA is connected to. With the various links described in each of the types 1 of LSA, OSPF is able to depict the topology and subnet information of the network.
In Type 1 LSAs, the values of Link ID and Link Date used to describe links vary according to the OSPF link type.
Link type | Link ID | Link data |
Stubnet | IP address | IP address mask |
TransNet | IP address | |
Point-to-Point | router ID of neighbor | IP address |
Virtul Link | router ID of neighbor | IP address |

The following sections describe each type of link.
1. Stub Network Link
If OSPF is enabled on an interface and no OSPF neighbor exists on the interface, the interface is described by using Stub Network Link. When an interface is advertised to OSPF, regardless of the Layer 2 encapsulation type (Ethernet, PPP, or HDLC), the interface is Stub Network Link if there is no OSPF neighbor on the interface. As shown in the following figure, the Stub Network Link is used to describe interface loopback0/0/0 in Type 1 LSAs.

* Link ID: 1.1.1.1 // Interface IP address
Data: 255.255.255.255 //mask
Link Type: StubNet
Metric: 0
The loopback interface is always defined as Stub Network Link. By default, the 32-bit mask is used. This is why the route learned by the IP address of the loopback interface is the host route of /32 regardless of how long the mask length is configured. No matter which OSPF network type the Loopback interface is changed to, it will never change its OSPF link type. However, the mask length in the LSA can be changed.
2.TransNet Link
For a link with two or more OSPF routers (network type is broadcast or NBMA), use TransNet link to describe the interface.
As shown in the following figure, OSPF is activated on the GE0/0/0 of R1, TransNet Link is used to describe the interface in LSA1.

* Link ID: 10.0.12.2 // Interface IP address of DR(R2)
Data: 10.0.12.1 // Interface IP address
Link Type: TransNet
Metric : 1
3. Point-To-Point Link
If the OSPF network type is Point-To-Point or P2MP (Point-To-Multipoint), use Point-To-Point Link to describe the interface, except the loopback interface.

The link that describe the interface S0/0/0 is:
* Link ID: 2.2.2.2 // router ID of neighbor(R2)
Data: 10.0.12.1 // Interface IP address
Link Type: P-2-P
Metric : 1
4. Virtual link
This type is used to describe the OSPF virtual link.
As shown in the following figure, a virtual link is set up between R2 and R3. The data of the virtual link in the LSA1 generated by R2 is as follows:

* Link ID: 3.3.3.3 //router ID of neighbor(R3)
Data : 10.0.23.2 // Interface IP address
Link Type: Virtual
Metric : 1
If you have any problems, please post them in our Community. We are happy to solve them for you!





