09-18-2012 05:28 PM - edited 03-07-2019 08:57 AM
R5#show ip ospf database router 5.5.5.5
Please note , I'm French people, maybe my misunderstanding is due of this fact ! I know my English is not 100% perfect and sometime misleading myself.
Thanks !
Solved! Go to Solution.
09-19-2012 12:02 AM
Hello xine and Rick,
Please allow me to join.
OSPF is somewhat cumbersome in using the concept of a stub network. By definition, a stub network is a network that is connected to a single router only. In other words, a stub network has only a single OSPF router. An opposite to a stub network would be a transit network that is connected to at least two routers.
I believe that the original poster is confused by the fact that in his output, there are two networks - one on the FastEthernet, a truly stub network not leading to any other router, and another stub network describing the IP network on a point-to-point link.
This is a particular peculiarity of OSPF. When OSPF models a point-to-point interconnection between two routers, it always describes it as a point-to-point link. If, in addition, there is an IP subnet configured on this point-to-point link, OSPF creates another link record in the LSA-1 and describes this IP subnet as a stub network, leading to pretty much confusion because this network is in fact transit. Our common point0-to-point links between routers using HDLC, PPP or GRE tunneling always result in two link records in router's LSA-1: one link describing the point-to-point interconnection between two routers itself, another link describing the IP subnet on this point-to-point link, as a stub network.
The reason is that the point-to-point link is basically treated as IP Unnumbered link in OSPF. Imagine a back-to-back connection of two routers, R1 and R2, using serial interface, having both routers configured with IP Unnumbered on their serials:
R1:
interface Loopback1
ip address 10.255.255.1 255.255.255.255
interface Serial1/0
ip unnumbered Loopback1
no shutdown
ip ospf 1 area 0
R2:
interface Loopback1
ip address 10.255.255.2 255.255.255.255
interface Serial1/0
ip unnumbered Loopback1
no shutdown
ip ospf 1 area 0
Now, on either router, running show ip ospf database router would yield:
R1#show ip ospf database router
OSPF Router with ID (10.255.255.1) (Process ID 1)
Router Link States (Area 0)
LS age: 21
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.1
Advertising Router: 10.255.255.1
LS Seq Number: 80000002
Checksum: 0xFBC
Length: 36
Number of Links: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.2
(Link Data) Router Interface address: 0.0.0.6
Number of TOS metrics: 0
TOS 0 Metrics: 64
LS age: 22
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.2
Advertising Router: 10.255.255.2
LS Seq Number: 80000002
Checksum: 0xF4D5
Length: 36
Number of Links: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.1
(Link Data) Router Interface address: 0.0.0.6
Number of TOS metrics: 0
TOS 0 Metrics: 64
Note here that because the serials are configured with IP Unnumbered, the only link in each LSA-1 is a link pointing towards the opposite router.
If I reconfigured the serial interconnection to have its own subnet, say, 192.168.1.0/30, the output would change:
R1#show ip ospf database router
OSPF Router with ID (10.255.255.1) (Process ID 1)
Router Link States (Area 0)
LS age: 19
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.1
Advertising Router: 10.255.255.1
LS Seq Number: 80000004
Checksum: 0x3B71
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.2
(Link Data) Router Interface address: 192.168.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.168.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 64
LS age: 21
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.2
Advertising Router: 10.255.255.2
LS Seq Number: 80000004
Checksum: 0x2F7B
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.1
(Link Data) Router Interface address: 192.168.1.2
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.168.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 64
In this output, it is now clearly visible that the point-to-point record was maintained as before, however, a new link record has been added to each LSA-1 describing the "stub" network 192.168.1.0/30.
So the primary treatment of point-to-point links in OSPF is to consider them as IP Unnumbered. If they are not IP Unnumbered, OSPF will add an additional stub network record into the LSA-1. In fact, the LSA-1 has no other way of carrying a subnet/mask information! The only link types that can be put into LSA-1 are point-to-point links (referring to neighboring router's RID), transit networks (referring to the IP address of the DR), these stub networks we're seeing here, and virtual link that carry no address information. In other words, describing the network on a point-to-point link as a stub network is the only way OSPF can currently do it.
Hope this helps a little.
Best regards,
Peter
09-21-2012 04:38 AM
Hello xine,
But this output I understood these 2 router has established full OSPF adjency. This confuse me a bit because, serial interface has no IP address and they borrow their one from the respective router loopback interfaces which they aren't in same subnet.
Yes, these two routers have established full OSPF adjacency. And the fact that the endpoints of the serial point-to-point link are in different subnets can be confusing indeed.
Note that this is a basic property of a point-to-point link using IP Unnumbered - its endpoints are not in the same subnet. Imagine two routers connected together with a point-to-point link, each router having one LAN network. These two LAN networks are separate and must use unique, i.e. different and non-overlapping IP address ranges. Otherwise, you would have an addressing problem in your network - separate unique broadcast domains connected to different routers or different interfaces, all sharing the same IP address space.
Now, if you configure the point-to-point link between these two routers using IP Unnumbered, each of its endpoints is placed in a different subnet because it borrows its IP address from a network whose address is unique among all other networks in your topology. From this, it follows that endpoints of IP Unnumbered links must always be in different subnets.
Most protocols are aware that if they run over an IP Unnumbered link, they cannot expect that the neighbor will be in the same subnet, and therefore they skip the same-subnet checks. You should read more about IP Unnumbered here:
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094e8d.shtml
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801ec9e0.shtml
To route IP packet to each other I suppose the only option would be the interface as next option. But what about if we were specify those 2 address in the same IP subnet ?
It does not make much sense to have routers connected by a common network, and in addition, by an IP Unnubered link that uses addresses from this common network. However, even if that was the case: have a look at the contents of the LSA-1 of R1:
LS age: 21 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 10.255.255.1 Advertising Router: 10.255.255.1 LS Seq Number: 80000002 Checksum: 0xFBC Length: 36 Number of Links: 1 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 10.255.255.2 (Link Data) Router Interface address: 0.0.0.6 Number of TOS metrics: 0 TOS 0 Metrics: 64
Note the "(Link Data) Router Interface address: 0.0.0.6" line here. In case of true IP Unnumbered point-to-point links, OSPF stores a unique identifier of this interface (the SNMP MIB ifIndex) here that identifies the egress interface in a way that is neutral of addressing. So even if multiple IP Unnumbered links are being used between the same pair of routers, OSPF still knows how to distinguish between them.
if we use ethernet interface on both router with no ip configured connected them to each other and configured loopback address configured is those 2 router could established adjency ?
Without an IP address configured on an interface, this interface is not allowed to process IP packets - it can neither send nor receive IP packets. Therefore, if you had just an Ethernet between your two routers but did not assign any IP address to these Ethernet interfaces, these two routers would not be capable of establishing a neighborship. They would simply be unable to send IP packets to each other.
and what about if I configured hose two router ethernet interfaces has point to point network.
Changing the OSPF network type on these interfaces using the ip ospf network point-to-point command would change the way OSPF looks at these interfaces and how it establishes adjacencies if the interface has been IP-enabled. However, without an IP address, this interface is not IP-enabled. There are only two ways of enabling IP on an interface - either assign it an IP address, or use the IP Unnumbered feature to share IP address with another interface.
Please feel welcome to ask further!
Best regards,
Peter
09-18-2012 08:48 PM
I believe that terminology (and perhaps also dealing with English) is part of the problem.
I would start my explanation by observing that "stub" is a characteristic of a particular network. You seem to regard this as referring to the entire router. We do not have information that is complete for the router (for example where is 5.5.5.5 ?). But based on what we see so far I believe that the FastEthernet connects to the stub network while both serial interfaces are non-stub and have neighbors.
HTH
Rick
Sent from Cisco Technical Support iPad App
09-19-2012 12:02 AM
Hello xine and Rick,
Please allow me to join.
OSPF is somewhat cumbersome in using the concept of a stub network. By definition, a stub network is a network that is connected to a single router only. In other words, a stub network has only a single OSPF router. An opposite to a stub network would be a transit network that is connected to at least two routers.
I believe that the original poster is confused by the fact that in his output, there are two networks - one on the FastEthernet, a truly stub network not leading to any other router, and another stub network describing the IP network on a point-to-point link.
This is a particular peculiarity of OSPF. When OSPF models a point-to-point interconnection between two routers, it always describes it as a point-to-point link. If, in addition, there is an IP subnet configured on this point-to-point link, OSPF creates another link record in the LSA-1 and describes this IP subnet as a stub network, leading to pretty much confusion because this network is in fact transit. Our common point0-to-point links between routers using HDLC, PPP or GRE tunneling always result in two link records in router's LSA-1: one link describing the point-to-point interconnection between two routers itself, another link describing the IP subnet on this point-to-point link, as a stub network.
The reason is that the point-to-point link is basically treated as IP Unnumbered link in OSPF. Imagine a back-to-back connection of two routers, R1 and R2, using serial interface, having both routers configured with IP Unnumbered on their serials:
R1:
interface Loopback1
ip address 10.255.255.1 255.255.255.255
interface Serial1/0
ip unnumbered Loopback1
no shutdown
ip ospf 1 area 0
R2:
interface Loopback1
ip address 10.255.255.2 255.255.255.255
interface Serial1/0
ip unnumbered Loopback1
no shutdown
ip ospf 1 area 0
Now, on either router, running show ip ospf database router would yield:
R1#show ip ospf database router
OSPF Router with ID (10.255.255.1) (Process ID 1)
Router Link States (Area 0)
LS age: 21
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.1
Advertising Router: 10.255.255.1
LS Seq Number: 80000002
Checksum: 0xFBC
Length: 36
Number of Links: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.2
(Link Data) Router Interface address: 0.0.0.6
Number of TOS metrics: 0
TOS 0 Metrics: 64
LS age: 22
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.2
Advertising Router: 10.255.255.2
LS Seq Number: 80000002
Checksum: 0xF4D5
Length: 36
Number of Links: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.1
(Link Data) Router Interface address: 0.0.0.6
Number of TOS metrics: 0
TOS 0 Metrics: 64
Note here that because the serials are configured with IP Unnumbered, the only link in each LSA-1 is a link pointing towards the opposite router.
If I reconfigured the serial interconnection to have its own subnet, say, 192.168.1.0/30, the output would change:
R1#show ip ospf database router
OSPF Router with ID (10.255.255.1) (Process ID 1)
Router Link States (Area 0)
LS age: 19
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.1
Advertising Router: 10.255.255.1
LS Seq Number: 80000004
Checksum: 0x3B71
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.2
(Link Data) Router Interface address: 192.168.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.168.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 64
LS age: 21
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.255.255.2
Advertising Router: 10.255.255.2
LS Seq Number: 80000004
Checksum: 0x2F7B
Length: 48
Number of Links: 2
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.255.255.1
(Link Data) Router Interface address: 192.168.1.2
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.168.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 64
In this output, it is now clearly visible that the point-to-point record was maintained as before, however, a new link record has been added to each LSA-1 describing the "stub" network 192.168.1.0/30.
So the primary treatment of point-to-point links in OSPF is to consider them as IP Unnumbered. If they are not IP Unnumbered, OSPF will add an additional stub network record into the LSA-1. In fact, the LSA-1 has no other way of carrying a subnet/mask information! The only link types that can be put into LSA-1 are point-to-point links (referring to neighboring router's RID), transit networks (referring to the IP address of the DR), these stub networks we're seeing here, and virtual link that carry no address information. In other words, describing the network on a point-to-point link as a stub network is the only way OSPF can currently do it.
Hope this helps a little.
Best regards,
Peter
09-20-2012 06:55 PM
Hi Peter,
You defenitly had understood my confusion. But your fisrt example raised other question.
But this output I understood these 2 router has established full OSPF adjency. This confuse me a bit because, serial interface has no IP address and they borrow their one from the respective router loopback interfaces which they aren't in same subnet.
To route IP packet to each other I suppose the only option would be the interface as next option. But what about if we were specify those 2 address in the same IP subnet ?
The following question is not related to my initial post, if we use ethernet interface on both router with no ip configured connected them to each other and configured loopback address configured is those 2 router could established adjency ? and what about if I configured hose two router ethernet interfaces has point to point network.
Thanks !
09-21-2012 04:38 AM
Hello xine,
But this output I understood these 2 router has established full OSPF adjency. This confuse me a bit because, serial interface has no IP address and they borrow their one from the respective router loopback interfaces which they aren't in same subnet.
Yes, these two routers have established full OSPF adjacency. And the fact that the endpoints of the serial point-to-point link are in different subnets can be confusing indeed.
Note that this is a basic property of a point-to-point link using IP Unnumbered - its endpoints are not in the same subnet. Imagine two routers connected together with a point-to-point link, each router having one LAN network. These two LAN networks are separate and must use unique, i.e. different and non-overlapping IP address ranges. Otherwise, you would have an addressing problem in your network - separate unique broadcast domains connected to different routers or different interfaces, all sharing the same IP address space.
Now, if you configure the point-to-point link between these two routers using IP Unnumbered, each of its endpoints is placed in a different subnet because it borrows its IP address from a network whose address is unique among all other networks in your topology. From this, it follows that endpoints of IP Unnumbered links must always be in different subnets.
Most protocols are aware that if they run over an IP Unnumbered link, they cannot expect that the neighbor will be in the same subnet, and therefore they skip the same-subnet checks. You should read more about IP Unnumbered here:
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094e8d.shtml
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801ec9e0.shtml
To route IP packet to each other I suppose the only option would be the interface as next option. But what about if we were specify those 2 address in the same IP subnet ?
It does not make much sense to have routers connected by a common network, and in addition, by an IP Unnubered link that uses addresses from this common network. However, even if that was the case: have a look at the contents of the LSA-1 of R1:
LS age: 21 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 10.255.255.1 Advertising Router: 10.255.255.1 LS Seq Number: 80000002 Checksum: 0xFBC Length: 36 Number of Links: 1 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 10.255.255.2 (Link Data) Router Interface address: 0.0.0.6 Number of TOS metrics: 0 TOS 0 Metrics: 64
Note the "(Link Data) Router Interface address: 0.0.0.6" line here. In case of true IP Unnumbered point-to-point links, OSPF stores a unique identifier of this interface (the SNMP MIB ifIndex) here that identifies the egress interface in a way that is neutral of addressing. So even if multiple IP Unnumbered links are being used between the same pair of routers, OSPF still knows how to distinguish between them.
if we use ethernet interface on both router with no ip configured connected them to each other and configured loopback address configured is those 2 router could established adjency ?
Without an IP address configured on an interface, this interface is not allowed to process IP packets - it can neither send nor receive IP packets. Therefore, if you had just an Ethernet between your two routers but did not assign any IP address to these Ethernet interfaces, these two routers would not be capable of establishing a neighborship. They would simply be unable to send IP packets to each other.
and what about if I configured hose two router ethernet interfaces has point to point network.
Changing the OSPF network type on these interfaces using the ip ospf network point-to-point command would change the way OSPF looks at these interfaces and how it establishes adjacencies if the interface has been IP-enabled. However, without an IP address, this interface is not IP-enabled. There are only two ways of enabling IP on an interface - either assign it an IP address, or use the IP Unnumbered feature to share IP address with another interface.
Please feel welcome to ask further!
Best regards,
Peter
09-21-2012 10:08 AM
Thanks you for your answer, (so quick) I had missed explain myself in part of my last question, but the answer you provide answer also that question.
Thanks again !
01-17-2020 03:21 PM
Hi Peter,
Reading the RFC 2328 it says that regarding the LSA type 1 for p2p, it generates the Type 1 link as the p2p itself, plus the Type 3 stub network with the Link ID been the network address and the Data Link been the network mask, as you already explained very well.
But, there is another situation that I`m still in doubt:
In which could we have this one?
Option 1 Assuming that the neighboring router's IP address is known, set the Link ID of the Type 3 link to the neighbor's IP address, the Link Data to the mask 0xffffffff (indicating a host route), and the cost to the interface's configured output cost.[15]
Thanks in advance.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide