cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4795
Views
20
Helpful
6
Replies

OSPF termonilogy - Stub network

xine xine
Level 1
Level 1
Hi,
I'm currently in the process to renew my CCNP certification, because I did ot used a lot of dynamic routing technologie I read the new certification CCNP routing exam from Cisco Press, CCNP ROUTE 642-902 - Official Certification Guide from Wendell Odom, CCIE No. 1624

In this book the author talk about "Stub network " in OSPF. In glossairy, I understand a stub network have not more than one router, byt this I understand it is like a unique router in remote office and stub network is the network where are located users in this office. I mean the router should not lead to another router.
So if this is true, how can I have a neighbor router on stub network ? this make no sense to me ?
The router from which those command are run is the router 5.5.5.5.  The 2 serial interfaces have ABR neighbors routers.  But the "show ip ospf database router 5.5.5.5" showing they are connected to a "stub network"
Here is an example from the book (page 183 in PDF file)

R5#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
se0/0.2 5 5 10.10.25.5/29 64 P2P 1/1
se0/0.1 5 5 10.10.15.5/29 64 P2P 1/1
fa0/0 5 5 10.10.5.5/27 1 DR 0/0
R5#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:30 10.10.25.2 Serial0/0.2
1.1.1.1 0 FULL/ - 00:00:38 10.10.15.1 Serial0/0.1


R5#show ip ospf database router 5.5.5.5

Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.10.25.0
(Link Data) Network Mask: 255.255.255.248
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 1.1.1.1
(Link Data) Router Interface address: 10.10.15.5
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.10.15.0
(Link Data) Network Mask: 255.255.255.248
Number of TOS metrics: 0
TOS 0 Metrics: 64

      

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 !

2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

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

View solution in original post

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

View solution in original post

6 Replies 6

Richard Burts
Hall of Fame
Hall of Fame

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

HTH

Rick

Peter Paluch
Cisco Employee
Cisco Employee

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

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 !

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

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 !

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.