cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5640
Views
5
Helpful
4
Replies

ospf neighborship layer 2 or layer 3

Kashish_Patel
Level 2
Level 2

OSPF neighbors can form over layer 2 connectivity. Can the neighborship also come up if the routers are connected via layer3?

2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hello Kashish,

In fact, OSPF neighbors form their adjacency over Layer3 connectivity within a single Layer2 domain. So even within a single broadcast domain such as Ethernet LAN, OSPF first needs workable IP connectivity between the routers. It may seem that this difference is a subtle one but it is important. The IS-IS routing protocol does not use Layer3 protocols to encapsulate its messages, and instead, it truly works directly over Layer2, as opposed to OSPF.

If you are asking if OSPF is capable of creating sessions between distant (i.e. not directly connected) routers, the answer would be yes but they are used in special cases only. The first special case is the OSPF Virtual Link which allows to logically attach a distant ABR to the backbone although physically, it does not have any interface directly connected to Area 0. The second special case is a so-called OSPF Sham Link feature used in MPLS VPNs by service providers.

Best regards,

Peter

P.S.: Oh, of course, you can run OSPF through tunnels but tunneling totally breaks our neat layering From the viewpoint of the tunnel, the routers are Layer2-adjacent. From the outer IP-view, the routers are not adjacent...

View solution in original post

Other than Peter's remark,  OSPF multicast packets use a TTL of 1.

View solution in original post

4 Replies 4

Peter Paluch
Cisco Employee
Cisco Employee

Hello Kashish,

In fact, OSPF neighbors form their adjacency over Layer3 connectivity within a single Layer2 domain. So even within a single broadcast domain such as Ethernet LAN, OSPF first needs workable IP connectivity between the routers. It may seem that this difference is a subtle one but it is important. The IS-IS routing protocol does not use Layer3 protocols to encapsulate its messages, and instead, it truly works directly over Layer2, as opposed to OSPF.

If you are asking if OSPF is capable of creating sessions between distant (i.e. not directly connected) routers, the answer would be yes but they are used in special cases only. The first special case is the OSPF Virtual Link which allows to logically attach a distant ABR to the backbone although physically, it does not have any interface directly connected to Area 0. The second special case is a so-called OSPF Sham Link feature used in MPLS VPNs by service providers.

Best regards,

Peter

P.S.: Oh, of course, you can run OSPF through tunnels but tunneling totally breaks our neat layering From the viewpoint of the tunnel, the routers are Layer2-adjacent. From the outer IP-view, the routers are not adjacent...

Thanks Peter. That answers my question.

Other than Peter's remark,  OSPF multicast packets use a TTL of 1.

Yes Xie, that's a good point. OSPF hellos are multicast packets and hence routers must be layer 3 adjacent to form adjacencies as TTL is 1. Thanks. Rated as 5.

Review Cisco Networking products for a $25 gift card