LS Updates (and Advertisements):
Note there is no LS Advertisement packet as such. Link State Update is the type of OSPF packet that carries many LS advertisements
Each Link State Update packet carries a collection of link state advertisements one hop further from its origin. Several link-state advertisement may be included in a single LS Update packet. If any router notices a change in its networks, it sends that particular type of LS Update to the DR and BDR.
Link State Update (carries Advertisements), it’s format is as given below:
OSPF PACKET HEADER |
---|
LINK STATE ADVERTISEMENT HEADER |
LS ADVERTISEMENT DATA - for link I (say this has a stub n/w (eg: loopback lo1) LS Advertisement) |
LS ADVERTISEMENT DATA - for link II (say this has a stub n/w (eg: loopback lo2) LS advertisement) |
LS ADVERTISEMENT DATA - for link III (say this has a transit n/w LS advertisement) |
--------------------------------------------------------------------------------------------------------------------------------
Link State Advertisement Formats:
http://www.freesoft.org/CIE/RFC/1583/109.htm
They are sent within LS Updates. Depending on the change, different types of LS Type, the LS Advertisement within LS Update changes as given below:
LS Advertisement Header: (Universal for all LS Types) http://www.freesoft.org/CIE/RFC/1583/110.htm
‘LS Age’ Field: The time in seconds since the link state advertisement was originated.
‘*Advertising Router*’ Field: This field specifies the OSPF Router ID of the LSA’s originator.
- For router-LSAs, this field is identical to the Link State ID field. (in type 1)
- Network-LSAs are originated by the network’s Designated Router. (in type 2)
- Summary-LSAs originated by area border routers. (in type 3)
- AS-external-LSAs are originated by AS boundary routers. (in type 5)
‘LS Sequence Number’ Field: Detects old or duplicate link state advertisements. Successive instances of a link state advertisement are given successive LS sequence numbers.
‘*Link State Type’* Field and ‘*Link State ID* Field:
- LS ID field identifies the portion of the internet environment that is being described by the advertisement. The contents of this field depend on the advertisement's LS type. For example, in Type 2 advertisements the Link State ID is set to the IP interface address of the Designated Router (from which the network's IP address can be
- derived).
‘Advertising Router’:
- It carries the router ID of the router that is sending the data. If I am the DRO and I send an LSU to the DR, then, LS ID and the Advertising Router is same as my Router ID. When it does to DR, then, the DR does not change anything in the LS Advertisement header. It changes only the OSPF Packet Header. Even in the LS Acknowledgement, the LS ID and Advertising ID will be the same.
- The Router ID of the router that originated the link state advertisement. For example, in network links advertisements this field is set to the Router ID of the Designated Router.
Type 1 LSA Advertisement: (also called as ‘Router Link Advertisement’)
- http://www.freesoft.org/CIE/RFC/1583/111.htm
- This type of LSA is sent inside the area to which the network segment belong.
- Example: http://www.getnetworking.net/ospf/router-lsa
- It is sent by each router within an area
- NOTE: Using LSA type-1 is called Router LSA because it contains entire details of one particular router
- Type 1 - Router LSA: the router announces its presence and lists the links to other routers or networks in the same area, together with the metrics to them. Type 1 LSAs are flooded across their own area only. The link-state ID of the type 1 LSA is the originating router ID.
Type 2 LSA Advertisement: (also called as Network Link Advertisement’)
This type of LSA is sent inside the area to which the network segment belong.
It is sent only by the DR
Type 2 LSAs are flooded within area, but they don’t leave the area in which they are generated
2 cases when the information in LS Database learnt from Network LSAs should be flushed:
- When the DR router changes
- If the DR’s Router ID changes
The ‘Attached Router’ field tells all the Router-IDs of the routers connected to the DR.
NOTE: Network LSA contains DR’s interface IP address, the segment’s subnet mask and the routers (ie. Router-ID) that are in the same subnet. So, this type of LSA is needed by other routers to map the already received type-1 LSA to the subnet mask using the DR’s Interface IP address (DR’s interface IP address is common to both Type-1 and 2) <<<See classnotes- 2nd last page>>>
Type 2 - Network LSA: the designated router (DR) on a broadcast segment lists which routers are joined together by the segment. Type 2 LSAs are flooded across their own area only. The link-state ID of the type 2 LSA is the IP interface address of the DR.
Type 3 LSA Advertisement: (also called as Summary Link Advertisement’)
- http://www.freesoft.org/CIE/RFC/1583/113.htm
- Example: http://www.getnetworking.net/ospf/summary-lsa-type-3
- It is generated only by the ABR. It is sent to both the interfaces (in different areas) and carry each other’s Summary LSA
- The ABR always advertises the metric (which is the cost) as 10 for all networks in its area to the other areas
Type 4 LSA (Summary LSA)
- Has the same format as Type 3 LSA, only the LS ID changes.
- It is generated by ABRs (that connect different area)
- When a ABR notices that another router connected to it is an ASBR (Autonomous System Border Router .ie. connects to another router outside this autonomous system) using the ASBR’s hello packets that has the ‘E’ flag set; the ABR then sends type-4 LSA to other routers telling who the ASBR is.
- It is regenerated by all the ABRs inside an AS and is flooded to all routers
- LSA Type-4 contains the Router ID of the ASBR
- Using the LSA Type-4, other routers know where the ASBR is located
Type 5 LSA Advertisement: (also called as Autonomous System External LSA’)
- http://www.freesoft.org/CIE/RFC/1583/114.htm
- Type 5 LSA is generated by ASBR
- The ASBR uses type 5 LSA to send all the routes that it learnt from the external Autonomous System to other routers inside the autonomous system.
- Separate Type-5 LSAs are made for each destination (known to the router) which is external to the AS.
- The Link State ID (in LSA header) contains the IP Address of Destination (which is external to the AS)
- The Advertising Router (in LSA header) is the ASBR’s Router ID
- The Subnet Mask field (in LSA Type-5) contains the destination’s subnet mask
- E, or External Metric bit (in LSA Type-5), specifies the type of external metric to be used with this route. If the E-bit is set to 1, the metric type is E2. If the E-bit = 0, the metric type is E1.
- Metric is the cost of the route, as set by the ASBR.
- The Forwarding Address field (in LSA Type-5) contains the address to which packets for the advertised destination should be forwarded. If the forwarding address is 0.0.0.0, packets will be forwarded to the originating ASBR.
We are using the same topology as the Metric topology. The RID of MT701 is 100.100.100.100
Now, we connected mt701 to mt708. In mt708, we use static route only and make mt701 as ASBR. Then, if we see the #show ip ospf database in mt702, then, we get below output:
No comments:
Post a Comment