A router originates a router-LSA for each area that it belongs to. Such an LSA describes the collected states of the router's links to the area. The LSA is flooded throughout the particular area and no further.
The router-LSA describes the router's working connections (i.e. interfaces or links) to the area. Each Link Type is according to the kind of attached network. Each link is also labeled with its Link ID. This Link ID gives a name to the entity that is on the other end of the link.
Link Type Description Link ID
1 Point-to-point link Neighbor Router ID
2 Link to transit network Interface address of DR
3 Link to Stub network IP network number
4 Virtual Link Neighbor Router ID
The Link Data field is specified for each link. This field gives 32-bits of extra information for the link. For links to transit network, numbered point-to-point links and virtual link, this field specifies the IP interface address of the associated router interface (this is needed for routing table calculation). For links to stub network, this field specifies the stub network's IP address mask. For unnumbered point-to-point links, the link data field should be set to the unnumbered interface's MIB-II ifIndex value.
1) A router with only one Loopback interface enabled for OSPF- The router generates router-LSA with a Type-3 link (stub network).
interface loopback 0
ip address 1.1.1.1 255.255.255.255
ip ospf 100 area 0
!
Router#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 15
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0xD055
Length: 36
Number of Links: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
2) Two routers connected via point-to-point serial link- The routers generate a router-LSA with two links for each point-to-point interface. The router link (Type-1 or point-to-point link) describing the connection to the OSPF neighbor (Link ID as Neighboring Router ID) and Type-3 link (stub network) describing the subnet of the point-to-point interface (Link ID as the network/subnet number).
R2#show ip ospf database router self-originate
OSPF Router with ID (172.16.1.2) (Process ID 100)
Router Link States (Area 0)
LS age: 482
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 172.16.1.2
Advertising Router: 172.16.1.2
LS Seq Number: 80000005
Checksum: 0x445E
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 1.1.1.1
(Link Data) Router Interface address: 172.16.1.2
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 172.16.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 64
3) Two routers connected via an Ethernet network- When the adjacency is NOT formed between the two routers, a single Type-3 link is added to the router-LSA with Link ID set to the network number of the attached network and Link Data set to attached network's mask.
R1#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 63
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000003
Checksum: 0x5AA6
Length: 48
Number of Links: 2
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.1.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 10
In broadcast network type, a DR must be elected. The router is fully adjacent to the DR, or the router itself is a DR and is fully adjacent to atleast one another router, a single Type-2 link (link to transit network) is added to the router-LSA with Link ID set to IP interface address of the attached network's DR and Link Data set to router's own IP interface address.
R1#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 4
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000004
Checksum: 0x1DD1
Length: 48
Number of Links: 2
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.1.1.2
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 10
4) Virtual-link to the ABR- The router originates two router-LSAs- one for each area 1 & 2. The virtual links, the description is added to the router-LSA only when the virtual neighbor is fully adjacent. In this case, the Link ID is set to the Router ID of the virtual neighbor and Link Data is set to interface IP address associated to the virtual-link.
Consider the following-
R1 router- R2 router- R3 router-
interface loopback 0 interface loopback 0 interface loopback 0
ip address 1.1.1.1 255.255.255.255 ip address 2.2.2.2 255.255.255.255 ip address 3.3.3.3 255.255.255.255
! ! !
interface fastethernet 0/0 interface fastethernet 0/0 interface fastethernet 0/0
ip address 10.1.1.1 255.255.255.252 ip address 10.1.1.2 255.255.255.252 ip address 10.2.2.2 255.255.255.252
! ! !
interface fastethernet 0/1 interface fastethernet 0/1 interface fastethernet 0/1
ip address 10.3.3.1 255.255.255.252 ip address 10.2.2.1 255.255.255.252 ip address 10.4.4.1 255.255.255.252
! ! !
router ospf 100 router ospf 100 router ospf 100
network 10.1.1.0 0.0.0.3 area 1 network 10.1.1.0 0.0.0.3 area 1 network 10.2.2.0 0.0.0.3 area 1
network 10.3.3.0 0.0.0.3 area 0 network 10.2.2.0 0.0.0.3 area 1 network 10.4.4.0 0.0.0.3 area 2
area 1 virtual-link 3.3.3.3 ! area 1 virtual-link 1.1.1.1
! !
R1#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 948
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0xAF24
Length: 48
Area Border Router
Number of Links: 2
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.3.3.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 10
Link connected to: a Virtual Link
(Link ID) Neighboring Router ID: 3.3.3.3
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 20
Router Link States (Area 1)
LS age: 952
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 8000000D
Checksum: 0x3ABB
Length: 36
Area Border Router
Virtual Link Endpoint
Number of Links: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.1.1.2
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 10
5) Two router connected by a point-to-multipoint network- The router generates one router-LSA which contains a) a Type-1 point-to-point link with Link ID set to the Router ID of the fully-adjacent neighboring router and Link Data set to the IP address of this router b) a Type-3 Stub network with Link ID set to the router's own interface IP address and Link Data set to 0xffffffff (indicating a host route).
Consider the following-
HUB router- Spoke router-
interface serial 0/0 interface serial 0/0
no ip address ip address 10.1.1.2 255.255.255.0
encapsulation frame-relay encapsulation frame-relay
! frame-relay interface-dlci 202
interface serial 0/0.100 multipoint ip ospf network point-to-multipoint
ip address 10.1.1.1 255.255.255.0 ip ospf priority 0
frame-relay interface-dlci 101 ip ospf 1 area 0
frame-relay interface-dlci 102 !
ip ospf 1 area 0
ip ospf network point-to-multipoint
ip ospf priority 100
!
HUB#show ip ospf database router self-originate
OSPF Router with ID (10.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 145
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.1.1.1
Advertising Router: 10.1.1.1
LS Seq Number: 80000002
Checksum: 0xA8F8
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.1.1.2
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 0
Further Reading:
RFC 2328: OSPF Version 2 http://www.faqs.org/ftp/rfc/pdf/rfc2328.txt.pdf
The router-LSA describes the router's working connections (i.e. interfaces or links) to the area. Each Link Type is according to the kind of attached network. Each link is also labeled with its Link ID. This Link ID gives a name to the entity that is on the other end of the link.
Link Type Description Link ID
1 Point-to-point link Neighbor Router ID
2 Link to transit network Interface address of DR
3 Link to Stub network IP network number
4 Virtual Link Neighbor Router ID
The Link Data field is specified for each link. This field gives 32-bits of extra information for the link. For links to transit network, numbered point-to-point links and virtual link, this field specifies the IP interface address of the associated router interface (this is needed for routing table calculation). For links to stub network, this field specifies the stub network's IP address mask. For unnumbered point-to-point links, the link data field should be set to the unnumbered interface's MIB-II ifIndex value.
1) A router with only one Loopback interface enabled for OSPF- The router generates router-LSA with a Type-3 link (stub network).
interface loopback 0
ip address 1.1.1.1 255.255.255.255
ip ospf 100 area 0
!
Router#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 15
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0xD055
Length: 36
Number of Links: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
2) Two routers connected via point-to-point serial link- The routers generate a router-LSA with two links for each point-to-point interface. The router link (Type-1 or point-to-point link) describing the connection to the OSPF neighbor (Link ID as Neighboring Router ID) and Type-3 link (stub network) describing the subnet of the point-to-point interface (Link ID as the network/subnet number).
R2#show ip ospf database router self-originate
OSPF Router with ID (172.16.1.2) (Process ID 100)
Router Link States (Area 0)
LS age: 482
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 172.16.1.2
Advertising Router: 172.16.1.2
LS Seq Number: 80000005
Checksum: 0x445E
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 1.1.1.1
(Link Data) Router Interface address: 172.16.1.2
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 172.16.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 64
3) Two routers connected via an Ethernet network- When the adjacency is NOT formed between the two routers, a single Type-3 link is added to the router-LSA with Link ID set to the network number of the attached network and Link Data set to attached network's mask.
R1#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 63
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000003
Checksum: 0x5AA6
Length: 48
Number of Links: 2
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.1.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 10
In broadcast network type, a DR must be elected. The router is fully adjacent to the DR, or the router itself is a DR and is fully adjacent to atleast one another router, a single Type-2 link (link to transit network) is added to the router-LSA with Link ID set to IP interface address of the attached network's DR and Link Data set to router's own IP interface address.
R1#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 4
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000004
Checksum: 0x1DD1
Length: 48
Number of Links: 2
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.1.1.2
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 10
4) Virtual-link to the ABR- The router originates two router-LSAs- one for each area 1 & 2. The virtual links, the description is added to the router-LSA only when the virtual neighbor is fully adjacent. In this case, the Link ID is set to the Router ID of the virtual neighbor and Link Data is set to interface IP address associated to the virtual-link.
Consider the following-
R1 router- R2 router- R3 router-
interface loopback 0 interface loopback 0 interface loopback 0
ip address 1.1.1.1 255.255.255.255 ip address 2.2.2.2 255.255.255.255 ip address 3.3.3.3 255.255.255.255
! ! !
interface fastethernet 0/0 interface fastethernet 0/0 interface fastethernet 0/0
ip address 10.1.1.1 255.255.255.252 ip address 10.1.1.2 255.255.255.252 ip address 10.2.2.2 255.255.255.252
! ! !
interface fastethernet 0/1 interface fastethernet 0/1 interface fastethernet 0/1
ip address 10.3.3.1 255.255.255.252 ip address 10.2.2.1 255.255.255.252 ip address 10.4.4.1 255.255.255.252
! ! !
router ospf 100 router ospf 100 router ospf 100
network 10.1.1.0 0.0.0.3 area 1 network 10.1.1.0 0.0.0.3 area 1 network 10.2.2.0 0.0.0.3 area 1
network 10.3.3.0 0.0.0.3 area 0 network 10.2.2.0 0.0.0.3 area 1 network 10.4.4.0 0.0.0.3 area 2
area 1 virtual-link 3.3.3.3 ! area 1 virtual-link 1.1.1.1
! !
R1#show ip ospf database router self-originate
OSPF Router with ID (1.1.1.1) (Process ID 100)
Router Link States (Area 0)
LS age: 948
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0xAF24
Length: 48
Area Border Router
Number of Links: 2
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.3.3.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 10
Link connected to: a Virtual Link
(Link ID) Neighboring Router ID: 3.3.3.3
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 20
Router Link States (Area 1)
LS age: 952
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 8000000D
Checksum: 0x3ABB
Length: 36
Area Border Router
Virtual Link Endpoint
Number of Links: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.1.1.2
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 10
5) Two router connected by a point-to-multipoint network- The router generates one router-LSA which contains a) a Type-1 point-to-point link with Link ID set to the Router ID of the fully-adjacent neighboring router and Link Data set to the IP address of this router b) a Type-3 Stub network with Link ID set to the router's own interface IP address and Link Data set to 0xffffffff (indicating a host route).
Consider the following-
HUB router- Spoke router-
interface serial 0/0 interface serial 0/0
no ip address ip address 10.1.1.2 255.255.255.0
encapsulation frame-relay encapsulation frame-relay
! frame-relay interface-dlci 202
interface serial 0/0.100 multipoint ip ospf network point-to-multipoint
ip address 10.1.1.1 255.255.255.0 ip ospf priority 0
frame-relay interface-dlci 101 ip ospf 1 area 0
frame-relay interface-dlci 102 !
ip ospf 1 area 0
ip ospf network point-to-multipoint
ip ospf priority 100
!
HUB#show ip ospf database router self-originate
OSPF Router with ID (10.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 145
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.1.1.1
Advertising Router: 10.1.1.1
LS Seq Number: 80000002
Checksum: 0xA8F8
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.1.1.2
(Link Data) Router Interface address: 10.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 0
Further Reading:
RFC 2328: OSPF Version 2 http://www.faqs.org/ftp/rfc/pdf/rfc2328.txt.pdf
0 comments:
Post a Comment