$type=ticker$count=12$cols=4$cate=0

HOWTO: OSPF with Quagga and Bird

by :  Donald Baud OSPF is a routing protocol to help you propagate ip routes. I propose to show you a  minimalistic  installation of 3 ...



by : Donald Baud

OSPF is a routing protocol to help you propagate ip routes.

I propose to show you a minimalistic installation of 3 hosts talking to each other with ospf:
I am purposely giving the minimum set of instructions to get the hosts started as OSPF neighbors.
  1. A- Cisco router (ip:10.0.0.1)
  2. B- FreeBSD using Quagga net/quagga (ip:10.0.0.2)
  3. C- FreeBSD using Bird net/bird (ip:10.0.0.3)

A- Sample Cisco OSPF configuration:
Code:
!
interface FastEthernet 0/0
ip address 10.0.0.1 255.255.255.0
!
!
router ospf 1
network 10.0.0.0 0.0.0.255 area 0

B- FreeBSD with net/quagga
Code:
pkg install net/quagga
Customize the quagga configurations files:

1- Customize the general quagga daemon zebra: /user/local/etc/quagga/zebra.conf
Add the following:
Code:
hostname myquagga
password mypassword
enable pasword mypassword
2- Customize the quagga ospf daemon: /usr/local/etc/quagga/ospfd.conf
Add the following:
Code:
hostname myospfquagga
password mypassword
enable password mypassword
!
router ospf
network 10.0.0.0/24 area 0.0.0.0
Make quagga start automatically:
Add the following in the /etc/rc.conf
Code:
# assign ip:10.0.0.2/24 to your network interface
# replace em0 with your nic (bge0, xl0, rl0 ...)
ifconfig_em0="inet 10.0.0.2/24"

# auto start quagga
quagga_enable="YES"
quagga_daemons="zebra ospfd"

# you will most probably need to enable ip forwarding if this host will be used as a router.
# an alternative way is: sysctl net.inet.ip.forwarding=1
gateway_enable="YES"
Start quagga with: service start quagga

C- FreeBSD with net/bird
Code:
pkg install net/bird
Customize the Bird configurations files:

1- There is only one configuration file:
/usr/local/etc/bird.conf
Here is a minimalistic config:
Code:
# instruct Bird to manipulate the FreeBSD kernel routing table
protocol kernel {
        learn;                  # Learn even routes entered manually with "route add"
        scan time 20;       # Scan kernel routing table every 20 seconds
        import all;            # Default is import all
        export all;            # Default is export none
}

# This pseudo-protocol watches all interface up/down events.
protocol device {
        scan time 10;           # Scan interfaces every 10 seconds
}

protocol ospf MyOSPF {
        area 0.0.0.0 {
                networks {
                        10.0.0.0/24;
                };
                interface "em0" {
                # this tells Bird to talk ospf on this interface em0 (customize as needed)
                # notice: unlike Cisco and quagga, you need to specify the interface
                };
};
}



Make Bird start automatically:
Add the following in the file /etc/rc.conf
Code:
# assign ip:10.0.0.3/24 to your network interface
# replace em0 with your nic (bge0, xl0, rl0 ...)
ifconfig_em0="inet 10.0.0.3/24"

# auto start bird
bird_enable="YES"

# you will most probably want to enable ip forwarding if this host will be used as a router.
# an alternative way is: sysctl net.inet.ip.forwarding=1
gateway_enable="YES"
Start bird with: service start bird


======================
Troubleshooting your setup:

A- For Cisco
You would telnet or ssh.

B- For Quagga
Quagga tries to mimick Cisco, you can access the CLI by telnet on ports 2601 for zebra and 2604 for ospfd
sockstat | grep quagga

These are some interesting troublshooting commands in Zebra:
telnet localhost 2601
Like Cisco, go in "enable" mode enable

Code:
#show inteface
#show ip route
#show ip route ospf
#show ip route kernel
Look also in the Quagga's ospfd telnet cli:
telnet localhost 2604
Like Cisco, go in "enable" mode enable
Code:
# show ip ospf border-routers
# show ip ospf interface
# show ip ospf neighbor
# show ip ospf database
# show ip ospf route
C- For Bird
Bird has a command line interface: birdc
you could use the interactive form or command-args like so:
Code:
# find the status of Bird, look for "Daemon is up"
>birdc show status

# list the interaces seen by Bird
>birdc show interfaces

# list the protocols seen by Bird
# you should see the OSPF line listed as Running
>birdc show protocols

# notice I used the custom name kenel1
# since you may have several kernel protocols
# as you might have several OSPF protocols
# protocol names are listed with "show protocols"
>birdc show route protocol kernel1
>birdc show route protocol MyOSPF

COMMENTS

Name

BIND,1,Bird,1,Bird Routing Daemon,1,FreeBSD,1,Linux,2,Mail,4,UNIX-like,1,Wireless,1,ZImbra,4,
ltr
item
Linux and FreeBSD Diary: HOWTO: OSPF with Quagga and Bird
HOWTO: OSPF with Quagga and Bird
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUp5Z4i25KXbKSjt_O5jm6J-d9vrP8cLc1L8Y5yKr8CYp_K-7Z3xo85n1BAQoaNE9ci0D6bO4wzy4GdygWoBTIU3AmxPbDmslOL-GsXbDAOa4GXSDhGDm73qGvw4pFPcitrZo-yQbgX4jV1afcnD3fJEURmvag8rnLs7JSGlcGxh3lCfFJZE_0Z98_/s320/Featured-820x460.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUp5Z4i25KXbKSjt_O5jm6J-d9vrP8cLc1L8Y5yKr8CYp_K-7Z3xo85n1BAQoaNE9ci0D6bO4wzy4GdygWoBTIU3AmxPbDmslOL-GsXbDAOa4GXSDhGDm73qGvw4pFPcitrZo-yQbgX4jV1afcnD3fJEURmvag8rnLs7JSGlcGxh3lCfFJZE_0Z98_/s72-c/Featured-820x460.jpg
Linux and FreeBSD Diary
http://dudi.channel-11.net/2020/04/howto-ospf-with-quagga-and-bird.html
http://dudi.channel-11.net/
http://dudi.channel-11.net/
http://dudi.channel-11.net/2020/04/howto-ospf-with-quagga-and-bird.html
true
1562377050106029204
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content