Table of Contents
Introduction
...
| Code Block |
|---|
|
$ git clone https://github.com/hyunsun/sona-setup.git
$ cd sona-setup |
4. 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.. 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 can be any value, just remember it since it will be used in vrouter.json later.
| 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 to bring up the router container.
| 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 |
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
e5ac67e62bbb onosproject/onos:1.6 "./bin/onos-service" 8 days ago Up 8 days 6653/tcp, 8101/tcp, 8181/tcp, 9876/tcp onos-vrouter |
7. Once it is up and running, check ports result.
| Code Block |
|---|
$ ssh -p 8101 karaf@172.17.0.2
# password is karaf
onos> ports
id=of:00000000000000b1, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.3.0, serial=None, driver=softrouter, channelId=172.17.0.1:58292, managementAddress=172.17.0.1, name=of:00000000000000b1, protocol=OF_13
port=local, state=disabled, type=copper, speed=0 , portName=br-router, portMac=e6:a0:79:f9:d1:4a
port=1, state=enabled, type=copper, speed=0 , portName=patch-rout, portMac=fe:da:85:15:b1:bf
port=2, state=enabled, type=copper, speed=10000 , portName=veth1, portMac=a2:fe:d4:6a:e9:c1
port=24, state=enabled, type=copper, speed=10000 , portName=quagga, portMac=06:96:1b:36:32:77
port=25, state=enabled, type=copper, speed=10000 , portName=quagga-router, portMac=ea:1e:71:d1:fd:81 |
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 re-create Quagga containers to fix the Quagga config files and OVS increase port number whenever new port is added to a bridge.
| Code Block |
|---|
|
"devices" : {
"of:00000000000000b1" : {
"basic" : {
"driver" : "softrouter"
}
}
},
"apps" : {
"org.onosproject.router" : {
"router" : {
"controlPlaneConnectPoint" : "of:00000000000000b1/2",
"ospfEnabled" : "true",
"interfaces" : [ "b1-1", "b1-2" ]
}
}
},
"ports" : {
"of:00000000000000b1/3" : {
"interfaces" : [
{
"name" : "b1-1",
"ips" : [ "172.18.0.254/24" ],
"mac" : "fe:00:00:00:00:01"
|
| 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" 8 days ago Up 8 days 6653/tcp, 8101/tcp, 8181/tcp, 9876/tcp onos-vrouter |
...
- Device id and port number with portName=
quagga -> controlPlaneConnectPoint of vrouter.json - Port number with portName=
quagga-router or any other uplink port(uplink port defined in sona.json if you have external router) -> ports of interface with 172.18.0.254/24 IP address. - Port number with portName=
patch-rout -> ports of interface with 172.27.0.254/24, explain this interface later. Same port number goes to the hosts location with IP 172.27.0.1.
Once you modify vrouter.json, re-run the ONOS-vRouter.
| Code Block |
|---|
onos> openstack-nodes
hostname=compute-01, type=COMPUTE, managementIp=10.203.25.244, dataIp=10.134.34.222, intBridge=of:00000000000000a1, routerBridge=Optional.empty init=COMPLETE
hostname=compute-02, type=COMPUTE, managementIp=10.203.25.245, dataIp=10.134.34.223, intBridge=of:00000000000000a2, routerBridge=Optional.empty init=COMPLETE
hostname=gateway-01, type=GATEWAY, managementIp=10.203.198.125, dataIp=10.134.33.208, intBridge=of:00000000000000a3, routerBridge=Optional[of:00000000000000b1] init=COMPLETE
hostname=gateway-02, type=GATEWAY, managementIp=10.203.198.131, dataIp=10.134.33.209, intBridge=of:00000000000000a4, routerBridge=Optional[of:00000000000000b2] init=COMPLETE
Total 4 nodes |
...