07-01-2023 03:11 AM - last edited on 07-05-2023 10:49 PM by Translator
Is there a distinction between an
interface and a link in ospf
An
interface describes a physical or logical interface
on the router (i.e., loopback
interfaces
ethernet ports). A link describes a relationship on the graph between two nodes.
or both have the same meaning?
Solved! Go to Solution.
07-01-2023 04:41 AM - last edited on 07-05-2023 09:46 PM by Translator
No, they are not the same.
Counter question, is there a distinction between a
physical interface and a logical interface or between a serial interface and an Ethernet interface
or between one of the four types of
Ethernet frames
?
Hopefully you agree there are distinctions in the prior question, but much overlap too. Ditto with OSPF which abstacts networks in similar and/or different ways using its own terminology.
An example of an interface vs. OSPF difference if I connect two OSPF neighbors using
a /24
on a Cisco device, if an Ethernet interface is used OSPF will be set link as
multi-point
broadcast but if a serial interface is used link will be set as
p2p
If I know there will only be two OSPF neighbors on the Ethernet interface, I can set OSPF's link type to
p2p
As in this example, OSPF link type can differ on exactly the same
interface interface and link
are distinctly different.
07-01-2023 03:13 AM - last edited on 07-05-2023 09:37 PM by Translator
for other see post
p2p
interface is same as link
p2mp
interface is different than link
07-01-2023 03:41 AM
Hi
If you were a bit "thorough" yes, there will be differences but the overall idea is almost the same. On Cisco docs we can read:
"What Do We Mean by Link-States?
OSPF is a link-state protocol. Think of a link as an interface on the router. The state of the link is a description of that interface and of its relationship to its neighbor routers.
A description of the interface would include, for example, the IP address of the interface, the mask, the type of network it is connected to, the routers connected to that network and so on.
The collection of all these link-states would form a link-state database."
In short, there´s no point to distinguish between interface and link but it will be very important for OSPF the information gathered from interfaces/links for the link-state database.
07-01-2023 03:49 AM - last edited on 07-05-2023 09:40 PM by Translator
Hello
Interface(s) = physical/logical end point of a link
Link = connection between interface(s)
07-01-2023 04:55 AM
With regard to OP, for a high level and succinct description, Paul says it very well.
07-01-2023 04:15 AM
Hello @Ganesh Devarshetty,
An interface in OSPF refers to a physical or logical interface on a router. It represents the point at which a router connects to a network or another router. Examples of interfaces include Ethernet ports, loopback interfaces, and serial interfaces. Each interface has its own IP address and associated parameters.
A link, on the other hand, describes the relationship between two adjacent routers. It represents the connection or link between two interfaces on different routers. The link is used to exchange routing information and establish neighbor relationships between OSPF routers. The link in OSPF is typically represented by the IP network address that is shared by the connected interfaces of adjacent routers.
07-01-2023 04:41 AM - last edited on 07-05-2023 09:46 PM by Translator
No, they are not the same.
Counter question, is there a distinction between a
physical interface and a logical interface or between a serial interface and an Ethernet interface
or between one of the four types of
Ethernet frames
?
Hopefully you agree there are distinctions in the prior question, but much overlap too. Ditto with OSPF which abstacts networks in similar and/or different ways using its own terminology.
An example of an interface vs. OSPF difference if I connect two OSPF neighbors using
a /24
on a Cisco device, if an Ethernet interface is used OSPF will be set link as
multi-point
broadcast but if a serial interface is used link will be set as
p2p
If I know there will only be two OSPF neighbors on the Ethernet interface, I can set OSPF's link type to
p2p
As in this example, OSPF link type can differ on exactly the same
interface interface and link
are distinctly different.
07-01-2023 07:05 AM
Thanks for crystal clear explanation.
07-01-2023 07:25 AM - last edited on 07-05-2023 09:52 PM by Translator
FYI
physical interface and logical interface is different than interface/link in OSPF
logical interface appear in show ip int brief where link not appear.
link is router link appear in show ip ospf database router.
in p2p you ca see one interface and one link
in p2mp you can see one interface but multi link.
07-01-2023 08:58 AM - last edited on 07-05-2023 10:03 PM by Translator
physical interface and logical interface is different than interface/link in OSPF
Agree, but OP question was are
interface and link
really the same in OSPF. They can be the same, but they might not be. Hence the question, I suspect. Really depends on context. Notice how you made a distinction by using the terms
physical interface and logical interface different from interface/link OSPF
logical interface appear in show ip int brief where link not appear.
link is router link appear in show ip ospf database router.
Correct, but then there's the
show ip ospf interface brief
command, which, sort of, mixes the two. ; )
in p2p you ca see one interface and one link
in p2mp you can see one interface but multi link.
True for
p2p
True for NBMA P2MP if running in that mode. OSPF also defines another method for NBMA networks, which, if physical network can support, the RFC recommends over
P2MP
When trying to truly understand definitions, I find it best to go to the source documentation. Let's look at RFC 2328, defining OSPFv2.
Within it, we find this section:
1.2. Definitions of commonly used terms
This section provides definitions for terms that have a specific meaning to the OSPF protocol and that are used throughout the text. The reader unfamiliar with the Internet Protocol Suite is referred to [Ref13] for an introduction to IP.
Actually, "link" is not used, generally, without the following word "state". But we do find, in that section:
Interface
The connection between a router and one of its attached networks. An interface has state information associated with it, which is obtained from the underlying lower level protocols and the routing protocol itself. An interface to a network has associated with it a single IP address and mask (unless the network is an unnumbered
point-to-point
network). An interface is sometimes also referred to as a link.
I've bolded an "interesting" sentence, and underlined an "interesting" word of that sentence.
At first glance, the bolded sentence appears to make
interface and link
synonymous, yet, there's that word "sometimes". Which, at least to me, implies the two terms might not be 100% synonymous, or in other words, there's some distinction between
link and interface
and whatever such distinction might be, depending on usage/context, it might not be significant "sometimes".
07-02-2023 05:29 AM - last edited on 07-05-2023 10:05 PM by Translator
show ip ospf interface brief <<- one interface
show ip ospf database router <<- many router link
07-02-2023 09:41 AM - last edited on 07-05-2023 10:13 PM by Translator
show ip ospf interface brief <<- one interface
show ip ospf database router <<- many router link
@MHM Cisco World you're very emphatic about this. But as I don't disagree, nor believe I've written anything to the contrary, unclear what's the point you're trying to make.
Is this in response to my writing "Correct, but then there's the
show ip ospf interface brief
command, which, sort of, mixes the two. ; )"?
If so that was in jest (the wink and the "sort of") as those two show commands are telling us two different things, although not quite as different as your earlier
show ip int brief and show ip ospf database router
For example, your
show ip ospf database router
doesn't mention/show physical interface descriptions at all.
To me, your earlier example would be somewhat like comparing static routes, defined on a router with what a route table might show when there's other routers running, and sharing, the same dynamic routing protocol. I.e. the route table has routes not known by just the same device's local routes. So, again in jest, when you compare
sh ip int brief
which also only has local device information with the
show ip ospf database router
which has much more information, to me, you were comparing apples to oranges, so (wink) I mentioned the command
show ip ospf int brief
to include bananas too.
If you want a (sort of) interface command to show more information about connectivity, you might try
show cdp neighbors
In your second display, this command (if CDP running on the devices - and a "dumb" switch or hub) should also show the one local interface with two neighbors, and their interfaces.
e.g.:
R0#sh cdp n
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
R2 Gig 0/0/0 158 R ISR4300 Gig 0/0/0
R1 Gig 0/0/0 154 R ISR4300 Gig 0/0/0
If you ask, what's CDP have to do with this? Exactly!
However, if you don't want to go beyond the bound of interfaces and OSPF, I would likely just use the command
show ip ospf neighbor
E.g.:
R0#sh ip os ne
Neighbor ID Pri State Dead Time Address Interface
10.1.1.2 1 FULL/DROTHER 00:00:38 1.1.1.2 GigabitEthernet0/0/0
10.1.2.2 1 FULL/BDR 00:00:38 1.1.1.3 GigabitEthernet0/0/0
That command might be considered a more serious replacement for using the commands
show ip int brief and show ip ospf database router
07-02-2023 11:45 AM - last edited on 07-05-2023 10:21 PM by Translator
Friend I want to clear points that all
link
interface
neighbor
the
link not meaning neighbor
below lab same topology I share before but this time I add LO
you can see
LO interface appear in
show ip ospf
interface
brief
appear in
show ip ospf
db router
not appear in
show ip ospf
nei
07-02-2023 02:08 PM - last edited on 07-05-2023 10:45 PM by Translator
Friend I want to clear points that all
link
interface
neighbor
the
link not meaning neighbor
below lab same topology I share before but this time I add LO
you can see
LO interface appear in show ip ospf interface
brief
appear in show ip ospf db router
not appear in show ip ospf nei
But understand, my prior reply, to yours, which I noted I was unclear about, addressed your apparent concern that
show ip ospf int brief
did not show the two routers known to OSPF through one interface, which showing the OSPF DB does. Again, don't disagree. I only suggested a show command that would show, in one command, both the interfaces and the neighbors, i.e. you can ascertain the additional OSPF logical connections on the single interface (in a multipoint network).
Yes, I can see your latest example shows OSPF defined on loopback interfaces both with the
show ip ospf int brief and show ip ospf database router
not shown with
show ip ospf nei
No surprise there. Again, my last suggested command was for a more brief display to avoid the need to use those two other show commands in that particular instance. Unfortunately, I didn't make tha clear, as I thought it was implied by the context of your prior replies.
Note, in my prior reply, I also wrote ". . .
show ip ospf
database router which has much more information . . ."
Also in that reply, I wrote "If you want a (sort of)
interface
command to show more information about connectivity . . .", and what connectivity do the loopback interfaces have?
In other words, my suggestion was NOT for an
end-all single
command, that addresses all information you may want about OSPF in some actual situation.
So if your point is,
show ip ospf db router
can be useful - 100% agree! Certainly didn't mean to imply otherwise. Did mean to imply, it might NOT be the most
optimal
(avoiding extraneous information) way to obtain some OSPF
factoid
(Consider, we've been both using the
brief
forms of the
two show interface
commands, but there are times to use the
non-brief version
of the command. Do you believe I'm also suggesting we only need the
brief
variants?)
The above, though, runs a bit far outside of the OP question.
Friend I want to clear points that all
link
interface
Okay, so be clear - in regard to OP question, "Is there a distinction between an
interface and a link in ospf.
are
link and interface
distinct or not?
And if they are distinct, why then does OSPF RFC have "An
interface
is sometimes also referred to as a link."?
07-02-2023 02:11 PM - last edited on 07-05-2023 10:47 PM by Translator
Can I know exactly
rfc of ospf
I Need to read it
Thanks
MHM
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