Monday, March 21, 2016

OSPF notes

Few things about OSPF protocol
packet type = 1 -- hello
packet type = 2 -- data base description packets
packet type = 3 -- link state request
packet type = 4 -- link state update
packet type = 5 -- link state ack

hello packets are used to keep alive the session between 2 peers.
DBD packets used for initial synchronization. These packets contain the initial links there were connected.
This also contains the some link states that are marked as a need to get complete link details.

packet type 3 -- In DBD process, few links are marked will be sent in these packets. This requests new/latest data
for LSA is required.

packet type 4 -- This is response for packet type 3. This will contains the updates of lsa those are requested from peer.

packet type 5 -- link state ack. The final/full stage where both peers have their database are synchronised. From here onwards
actual dijsktra's algorithm will be executed.

lsa types
type 1 -- router lsa .. flooded within area. Contains the information about connected links, intefaces, cost etc. Link id is router id
type 2 -- network lsa .. are generated by designated router. link id is interface ip address of the designated router.
           describes the routes connected to the network.
type 3 -- summary lsa .. Generated by ABRs. The networks are flooded into another area. link id is network number advertised.
type 4 -- summary lsa .. Generated by ABSs. Contains routes to ASBR. link id is asbr id and these are not allowed into stub areas.
type 5 -- external lsa .. Generated by ASBRs, contain the routes to networks that are not external to current as. AS to AS communication.
type 6 -- multicast lsa .. used for multicast applications.
type 7 -- nssa external lsa ..


non broadcast over ospf framerelay
dr/bdr election takes place.
neighbour discovery will not be automated.
Add neighbour statment in ospf.
set ospf priority 0 for all routers who pvc is connection from only 1 router.

ospf point to multipoint over frame relay
no dr/bdr election process.
neighbours will be detected automatically.
command to add is
ip ospf network point-to-multipoint

Redistribution
redistributes routes from eigrp routers to r1.
E1 routes are from other protocols where cost will be calculated with default metric + recevied metric.
E2 routes will only contain the default met ric
command for redistribution from eigrp into  ospf as follows
# redistribute eigrp 1 metric-type 1 subnets  --- this is generates E1 type routes
# redistribute eigrp 2 metric-type 2 subnets  --- This will generate E2 type routes.
subnets keyword specifies redistribution whether classful or classless.
If present classful and classless redistribution takes place
if absent only classful redistibution takes place.

redistribution with route-maps
define acl
define route-maps for acl either to permit/deny
define route-map parameter in redistribution command

Example
ip acces-list 10
    10 permit <ip> <subnet mask>
    20 deny <ip> <subnet mask>

route-map domain1-ospf permit 10
    match ip address 10
    set metric 200
    set metric-type type 2

No comments:

Post a Comment