MENU CLOSE

OSPF Routing Protocol Configuration on Juniper Devices

OSPF Routing Protocol

 

OSPF has 3 types version

OSPv1, OSPv2,OSPv3​​ 

Routers running OSPF will usually use the destination IP Addresses 224.0..0.5 and 224.0.0.6 to send hello packets and LSAs onto the network segment

Uses shortest path

 

OSPF Framework​​ 

****Neighbors

​​ Same subnet OSPF enabled routers

 ​​​​ Adjacency​​ formed using​​ ​​ `HELLO` packet

***LSAs

Link state advertisements

Contains reachable subnet information

***LSDB

Link state database​​ 

Used to store subnet information

Important: OSPF​​ has 3 database​​ 1.​​ LSDB , 2.Candidate db , 3,SPF db

 

OSPv2

OSPF support for classless IP addressing

Encrypted authentication allowed between neighbors

OSPv3

Ipv6​​ support

MOSPF disabled

OSPFv3 can still advertise IPv4 subnets

 

 

CALCULATING THE BEST PATH -

Use​​ Dijkstra​​ (SPF)​​ algorithm ​​ for calculating​​ 

OSPF prefer to use the best network path

OSPF uses the SPF algorithm to find ​​ the lowest cost network path

 

 

OSPF Forming Adjacencies

***OSPF Packet types (5 TYPES)​​ 

​​ 1-Hello  ​​ ​​​​ 

2-Database

3-Link state request

4-Link state updates

5-Link state acknowledgement

Important:Ospf Router id are 32 bit addreses​​ 

How to selecet OSPF Router ID ?

Highest IP Address of all active interfaces

Highest Ip address of all Loopback interfaces

Id specified under [router-options]

For change​​ Route ID​​ ​​ has to​​ router reboot​​ 

Ospf​​ -ERRORS

Incorrect subnet mask

Diffirent Timers

Area ID mismatch

Authentication information wrong ​​ -(Password mismatch ,​​ MTU Mismatches)

 

 

 

OSPF Adjaceny Procces

8 ssteps to Adjaceny

-Down

-Init

-Attempt

-2-way​​ 

-Exstart

-exchange

-Loading

-Full

 

BUILDING THE TOPOLOGY OSPF

OSPF has a mechanism whosch can reduce flooded traffic

Ospf ​​ calls the​​ master router​​ the​​ designated router​​ or​​ DR

A backup router DR is also elected, this is known as the​​ Backup Designated router​​ or​​ BRD

For to be​​ Master:

Priority

Router id

 

Important: Highest Router id ​​ becomes the Designated Route (DR)

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ *Priorty degree​​ lowest can be​​  ​​​​ DR​​ 

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ *Highest ​​ Router Id​​ and​​ ​​ Priority​​ can be​​ BDR.

Important: if ​​ a new router is added with a higher priorty it will become DR OTHER category

 

MAIN LSA PACKET TYPES

Router

Network

Summary

 

 

OSPF AREAS

SUB SYSTEM = AREAS  ​​​​ 

Areas help reduce the size of the OSPF database

*********Ofspf has​​ 6​​ ​​ area type

Backbone area=0 ​​ 

Normal ​​​​ area

Stub​​ area

Totally stubby​​ area

Not so ​​ totally stubby ​​​​ area

 

 

 

 

OSPF ROUTER TYPES

ABR (area border router)

 

ASBRD (Autonomos system border router)

Backbone router

Internal Router

 

 

 

 

OSPF CONFIGURATION​​ 

Example1:​​ Backbone area​​ 

 

At​​ Srx1​​ 

Edit protocols ospf area 0.0.0.0

Run show interfaces terse

Set interfaces fe-0/0/0.0

Set interface vlan.10

At​​ Srx2​​ 

Edit protocols ospf area 0.0.0.0

Run show interfaces terse

Set interfaces fe-0/0/0.0

Set interface vlan.10

For see​​ 

Show ospf neighbor

 

 

Example​​ ​​ 2:Configurate Normal Areas

At​​ Srx1​​ 

Edit protocols ospf area 51

Run show interfaces terse

Set​​ interface fe0/0/1.0

commit

 

 

 

at​​ Srx3

Edit protocols ospf area 51

Run show interfaces terse

Set area 51 interface fe0/0/0.0

Commit

Run show ospf neighbor

 

At​​ Srx2​​ 

Show interfaces terse

Edit protocols ospf area 10

Set interface vlan.20

Commit

Show route protocol ospf

 

Try to​​ Ping srx`s

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example​​ 3:CONFIGURE STUB AREA

 

At​​ Srx2​​ 

Show route​​ 

Edit policy-options policy-statement REDIST_TO_OSPF

Set term 1 from protocol static

Set term 1​​ then accept

Set term 1 then metric 1000

 

Edit protocols ospf

Set export REDIST_TO_OSPF

Commit

 

At​​ SRX3​​ 

Show route

Show ospf database

Edit protocols ospf​​ 

Set area 51

Commit

At​​ Srx 1

Edit protocols ospf

Set area 51 stub

Set area 51 stub default-metric 10

commmit

 

CONFIGURE TOTALLY SUBBY AREAS

 

At​​ Srx 1​​ 

Show route

Edit protocols ospf​​ 

Set area 51 stub no-summaries

Commit

Show ospf database

Show route

 

 

PROTOCOL REDISTRIBUTION within a Stub Area

xxxxxxxxxxx

 

SETTING OSPF ROUTER IDs​​ 

Edit routing options

Set router-id 1.1.1.1

Commit

 

Changing the Speed of OSFP

Default timer ​​ for hello 10 seconds

Edit protocols ospf

Edit area 51

Set interface fexxxx hello-interval 1

Set interface fexxxxxxx dead-interval 4

 

For choose “Desingated route and BRD​​ 

Edit protocols ospf

​​ 

Set area 0 interface fexxxx priority 200

Set area 51 interface fexxxx priority 200

 

Setting Authentication

Edit protocols ospf area 0

Set interface fe xxxxx authentication md5 key TEST​​ ​​ (at all router​​ )

 

​​ 

 

 

 

Changing the Reference Bandwith​​ 

Edit protocols ospf​​ 

Set reference-bandwith 10g

 

Show ​​ | display set

 

 

TROUBLESHOOTING OSPF

Show ospf neighbors  ​​ ​​ ​​ ​​​​ 

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ extensive  ​​​​ 

show ospf database  ​​ ​​ ​​ ​​​​ routera bagli switchler,routerlari gosterir vb

show ospf interfaces  ​​ ​​ ​​ ​​ ​​​​ 

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ extensive

 

 

lab@monkey1> show ospf ?

Possible completions:

 ​​​​ backup  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show OSPF backup information

 ​​​​ bgp-orr  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show BGP optimal route-reflection groups

 ​​​​ context-identifier  ​​​​ Show OSPF context identifier information

 ​​​​ database  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show OSPF link-state database

 ​​​​ interface  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show OSPF interface status information

 ​​​​ io-statistics  ​​ ​​ ​​ ​​ ​​ ​​​​ Show OSPF I/O statistics

 ​​​​ log  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show shortest-path-first calculations from OSPF log

 ​​​​ neighbor  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show OSPF neighbor status information

 ​​​​ overview  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show overview of OSPF information

 ​​​​ route  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show OSPF routing table

 ​​​​ statistics  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Show OSPF statistics

{master:0}

DEBUGGING OSPF

 

 

 

 ​​​​ 

 

 

 

 

 

 

———————————–

Note: Do you need the  Juniper CLI guide course or ebook ?

Discount code: 9FR64FRKKJJWS  For Ebook on GOOGLE PLAY

Discount Link For video courses go to UDEMY

1 Comment

Join the discussion and tell us your opinion.

joker 123reply
at

That is a great tip especially to those new to the blogosphere.
Brief but very precise info… Thank you for sharing
this one. A must read post!

Leave a reply