OSPF: Difference between revisions

667 bytes removed ,  5 years ago
Line 561:
= Concept Recap =
 
Protocol Number = 89, TTL=1, DES IP = 224.0.0.5 & 6
<pre>
'''Network Types:'''
Protocol Number = 89, TTL=1, DES IP = 224.0.0.5 & 6
Network TypesPTP:
No DR, BDR and ospf packets are sent to MC address.
PTP:
Broadcast: (ethernet, token ring, FDDI)
No DR, BDR and ospf packets are sent to MC address.
DR, BDR election occurs and communicates using .5 and .6 address.
Broadcast: (ethernet, token ring, FDDI)
DR DR,and BDR election occurs and communicateslisten usingto .5 and .6 addressaddresses.
NBMA network: (Frame relay, ATM)
DR and BDR listen to .5 and .6 addresses.
NBMAManual network:configuration (Frameof relay,neighbors ATM)and DR/BDR.
All communication via unicast
Manual configuration of neighbors and DR/BDR.
Point to multipoint:
All communication via unicast
No DR and BDR. Neighbor statement not necessary.
Point to multipoint:
Unicast
No DR and BDR. Neighbor statement not necessary.
Virtual link:
Unicast
VirtualPackets link:are unicast.
'''OSPF packet types:'''
Packets are unicast.
OSPFHello packet types:type 1
Database Hellodescription – type 12
LS Database descriptionrequest – type 23
LS requestupdate – type 34
LS updateACK – type 45
To bring neighborship up, following fields should be matched:
LS ACK – type 5
Hello interval, Dead interval, area ID, network mask, option fields and authentication, if any
To bring neighborship up, following fields should be matched:
Neighborship will not form via secondary address. Other words, router will not generate hello packet with SRC IP = secondary IP.
Hello interval, Dead interval, area ID, network mask, option fields and authentication, if any
'''DR/BDR election:'''
Neighborship will not form via secondary address. Other words, router will not generate hello packet with SRC IP = secondary IP.
DR/BDRHighest election:Priority
Tie, highest router ID
Highest Priority
Tie, highest routerinterface IDaddress.
No preempt. So, first come will elect as DR, BDR, DRother. So, always start the router which has to be DR and then BDR and then other routers.
Tie, highest interface address.
Priority=0 means ineligible to become DR/BDR.
No preempt. So, first come will elect as DR, BDR, DRother. So, always start the router which has to be DR and then BDR and then other routers.
When interface comes up, it sets DR,BDR to 0.0.0.0 and wait for ‘wait timer’= router dead interval. Within that period, if it receives hello with DR/BDR filled, accept those. Else if the time period elapse, move to BDR and then to DR.
Priority=0 means ineligible to become DR/BDR.
'''Timers:'''
When interface comes up, it sets DR,BDR to 0.0.0.0 and wait for ‘wait timer’= router dead interval. Within that period, if it receives hello with DR/BDR filled, accept those. Else if the time period elapse, move to BDR and then to DR.
Default H=10 sec and D= 40 sec
Timers:
InfTransDelay = 1 sec. change by “ip ospf transmit-delay’
Default H=10 sec and D= 40 sec
InfTransDelayRxmtInterval = 15 sec. changeChange by “ip ospf transmitretramit-delay’
'''Neighbor state machine:'''
RxmtInterval = 5 sec. Change by “ip ospf retramit-delay’
NeighborDown: stateat machine:initial
Attempt: Only in NBMA
Down: at initial
Init: Hello packet received. But couldn’t see our ID in its active neighbor list.
Attempt: Only in NBMA
Init2-way: Hello packet received. But couldn’tCould see our ID in its active neighbor list.
Exstart: Start electing master/slave to exchange DBD packets. Highest router ID becomes master.
2-way:Could see our ID in neighbor list
ExstartExchange: Startexchange electingthe master/slaveLSA toheaders exchangeusing DBD packets. Highest router ID becomes master.
Loading: Syn the LSD using LS request and LS update. In real scenario, both Exchange and loading occurs parallel.
Exchange: exchange the LSA headers using DBD packets.
Full: Database was sync-ed.
Loading: Syn the LSD using LS request and LS update. In real scenario, both Exchange and loading occurs parallel.
'''DBD packet:'''
Full: Database was sync-ed.
Have Interface MTU settings.
DBD packet:
Initial(I) bit, More (M) bit and Master/Slave (MS) bit
Have Interface MTU settings.
Initial(I)First bit,DBD Morepacket (M)sent bitwith andI/M/MS = Master1/Slave1/1 (MS)with seq bit=x
Neighbor Firstsends DBD packet sent with I/M/MS = 1/1/1 with seq =x y
After master selection, slave Neighbor sendssend DBD with I/M/MS = 10/1/10 with seq = ymaster seq + 1.
Retransmission packets are always unicast.
After master selection, slave send DBD with I/M/MS = 0/1/0 with seq = master seq + 1.
Use stub concept and summarization to reduce memory and CPU utilization.
Retransmission packets are always unicast.
'''Sequence number, checksum and age uniquely defines as LSA:'''
Use stub concept and summarization to reduce memory and CPU utilization.
Seq #:
Sequence number, checksum and age uniquely defines as LSA:
SeqFrom #:0×80000001 to 0x7fffffff
If the seq# reaches 0x7ffffff, router flushes those LSA with age = MAXage.
From 0×80000001 to 0x7fffffff
Checksum:
If the seq# reaches 0x7ffffff, router flushes those LSA with age = MAXage.
Calculated entire LSA except age field.
Checksum:
Checksum is verified every Calculated5 entiremins LSAas exceptit ageresides fieldin LSD.
Age:
Checksum is verified every 5 mins as it resides in LSD.
Age:0 to 3600 (1 Hr-MaxAge)
Age increments when it resides in LSA and also incremented by ‘Infdelay’ value as it transits an interface.
0 to 3600 (1 Hr-MaxAge)
'''Virtual Links:'''
Age increments when it resides in LSA and also incremented by ‘Infdelay’ value as it transits an interface.
Must be configured between 2 ABRs alone.
Virtual Links:
Transit area must have full routing information.
Must be configured between 2 ABRs alone.
Transit area must have fullcannot routingbe informationstub.
Usually it is the Transitworst areadesign cannotand needs to be stubchanged.
Can temporarily deploy to avoid partitioned area.
Usually it is the worst design and needs to be changed.
'''LSA types:'''
Can temporarily deploy to avoid partitioned area.
LSARouter typesLSA:
Type-1. Generated by all routers with all active networks which has ospf configured.
Router LSA:
Show ip ospf database router
Type-1. Generated by all routers with all active networks which has ospf configured.
LSAs are flooded within Showan iparea ospf database routeronly.
Above command should have LSAssame areoutput floodedin withinall routers in an area. Seq #,checksum etc should be onlysame.
Network LSA:
Above command should have same output in all routers in an area. Seq #,checksum etc should be same.
Type-2: Generated by the DR with network ID of the BC network.
Network LSA:
Show ip ospf Type-2: Generated by the DR with network ID of the BCdatabase network.
No metric field as Showin iprouter ospf database networkLSA.
LSAs are flooded within Noan metricarea field as in router LSAonly.
N/w summary LSA:
LSAs are flooded within an area only.
Type-3: Generated by ABR to advertise the networks in another area.
N/w summary LSA:
If there are multiple Type-3:routes to Generateda bydestination, ABR to advertise only the networkslowest incost anotherroute to its area along with cost metric.
Means, intra area routers use distance-vector protocol to know about inter-area routes.
If there are multiple routes to a destination, ABR advertise only the lowest cost route to its area along with cost metric.
Show ip ospf database summary
Means, intra area routers use distance-vector protocol to know about inter-area routes.
ASBR summary LSA:
Show ip ospf database summary
ASBRType-4; Same as summary LSA: except the destination advertised by ABR is ASBR.
Show ip ospf database asbr-summary
Type-4; Same as summary LSA except the destination advertised by ABR is ASBR.
AS external LSA:
Show ip ospf database asbr-summary
ASType-5; Advertise routes external LSA:to OSPF domain.
Typically redistribution of RIP, ISIS etc
Type-5; Advertise routes external to OSPF domain.
Show ip ospf database external
Typically redistribution of RIP, ISIS etc
Not associated with any area.
Show ip ospf database external
Group-Membership LSA:
Not associated with any area.
Type-6; Used in MOSPF- multicast ospf
Group-Membership LSA:
NSSA external LSA:
Type-6; Used in MOSPF- multicast ospf
NSSAType-7; externaloriginated LSA:by ASBR within NSSA
Show ip ospf database nssa-external
Type-7; originated by ASBR within NSSA
Flooded within NSSA region only.
Show ip ospf database nssa-external
ASBR can set/reset “P-bit” Floodedunder within“options NSSAfield” regionof onlyevery LSA.
Only if NSSA-ABR receives type-7 LSA with P-bit set, it will translate into type-5 LSA and flood to other areas.
ASBR can set/reset “P-bit” under “options field” of every LSA.
External Attribute LSA:
Only if NSSA-ABR receives type-7 LSA with P-bit set, it will translate into type-5 LSA and flood to other areas.
Type-8. Can be used as alternative to iBGP
External Attribute LSA:
Not deployed yet.
Type-8. Can be used as alternative to iBGP
Opaque LSA:
Not deployed yet.
OpaqueType- LSA:9,10,11
Extension to OSPF. Used Type-for 9,10,11TE in MPLS.
'''Areas:'''
Extension to OSPF. Used for TE in MPLS.
AreasBackbone area:
BackboneArea-0. Need for inter-area: communication.
If there is only Area-0.one Needarea, no need for inter-area communication.-0
All types of LSAs Ifexcept theretype-7 iscan onlybe one area, no need for area-0seen.
Stub area:
All types of LSAs except type-7 can be seen.
Single exist point for inter-area communication. But still can have more than one ABR.
Stub area:
Have info about OSPF Singledomain existareas. pointBoth forintra and inter-area communication. But still can have more than one ABRroutes.
HaveNo info about OSPFexternal (other domain) areasroutes. BothHence, intraABR andsends inter-areaa routesdefault route.
Type-1,2 and 3 LSAs can be seen.
No info about external (other domain) routes. Hence, ABR sends a default route.
All the routers should Typehave “E-1,2bit” set to 0 in andtheir 3hello LSAspackets canto beform seenadjacency.
Command: “area x stub”
All the routers should have “E-bit” set to 0 in their hello packets to form adjacency.
Totally stubby area:
Command: “area x stub”
Router has info about its area alone. No info about inter-area routes.
Totally stubby area:
Can see type-1, type-2 LSAs and single default route type-3 LSA by ABR.
Router has info about its area alone. No info about inter-area routes.
Command: ‘area x stub no-summary’
Can see type-1, type-2 LSAs and single default route type-3 LSA by ABR.
NSSA:
Command: ‘area x stub no-summary’
Same property as stub area (not totally-stub area) with exception of allowing other domain routes as Lype-7 LSA.
NSSA:
No default route from ABR. (unless ‘default-info originate’ CLI configured where N2 default route (or) ‘area x nssa no-summary’ configured. In later, IA routes will not be available and default route has IA tag)
Same property as stub area (not totally-stub area) with exception of allowing other domain routes as Lype-7 LSA.
Can see Type-1,2,3,4 and type-7 LSAs.
No default route from ABR. (unless ‘default-info originate’ CLI configured where N2 default route (or) ‘area x nssa no-summary’ configured. In later, IA routes will not be available and default route has IA tag)
Command: ‘area x nssa’.
Can see Type-1,2,3,4 and type-7 LSAs.
'''Path types:'''
Command: ‘area x nssa’.
PathIntra-area types:paths
Inter-area paths. Denoted by “IA” in show ip route.
Intra-area paths
E1:
Inter-area paths. Denoted by “IA” in show ip route.
Cost = advertised by ASBR + cost to ASBR
E1:
E2:
Cost = advertised by ASBR + cost to ASBR
Cost = advertised by ASBR. Enabled by default.
E2:
If there is only Costone =ASBR advertisedin byOSPF, there is no necessity of adding cost to ASBR. EnabledHence E2 byis default.
If there isare onlymore onethan on ASBR in OSPF, there is no necessity of adding cost to ASBR. Hence E2 isenable defaultE1.
'''Authentication:'''
If there are more than on ASBR, enable E1.
No authentication: Type-0
Simple password: Type-1
MD5 password: Type-2
'''Few points:'''
Router LSA of ABR will have “B-bit” set in router-lsa packet
Router LSA of ASBR will have “E-bit” set in router-lsa packet
When NSSA ABR, translates type-7 LSA to type-5 LSA, it advertise with “Advertising Router” field set to its own router ID and it changes to ASBR. It could be confirmed by seeing “E” bit set in router LSA packet.
“Options field” in OSPF hello, DBD and every LSA: From MSB
DN – used in MPLS VPN. To detect loop.
O- Set to indicate routers’ opaque LSA support.
DC- OSPF over Demand circuit.
EA – external attribute support
N/P bit
N bit in hello: Set to indicate support for NSSA external LSAs. Mismatch will not bring adjacency
P-bit in NSSA external LSA header: to inform ABR to translate T-7 to T-5 LSAs.
MC – set to indicate multicast ospf capability
E – E bit=0 to indicate stub area.
MT – set to indicate Multi-topology OSPF support. Under development.
'''Troubleshooting point of view:'''
Neighborship not coming UP:
Check for Hello packet parameter match
Network ID in correct area??
Access-list blocking OSPF packets??
Packet dropped on the way to CP incase if interface multicast count is incrementing??
Check Stub-area configuration?? Virtual link via stub area??
Neighborship UP but no advertised routes in database:
Enable debug and check for LSupdate packets.
Routes in OSPF database but not in routing table:
Routes via another protocol which has AD less than OSPFs??
One end of router has “ip ospf network PTP’ whereas other end router has default BC network type.
In case of external routes not installed in routing table, check whether the forwarding address is reachable. If not, configure ‘suppress-fa’ option at the NSSA ABR.
If an LSA has less age or high sequence number among others, we need to look for why this network was keep flapping and flooding updates. Might be reason for high CPU utilization.
'''Observations:'''
ABR with area-1 and area-2 only:
Routes from area-1 are not leaked into area-2 using type-3 network summary LSA.
Authentication:
Configure ‘ip ospf authentication’ to change to type-1. No user-defined password possible.
No authentication: Type-0
For loopback IP to become router-id either remove and reapply the ospf configuration or configure ‘router-id’ command.
Simple password: Type-1
DBD packet can have multiple LSA headers each can be of different type.(T1/T2)
MD5 password: Type-2
When we change the network type to ‘point-point’, the interface will send a hello with DR,BDR =0 and no neighbor IDs in active neighbor field. This makes other end router to move to init.
Few points:
In BC network: DBD, LS request and LS updates are exchanged via unicast. LS update (repeat) and LS ACK are sent to 224.0.0.5
Router LSA of ABR will have “B-bit” set in router-lsa packet
In PTP, all communications via 224.0.0.5
Router LSA of ASBR will have “E-bit” set in router-lsa packet
Changing hello packet parameters (hello interval, dead interval etc) on one end makes the other end router to ignore those hello packets which has modified parameters.
When NSSA ABR, translates type-7 LSA to type-5 LSA, it advertise with “Advertising Router” field set to its own router ID and it changes to ASBR. It could be confirmed by seeing “E” bit set in router LSA packet.
Both side of router configured with priority =0 with default n/w type, they will stuck in 2way/DRother.
“Options field” in OSPF hello, DBD and every LSA: From MSB
In an already existing stub network, if we change to totally stub, border router send an update with IA routes’ age= 3600 for flushing from database. Same as in ‘clear ip ospf process’
DN – used in MPLS VPN. To detect loop.
Redistributing RIP to ospf in a router which is inside a stub network:
O- Set to indicate routers’ opaque LSA support.
“%OSPF-4-ASBR_WITHOUT_VALID_AREA: Router is currently an ASBR while having only one area which is a stub area”
DC- OSPF over Demand circuit.
Summarization has no effect EA –of external attributeroutes support(E1/E2).
N/P bit
N bit in hello: Set to indicate support for NSSA external LSAs. Mismatch will not bring adjacency
P-bit in NSSA external LSA header: to inform ABR to translate T-7 to T-5 LSAs.
MC – set to indicate multicast ospf capability
E – E bit=0 to indicate stub area.
MT – set to indicate Multi-topology OSPF support. Under development.
Troubleshooting point of view: few
Neighborship not coming UP:
Check for Hello packet parameter match
Network ID in correct area??
Access-list blocking OSPF packets??
Packet dropped on the way to CP incase if interface multicast count is incrementing??
Check Stub-area configuration?? Virtual link via stub area??
Neighborship UP but no advertised routes in database:
Enable debug and check for LSupdate packets.
Routes in OSPF database but not in routing table:
Routes via another protocol which has AD less than OSPFs??
One end of router has “ip ospf network PTP’ whereas other end router has default BC network type.
In case of external routes not installed in routing table, check whether the forwarding address is reachable. If not, configure ‘suppress-fa’ option at the NSSA ABR.
If an LSA has less age or high sequence number among others, we need to look for why this network was keep flapping and flooding updates. Might be reason for high CPU utilization.
Observations:
ABR with area-1 and area-2 only.
Routes from area-1 are not leaked into area-2 using type-3 network summary LSA.
Authentication:
Configure ‘ip ospf authentication’ to change to type-1. No user-defined password possible.
For loopback IP to become router-id either remove and reapply the ospf configuration or configure ‘router-id’ command.
DBD packet can have multiple LSA headers each can be of different type.(T1/T2)
When we change the network type to ‘point-point’, the interface will send a hello with DR,BDR =0 and no neighbor IDs in active neighbor field. This makes other end router to move to init.
In BC network: DBD, LS request and LS updates are exchanged via unicast. LS update (repeat) and LS ACK are sent to 224.0.0.5
In PTP, all communications via 224.0.0.5
Changing hello packet parameters (hello interval, dead interval etc) on one end makes the other end router to ignore those hello packets which has modified parameters.
Both side of router configured with priority =0 with default n/w type, they will stuck in 2way/DRother.
In an already existing stub network, if we change to totally stub, border router send an update with IA routes’ age= 3600 for flushing from database. Same as in ‘clear ip ospf process’
Redistributing RIP to ospf in a router which is inside a stub network:
“%OSPF-4-ASBR_WITHOUT_VALID_AREA: Router is currently an ASBR while having only one area which is a stub area”
Summarization has no effect of external routes (E1/E2).
</pre>
 
=LAB=