...
Code Block |
---|
|
$ git clone https://github.com/hyunsun/sona-setup.git
$ cd sona-setup |
4. Modify volumes/gateway/zebra.conf
and volumes/gateway/bgpd.conf
as you want. Here are samples of the config files. Note that fpm connection ip
in zebra.conf
should be the eth0 interface IP address of onos-vrouter container, assigned by Docker. Run Quagga container with those config files. The IP address comes with the command would be equals to router-id
in bgpd.conf
. And the MAC address must be "fe:00:00:00:00:01", it is hard-coded right now and needs to be improved soon.
Code Block |
---|
title | volumes/gateway/bgpd.conf |
---|
|
! -*- bgp -*-
!
! BGPd sample configuration file
!
!
hostname gateway-01
password zebra
!
router bgp 65101
bgp router-id 172.18.0.254
timers bgp 3 9
neighbor 172.18.0.1 remote-as 65100
neighbor 172.18.0.1 ebgp-multihop
neighbor 172.18.0.1 timers connect 5
neighbor 172.18.0.1 advertisement-interval 5
network 172.27.0.0/24
!
log file /var/log/quagga/bgpd.log |
Code Block |
---|
title | volumes/gateway/zebra.conf |
---|
|
!
hostname gateway-01
password zebra
!
fpm connection ip 172.17.0.2 port 2620 |
Code Block |
---|
|
$ ./quagga.sh --name=gateway-01 --ip=172.18.0.254/24 --mac=fe:00:00:00:00:01 |
If you check the result of ovs-vsctl show
, there should be a new port named quagga
on br-router
bridge.
5. If there's no external router or emulation of it in your setup, add another Quagga container which acts as an external router. First, modify volumes/router/zebra.conf
and volumes/router/bgpd.conf
to make this Quagga an external router neighboring with the one created right before, and use the same command above but with additional argument --external-router
option to bring up the router container. You can put any MAC address this time.
Code Block |
---|
title | volumes/router/bgpd.conf |
---|
|
! -*- bgp -*-
!
! BGPd sample configuration file
!
!
hostname router-01
password zebra
!
router bgp 65100
bgp router-id 172.18.0.1
timers bgp 3 9
neighbor 172.18.0.254 remote-as 65101
neighbor 172.18.0.254 ebgp-multihop
neighbor 172.18.0.254 timers connect 5
neighbor 172.18.0.254 advertisement-interval 5
neighbor 172.18.0.254 default-originate
!
log file /var/log/quagga/bgpd.log |
Code Block |
---|
title | volumes/router/zebra.conf |
---|
|
!
hostname router-01
password zebra
! |
Code Block |
---|
|
$ ./quagga.sh --name=router-01 --ip=172.18.0.1/24 --mac=fa:00:00:00:00:01 --external-router |
If you check the result of ovs-vsctl show
, there should be a new port named quagga-router
on br-router
bridge.
6. The last container is ONOS with vRouter. Refer to the guide(SONA Network Configuration Guide) and write a network configuration for vRouter. Name it to vrouter.json, place under sona-setup and run vrouter.sh, which brings up ONOS container with vRouter application activated.
Code Block |
---|
|
# modify vrouter.json
sona-setup$ vrouter.sh
sona-setup$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ed45f5e90cb4 hyunsun/quagga-fpm "/usr/bin/supervisord" 9 days ago Up 9 days 179/tcp, 2601/tcp, 2605/tcp router-01
7e17cdc9624b hyunsun/quagga-fpm "/usr/bin/supervisord" 9 days ago Up 9 days 179/tcp, 2601/tcp, 2605/tcp gateway-01
e5ac67e62bbb onosproject/onos:1.6 "./bin/onos-service" 9 days ago Up 9 days 6653/tcp, 8101/tcp, 8181/tcp, 9876/tcp onos-vrouter |
The first container is ONOS-vRouter. Refer to the guide(SONA Network Configuration Guide) and write a network configuration for vRouter. Name it to vrouter.json, place under sona-setup and run vrouter.sh script, which brings up ONOS container with vRouter application activated. There's a sample named "vrouter.json" under "sona-setup", and note that you don't need to put correct port numbers in the "Ports" section now (just leave it as it is in the sample file). We're going to fix the port numbers later in Step 7.
Code Block |
---|
# modify vrouter.json
sona-setup$ vrouter.sh
sona-setup$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e5ac67e62bbb onosproject/onos:1.6 "./bin/onos-service" 9 days ago Up 9 days 6653/tcp, 8101/tcp, 8181/tcp, 9876/tcp onos-vrouter |
5. Modify volumes/gateway/zebra.conf
and volumes/gateway/bgpd.conf
as you want. Here are samples of the config files. Note that fpm connection ip
in zebra.conf
should be the eth0 interface IP address of onos-vrouter container, assigned by Docker. Run Quagga container with those config files. The IP address comes with the command would be equals to router-id
in bgpd.conf
. And the MAC address must be "fe:00:00:00:00:01", it is hard-coded right now and needs to be improved soon.
Code Block |
---|
title | volumes/gateway/bgpd.conf |
---|
|
! -*- bgp -*-
!
! BGPd sample configuration file
!
!
hostname gateway-01
password zebra
!
router bgp 65101
bgp router-id 172.18.0.254
timers bgp 3 9
neighbor 172.18.0.1 remote-as 65100
neighbor 172.18.0.1 ebgp-multihop
neighbor 172.18.0.1 timers connect 5
neighbor 172.18.0.1 advertisement-interval 5
network 172.27.0.0/24
!
log file /var/log/quagga/bgpd.log |
Code Block |
---|
title | volumes/gateway/zebra.conf |
---|
|
!
hostname gateway-01
password zebra
!
fpm connection ip 172.17.0.2 port 2620 |
Code Block |
---|
|
$ ./quagga.sh --name=gateway-01 --ip=172.18.0.254/24 --mac=fe:00:00:00:00:01 |
If you check the result of ovs-vsctl show
, there should be a new port named quagga
on br-router
bridge.
6. If there's no external router or emulation of it in your setup, add another Quagga container which acts as an external router. First, modify volumes/router/zebra.conf
and volumes/router/bgpd.conf
to make this Quagga an external router neighboring with the one created right before, and use the same command above but with additional argument --external-router
option to bring up the router container. You can put any MAC address this time.
Code Block |
---|
title | volumes/router/bgpd.conf |
---|
|
! -*- bgp -*-
!
! BGPd sample configuration file
!
!
hostname router-01
password zebra
!
router bgp 65100
bgp router-id 172.18.0.1
timers bgp 3 9
neighbor 172.18.0.254 remote-as 65101
neighbor 172.18.0.254 ebgp-multihop
neighbor 172.18.0.254 timers connect 5
neighbor 172.18.0.254 advertisement-interval 5
neighbor 172.18.0.254 default-originate
!
log file /var/log/quagga/bgpd.log |
Code Block |
---|
title | volumes/router/zebra.conf |
---|
|
!
hostname router-01
password zebra
! |
Code Block |
---|
|
$ ./quagga.sh --name=router-01 --ip=172.18.0.1/24 --mac=fa:00:00:00:00:01 --external-router |
If you check the result of ovs-vsctl show
, there should be a new port named quagga-router
on br-router
bridge.
7. Once all the containers are up and running, check ports
result from the ONOS-vRouter7. Once it is up and running, check ports
result. If any port number does not match to the ones in vrouter.json
, modify the config file with the correct port numbers, and just re-run the vrouter.sh. It actually happens often since you are going to may re-create Quagga containers multiple times to fix the Quagga config files or for some other reasons, and OVS increase increases port number whenever a new port is added to a bridge.
...