Pages

Wednesday, June 23, 2010

OSPF notes

Introduction
i. A link state protocol
ii. Maintains 3 tables
a. Neighbor table
b. Topology table
c. Routing table
iii. uses SPF algorithm
iv. Send triggered updates when n/w changes
v. Refresh updates are send in every 30 min


Area concept:

Need of areas: Since OSPF is a big process, which demands a good CPU time, as the n/w grows, the process will be slower and takes time to find the best route and convergence time increases. Hence we separate the OSPF domain into areas

i.                     all areas MUST be connected to area 0
ii.                   update messages will be distributed locally
iii.                  All routers in one area will have same topology table.

OSPF neighbors

STATE: Dead
i.                     determine router ID [highest interface IP < highest loop back IP < hardcoded router-id]
ii.                   add interface to the link state database [by network command]
iii.                  send hello
a.       In broadcast/p2p network:: hello interval = 10 sec, dead interval = 40 sec.
b.      In NBMA network:: hello interval = 30 sec, dead interval = 120 sec.
c.       Hello packet contains:


MUST match
Optional
  • Hello-dead interval
  • N/w mask
  • Area ID
  • Neighbor
  • Authentication/password
  • Router-id
  • Router priority
  • DR-BDR IP address

STATE: Init
i.                     receives hello from neighbor

STATE: 2-way
i.                     Reply to hello messages
ii.                   DR-BDR election (if any)

STATE: Exstart
i.                     master-slave election
a.       decided by router priority < router ID
ii.                   Sends DBD
a.       Master sends DBD first and slave listens
b.      Slave sends DBD second  and master listens

STATE: Loading
i.                     DBDs are acknowledged and receiving updates
a.       Slave send LSR
b.      Master sends LSU for the LSR
c.       Master sends LSR
d.      Salve sends LSU for the LSR

STATE: Full
i.                     neighbors are synchronized
ii.                   SPF algorithm has to run to find out best path to each network reachable.



Cost

Cost = 100/ BW in Mbps
56K = 1785
64K =1562
T1 = 65
E1 =48
Ethernet = 10
Fast ethernet 1

DR-BDR

After Dr-BDR election, DR sends updates to all routers in the broadcast domain. All routers should send n/w change updates to only DR-BDR.
i.                     OSPF uses multicast for updates
a.       224.0.0.5 for all routers in OSPF
b.      224.0.0.6 to DR-BDR in domain.
ii.                   in point to point link there will not be any DR/BDR
iii.                  A DROTHER router will make FULL state with only DR and BDR, other routers in the domain will be in 2-WAY state.


OSPF packet types

  • Hello
  • DBD
  • LSR
  • LSA
  • LSU
  • Link state acknowledgement
i.                     LSU are send as reply to the LSR.
ii.                   One LSU may contain multiple LSA.
iii.                  LSAck will be send to each LSU received.


OSPF over NBMA [5 modes]

i.                     non-broadcast [NBMA] (RFC complained)
ii.                   point to multi point  – RFC complained)
iii.                  Point to point  – (CISCO)
iv.                 Broadcast   – (CISCO)
v.                   Point to multi point-non broadcast – (CISCO)

i.              NBMA

a.      neighbors statically configured
b.      must be in single subnet
c.       act like in LAN
d.      DR-BDR election happens

ii.         Point to multi-point

    1. must be in single subnet
    2. no DR-BDR
    3. neighbors auto detected

iii.    Point to multi point-non broadcast

a.      must be in single subnet
b.      no DR-BDR
c.       neighbors statically configured

iv.         Point to point
a.      separate subnet is possible
b.      no DR-BDR
c.       auto neighbor detection

Address summarization

i.                 Use the command: area range
ii.                   In order to hide a route from outside world use the keyword not-advertise at the end.

LSA types

i.                     router LSA
ii.                   network LSA [DR]
iii.                  summery LSA [ABR]
iv.                 ASBR summery [ ABR with ASBR IP]
v.                   External LSA [ ASBR]
vi.                 NSSA LSA - Type-7 [ASBR in not so stubby area]

Virtual link

Virtual link is used, where an area is not directly connected to area 0 and seeking a connection to area 0. This kind of situation comes when there is merger of networks demands a redesign of entire network, where virtual links are temporary fix.

area virtual-link

Transit area:
An area, which does not originate or terminate packets.  i.e a packet is moving from area 5 to area 4 through area 0 and 3, then both area 0 and 3 are transit areas.

Neighbor_id

The neighbor ABR of the transit area. i.e if router 1.1.1.1 is ABR for area 0 and 1 and router 2.2.2.2 is ABR for area 1 and 2. Area 2 is connecting to area 0 via area 1. Virtual link is created between 1.1.1.1 and 2.2.2.2. Hence the latter will be the neighbor id.

OSPF special area types

Stub area:

To make an area stub, give the following command in all routers. Because stub flag is also considered while an OSPF router add a new neighbor.

 area stub

Totally stub area:

Configure the ABR with following command:  area stub no-summery and other routers inside the area with: area stub command.

Totally stubby area is Cisco proprietary. So ABR MUST be a Cisco router, but member routers can be any make.

i.                     Stubby area blocks type 5 LSA from entering the area.
ii.                   Totally stubby area blocks type 3, 4 and 5 LSA from entering the area.

Not so stubby area [Not so totally stubby area]

Basically it is a totally stubby area to which an external protocol cloud is attached. Say, RIP network.  The router connected to RIP network becomes ASBR in OSPF domain. But as we know totally stubby area will block type-5 LSA, hence another LSA type, type-7 is introduced.  [aka NSSA LSA]
ASBR in the NSSA will generate type-7 LSA and once it reaches it ABR, it converts it into type-5 LSA and sends out to other routers (routers outside area).

Redistributed routers [E1 and E2]

E2 is the default for redistributed routes/external routes.
In E1 routes, cost will be increasing as it pass through areas; where as in E2 cost will remain same through out OSPF admin area.
E2 is used where we have a single exit point/single ASBR.
E1 is used where we have multiple ASBR. If we know the cost for different path leads to different ASBR, it will be easy for a router to select best path to the outside networks through each of the ASBR.

No comments:

Post a Comment