search the web

Sunday, November 22, 2015

Configuring OSPF

Configuring OSPF

-----------------
Wild card mask= 0 means match and 255 mean dont care

255.255.255.255
-
255.255.255.0 [subnet mask]
---------------------------
0.0.0.255 [The result of this is the wild card mask]

-------------
R1
-------------
conf t
!loop back interfaces are logical interfaces that you configure manually and they are up all the time. Used for OSPF router-id.

int loop 0
ip address 10.50.0.1 255.255.255.0
no shut
exit
int loop 1
ip address 10.50.1.1 255.255.255.0
no shut
exit
int loop 2
ip address 10.50.2.1 255.255.255.0
no shut
exit
int loop 3
ip address 10.50.3.1 255.255.255.0
no shut
exit
int loop 4
ip address 10.50.4.1 255.255.255.0
no shut
exit
int loop 5
ip address 10.50.5.1 255.255.255.0
no shut
exit
int loop 6
ip address 10.50.6.1 255.255.255.0
no shut
exit
int loop 7
ip address 10.50.7.1 255.255.255.0
no shut
exit

do show ip route
!note the connencted networks

router ospf 1

!this command enables OSPF with process-id of 1. The process id only identifies the OSPF process. It is like applicatons running in windows with a process id visible in taskmanager.

route-id 1.1.1.1
!This manually assings a router-id to the router as 1.1.1.1


network 192.168.10.0 0.0.0.255 area 0
!This will enable ospf on the interface which has a network id of 192.168.10.0 and will put that interface in area 0
OR
network 192.168.0.0 0.0.255.255 area 0
!This will enable ospf on all those interfaces which has 192.168 common and will put them in area 0.
-------------------------
10.50.00000001.00000000
10.50.00000111.00000000
-----------------------
10.50.0.0/21
/21=255.255.248.0
wildcard mask
255.255.255.255
255.255.248.0
---------------
0.0.7.255
-------------------------

network 10.50.0.0 0.0.7.255 area 1
!This one command will advertise the whole list from 1050.0.0-1050.7.0

-------------------------
BB
------------------------
show ip route
conf t
router ospf 1
router-id 5.5.5.5
network 192.168.0.0 0.0.255.255 area 0
OR
network 192.168.10.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0

exit


-------------------------
R3
-------------------------
show ip route
conf t
router ospf 1
network 192.168.30.0 0.0.0.255 area 0
netowrk 192.168.0.0 0.0.0.255 area 0
exit


--------------------------
R2
--------------------------
show ip route
conf t
router ospf 1
network 192.168.0.0 0.0.0.255 area 0
exit


ROUTE-SUMMARIZATION ON ROUTER 1
conf t
router ospf 1
area 1 range 10.50.0.0 255.255.248.0
!This command will summarize the routes.


show ip ospf neighbors
!shows the neighbor table
show ip ospf database
!shows the topology table

show ip route
!shows the routing table.



Thanks for visiting if there is any doubt or question about OSPF (Open Shortest Path First) please write down in comments

for initial configuration of Router, switch or AP visit link below

initial configuration of Router, Switch or AP

No comments: