Tuesday, September 20, 2016

OSPF–LINK STATE PROTOCOL -THEORY

OSPF– Link State Protocol

Hello Packets send every 10sec – to make neighbors table

Metric – 10power 8 /bandwidth

LSA Made, State link broadcast – finally each routers knows entire Topology

Dijiktra’s Algorithmrunning to find best path

Every 30 sec sending LSA Broadcast

Links goes down OSPF algorithm need to run.

Area for administrative convenience

Works all the routers

Support onlyip protocol

LSA flooding: DR /BDR /OBDR

DR: based on the priority and router id. If priority is same and check

Router id (highest ip add)

DR:224.0.0.6

BDR:224.0.0.5

Router(Config)# router ospf process id

Network NID WCM area area no.

(process id should not same but area no should be same)

Show ip ospf interface e0

Sh ip ospf neighbors

OSPF Types of network

Broadcast multi-access

Single packet delivery to all nodes on the network DR and BDR required

NBMA Allow multi-access but no broadcast ability special ospf config

Point to Point –direct connection no dr and bdr required

Point to multipoint

Single interface on one router and multiple destination router.



OSPF General

Backbone router: Area 0

All routers should connect to this area.

Area Border router:

Connected to other routers but atleast one interface connected to area 0

Autonomous System Border Router

Places router from another protocol into OSPF domain router distribution

Summarization can done only ABR or ASBR

Regular area: Non backbone area its database contains both internal and

External routes

Stub Area: Database contain only internal routes and a default route

totally stubby area: database contains routes only for its own area & default

Non so stubby area:

database contain internal routes, routes distributed from connected routing

Process and optionally a default route

LSA7 advertises routes in another routing domain Generated by an ASBR with in a NSSA





Link state routing protocol OSPF & IS-IS

OSPF router identified by RID (router ID) in the entry of Link State Database (LSDB).

Router id – router picks the highest IP address out of all up interfaces.

Router id is chosen when the IOS is initially loaded. New address won’t take after restated by Clear ip OSPF processthen reload the router.


Neighbor forms:

Same subnet then discover the OSPF neighbors, OSFP send hello packets out 224.0.0.5

LSA send out 224.0.0.6


Condition:

Same subnet mask and same sub net

Hello time 10 secs by default and dead time = 4*hello time

OSPF area id <=50

Authentication password

When discover other neighbors, the routers run spf algorithm to fill their routing table. In the beginning, both a and b are down. If router a receives router b’s hellow message (with router A not on the list of neighbors) and decide that router b can be a neighbor (all criteria meet) . This is initialization. This is two way state for neighbors.

Both ther tourers recognize others, they began exchange their LSDB.


Point to point topology 2 routers directly connected to each other. In case LSDB are directly advertised and updated between the routers until they both become fully adjacent.


If 10 routers on the same subnet, you would be over load of the traffic. In this case you need Designated Router (DR) that act as the boss that distribute the information to all the employees.

Employees are not allowed to talk to each other. DR has a backup called BDR. All other routers are known as DROTHER.

DR election. Range 0-255 with o never considered for election.

Highest OSPF Priority becomes DR, if Priority ties, Highest RID wins.

Second highest OSPF become BDR, if priority ties second highest RID wins.

Show ip ospf database - LSA contain an entry for each know routers RID, Its interface, ip address mask and subnet. As well as all the routers reachable from that router.

Logical division called AREA.

Area border routers between areas and facilitated communication between routers by manual summarize the routes (this reduce the number of routes).

Belongs to both areas and require more memory and cpu since its process router about both areas.

Configuration:


# router OSPF <Porcess Id> process id 1-65535

optional

# router-id id-value

Configure ip address for loop back interface.

# network ip address wildcard mask area area-id

# network 10.2.1.0 0.0.0.255 area area 2

optional

# IP ospf hello-interval time

# ip ospf dead-interval time

# ip ospf retransmit-intervel time


Interface authenticaton

# ip ospf authenticaton

Router command

# area authentication

Optional

Multiple equal cost routes using the Maximum-path number router subcommand.

Show ip ospf interface

Loadbalance over 4 equl-cost paths. It can support 16 routest by configuration.



Hello send broadcast link every 10 secs non broadcast 30secs


Router with N neighbors have N SPF tree

Interface Area

ClearText (interface)

(config-if)#ip ospf authentication

(config-if)#ip ospf authentication-key PASS

ClearText (AREA)

(config-router)#area A_ID authentication

(config-if)#ip ospf authentication-key PASS


MD5 (interface)

