Closed zhaohuabing closed 4 years ago
Good q. It is a dense sentence.
In Link state protocols, the subnets associated with the link are advertised as part of the link information instead of just a prefix reachability the way BGP does. Consider the following output of leaf02's link state advertisement and see how the subnet 17216.2.0/24 is advertised as associated with a stub link network:
OSPF Router with ID (10.0.0.11)
Router Link States (Area 0.0.0.0)
LS age: 1050
Options: 0x2 : *|-|-|-|-|-|E|-
LS Flags: 0x6
Flags: 0x0
LS Type: router-LSA
Link State ID: 10.0.0.12
Advertising Router: 10.0.0.12
LS Seq Number: 80000028
Checksum: 0xe7fd
Length: 72
Number of Links: 4
Link connected to: Stub Network
(Link ID) Net: 10.0.0.12
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metric: 0
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.0.0.21
(Link Data) Router Interface address: 0.0.0.3
Number of TOS metrics: 0
TOS 0 Metric: 100
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.0.0.22
(Link Data) Router Interface address: 0.0.0.4
Number of TOS metrics: 0
TOS 0 Metric: 100
Link connected to: Stub Network
(Link ID) Net: 172.16.2.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metric: 10
OK, I get that the subnets are advertised. But I still don't understand this part "except that they advertise them via locally attached links to those subnets".
I assume that the advertisements are sent to its neighbor routers, so why "they advertise them via locally attached links to those subnets"? Should "they advertise them(the subnets) via the links to the peer router"?
Excuse me if the question is too naive, I'm not familiar with route protocols.
There are 2 separate constructs: IP address/network reachability and interface connectivity. In a routing protocol such as BGP, only the IP address/network reachability is advertised. In a link-state protocol, only the link connectivity is advertised. In other words, in link state protocols, link state is the only (not entirely true) first class citizen. Every IP address is always associated with an interface. And so in link-state protocols, the IP address associated with the link is advertised as an attribute of that link.
Is that clearer?
It's clear. Now I understand it. This sentence means that link-state protocols are using a different way to advertise the locally connected networks to their neighbors. Thanks for the explanation.
I don't get the below paragraph, could you please elaborate it? Thanks.
"R1 and R4, of course, advertise their reachability to their locally attached subnets as well, except that they advertise them via locally attached links to those subnets (there are other ways such as via redistribute, but we’ll ignore them for now). "