Sunday, December 28, 2014

run ospf on linux machine using quagga

1- information
linux ip: 192.168.202.1/24
              10.0.3.1/24

mikrotik ip: 192.168.202.101/24
                    192.168.203.1/24
cisco ip: 192.168.202.22/24
               192.168.33.1/24


2- install quagga
root@router:/# apt-get install quagga

3- enable zebra and ospfd service by edit file to /etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
babeld=no


4- create zebra configuration
- create a file /etc/quagga/zebra.conf with the following content
! -*- zebra -*-
!
! zebra sample configuration file
!
! $Id: zebra.conf.sample,v 1.1 2002/12/13 20:15:30 paul Exp $
!
hostname Router
password zebra
enable password zebra
!
! Interface's description.
!
!interface lo
! description test of desc.
!
!interface sit0
! multicast

!
! Static default route sample.
!
!ip route 0.0.0.0/0 203.181.89.241
!

!log file zebra.log

5- create ospfd configuration
 - create a file /etc/quagga/ospfd.conf with the following content
 ! -*- ospf -*-
!
! OSPFd sample configuration file
!
!
hostname ospfd
password zebra
!enable password please-set-at-here
!
!router ospf
!  network 192.168.1.0/24 area 0
!
log stdout


6- restart quagga service and remote to router ospfd to configure

root@router:/# service quagga restart

- remote to ospfd by telnet localhost using port 2604 with password "zebra"

ospfd# conf t
ospfd# router ospf
ospfd# network 10.0.3.0/24 area 0.0.0.0
ospfd# network 192.168.202.0/24 area 0.0.0.0




7- on mikrotik router
/routing ospf network
add network=192.168.202.0/24 area=backbone
add network=192.168.203.0/24 area=backbone

8- on cisco router
R1#conf t
R1(config)#router ospf 1
R1(config-router)#network 192.168.202.0 0.0.0.255 area 0
R1(config-router)#network 192.168.33.0 0.0.0.255 area 0


9- access to zebra daemon to see newly learned routes by telnet localhost port 2601 with password zebra and enable password zebra


No comments:

Post a Comment