(config-if)#ip ospf authentication messagedigest

(config-if)#ip ospf message-digest-key KEY_NO md5 PASS

MD5 (Area)

(config-router)#area A_ID authentication message-digest

(config-if)#ip ospf message-digest-key KEY_NO md5 PASS

Password MUST be less than 16 characters. Key number doesn’t have to match, If both are configured.

interface commands take precedence.

Types of key generated can be detect

#Debug ip ospf adj (everything)

#Show ip ospf interface

#show ip ospf neighbor


LSA Types:

LSA Type: 1 (Router LSA)

Each router creates its own LSA to represent itself for each area it connects to.

Lists the RID and all interfaces IP addresses on that router that are in that area.

Represents stub networks as well.

LSA Type: 2 (Network LSA)

One per network. Created by the DR on the subnet, and represents the subnet and the router

interfaces connected to the subnet.

LSA Type 3 (Net Summary)

Created by ABRs to represent subnets listed in one area’s type 1 and type 2.

LSA advertised into another area. Defines the links (subnets) in the origin a area, and cost, but no topology data.

LSA Type 4 ASBR summery advertises route to reach ASBR

Generated and advertised by ABR

LSA Type 5 AS external advertise External routes

Generated and advertised by ASBR

LSA Type 6 Group Membership defined for MOSPF: Not supported by CISCO IOS

LSA Type 7 NSSA External created by ASBRs inside an NSSA area, instead fo a type 5 LSA.

LSA Type 8 External Attributes – not implemented in cisco routers.

LSA type 9 to 11 LSA for future Extension of OSPF. Example type 10 LSA for MPLS traffic.


OSPF Packets: (Database Exchange)

Hello packets. – used to discover neighbors and match the criteria then it will become neighbors. To bring a neighbor relationship to a 2way state, & keep alive.

DBD– database description – exchange each LSA, typically on initial topology exchange. So router knows a list of that neighbor known LSA.

LSR– Link State Request

LSU-Link state update.

LSAck– Link State Acknowledge. – confirm msg.


Neighbors States:

Down state - no hello received form the neighbors (more than the dead interval)

Attempt – After sending hello, but before receiving a hello from that neighbor.

Init – received hello packets but did not have any local routers RID. No criteria checked.

2way – received hello packets and its has a routers RID in it. All the criteria passed.

EXStart - DD packets preparation.

Exchange – finished Exchange DD packets

Loading: All DD packets are exchanged and routers are currently sending LSR, LSU and LSAck packets to exchange full LSA.

Full – neighbors are fully adjency. Routing table calculation begin now.


Database exchange without DR (Point to point topoloy)

Down state - no hello msg send.

Init – hello msg send

2way – received hello packets and. All the criteria passed. Neighbors are listed in the neighbors list.

EXStart –after first DD packets sent to 224.0.0.5 DD msg included LSID and LSA sequence no.0x80000001and increment when changes happen.

Exchange: master elected first mater send DD msg responded by slave. When master is finished slave can update msg . Routers know what LSA to send to neighbors what LSA its wants to neighbor to send to it.

Loading : All DD packets are exchanged and routers are currently sending LSR, LSU and LSAck packets to exchange full LSA.

Full State: Every router has the Same LSDB


Database exchange with DR


Down state - no hello msg send.

Init – hello msg send

2way – received hello packets and neighbor relationship with DR and BDR is confirmed with matching allows. Neighbors are listed in the neighbors list.

EXStart –begin when neighbors send first DD packets sent to 224.0.0.6 DR + BDR multicast addressing.

Exchange: master always DR . DR send DD msg of LSA its known to slave 224.0.0.5 when master is finished slave can update DD msg .that master doesn’t have.

Loading : All DD packets are exchanged and routers are currently sending LSR, LSU and LSAck packets to exchange full LSA.

Full State: Every router has the Same LSDB



OSPF neighbors two types:

1. Neighbors ( NBMA Full state refers to the state between DROther and DR or BDR refers 2way state to refers to this relationship between no –DRand BDR neighbors.

2. Fully adjacent (Point to point only two router its fully adjacent)

Each LSA flooded every 30 mins

TABLES
There are three tables in OSPF

1. OSPF Neighbor table - Neighbor table contains the information of all connected OSPF routers. In OSPF neighbor table OSPF have the information of neighbor status, IP address, timers, interfaces DR\BDR status, router-ID of connected OSPF router.
2. OSPF Topology table -OSPF has full road map of entire area.

3. OSPF Routing tableRouting table has best routes for reaching different networks.

No comments:

Post a Comment