Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

"There are two way to Enable or Turn on OSPF :-

Option 1. Using Network command Globally - For example network 10.1.0.0


0.0.255.255 area 0 - This basically says just turn on the OSPF protocol on all
the individual interface of this router whose IP are starting from 10.1.x.x (does
not matter what is the mask but the interface ip should starts with 10.1.x.x). So
this mean that if R1 fa0/0 has 10.1.1.1/24, it will advertise this link via ospf,
similarly if R1 fa0/1 has 10.2.1.10/24 ip assigned, then it will not be able to
turn on ospf on that interface and will not be able to advertise that link or
subnet in the network. The drawback is once you add any additonal interface later
and assign any ip on that link starting with 10.1.x.x - OSPF will be
automatically enabled on that link.
Option 2. Go under individual interface and use IP ospf command on each interfaces
- This basically means whatever ip is assigned on the interface, just turn the
protcol on, on that particular interface only. So the advantage is later if you
change the ip address of the interface, OSPF will still be enabled on that new ip.
For example - if you are using OSPF in DMVPN and you have dynamic address assigned
through DHCP, so even if the ip address changes the ospf process is still going to
be on there.
But if you are using network command and you changed any interface ip in near
future then you have to ensure that ip is falling under network commad."
If you want to enable ospf on all L3 link. For example let supose you have a core
L3 edge which is 6500 switch and you have configured 100 of L3 vlan interfaces, and
you want to enable ospf on all of them R1(conf-router)# network 0.0.0.0
255.255.255.255 area 0
"You can also overlap network statements, where the most specifc will determine the
area. For example let suppose on a R1 you have three network statement configured
at the same time like :
R1(conf-router)# network 0.0.0.0 255.255.255.255 area 0 > network
1.0.0.0 255.255.255.0 area 1 > network 1.2.0.0 255.255.0.0 area 2
So here it means any link that has ip starts with 1.2.x.x will be in area 2, Any
rest of the link that has ip starts with 1.x.x.x will be in area 1, and rest of
the remaining link will be in area 0"

"R1(conf)# router ospf 10 We can also use 11 or multiple process id on R1, but
which network you are assigning under which process id does matter. process id is
locally significant no. the router,
meaning you can have multiple process id on the same router or process id 10 on R1
and process-id 11 on R2, but this create confusion."

"OSPF configuration on R1 and R2 connected with 1.1.1.0/24 over wan link. R1 lan or
fa0/0 is 10.50.0.0/16 and R2 lan is 172.16.0.0/24 to 172.16.7.0/24, ospf Area is 0
and Process id is 10.
1 > R1(conf)# router ospf 10 > network 1.1.1.1 0.0.0.0 area 0 or
[ (conf)# int s0/0 > ip ospf 10 area 0 > no shut ] > network
10.50.0.0 0.0.255.255 area 0 This says:
i) Advertise 1.1.1.1/32 and 10.50.0.0/16 routes with their subnet mask to
all the neighbors of R1 from where it has establsihed the Neigbor relationship
ii) Listen for incoming ospf routing information or hello message on any
interface of R1 that starts with 1.1.1.1/32 and 10.50.0.0/16
iii) Permitted to send outbound hello message and dynamically learn any
neigbor and established neighbor relationship (if neighbor parameters matches) on
any interface
whose ip starts with 1.1.1.1/32 and 10.50.0.0/16
R2(conf)# router ospf 10 > network 1.1.1.2 0.0.0. area 0 >
network 172.16.0.0 0.0.0.255 area 0 [ on ASA network 172.16.0.0
255.255.255.0 ] or
R2(conf)# router ospf 10 > network 0.0.0.0 255.255.255.255 area 0
[Advertise all interface of R2 in ospf doamin which has an ip set, and also send
ospf hello to establish neighbor
from all interfaces], For each interface there would be a router LSA
advertise by router.
2 > R1/R2(conf-router)# passive-interface fa0/0 (Do not send ospf hello to
establish NR from lan interfaces of R1/R2 because only switches are connected
there).
3 > R1/R2(conf)# int s0/0 > ip ospf hello-interval 1 > ip ospf
dead-interval 3 [ To set OSPF hello interval to 1 second and dead interval to 3
second, timer we defined on router interface ]"

You might also like