Fixed indent
Change-Id: Ifda9434c77708e769b78d613bd956b24f29a3519
diff --git a/configuration/external-connectivity.rst b/configuration/external-connectivity.rst
index a9ac538..0ecf272 100644
--- a/configuration/external-connectivity.rst
+++ b/configuration/external-connectivity.rst
@@ -28,28 +28,28 @@
.. code-block:: json
- {
- "ports" : {
- "of:0000000000000001/1" : {
- "interfaces" : [
- {
- "name" : "upstream1",
- "ips" : [ "10.0.1.2/24" ],
- "vlan-untagged" : 4000
- }
- ]
- },
- "of:0000000000000001/2" : {
- "interfaces" : [
- {
- "name" : "quagga",
- "ips" : [ "10.0.1.2/24" ],
- "vlan-untagged" : 4000
- }
- ]
- }
- }
- }
+ {
+ "ports" : {
+ "of:0000000000000001/1" : {
+ "interfaces" : [
+ {
+ "name" : "upstream1",
+ "ips" : [ "10.0.1.2/24" ],
+ "vlan-untagged" : 4000
+ }
+ ]
+ },
+ "of:0000000000000001/2" : {
+ "interfaces" : [
+ {
+ "name" : "quagga",
+ "ips" : [ "10.0.1.2/24" ],
+ "vlan-untagged" : 4000
+ }
+ ]
+ }
+ }
+ }
- ``name``: An arbitrary name string for the interface. Optional.
- ``ips``: Configure the peering subnet (10.0.1.0/24) and the switch port IP (10.0.1.2).
@@ -65,11 +65,11 @@
Of course you are not obliged to use ``10.0.1.0/24``, you should use a subnet that makes sense for your peering environment.
.. note::
- This configuration will set up an L2 link between the two fabric switch ports, over which the Quagga and external router can communicate.
- Both Quagga and the upstream router will receive untagged packets
- (i.e they will never see packets with vlanId 4000, which is used inside the leaf switch to establish a bridging domain).
+ This configuration will set up an L2 link between the two fabric switch ports, over which the Quagga and external router can communicate.
+ Both Quagga and the upstream router will receive untagged packets
+ (i.e they will never see packets with vlanId 4000, which is used inside the leaf switch to establish a bridging domain).
- If you need a vlan-tag in the compute node to distinguish the traffic going to Quagga, you can change the vlan assignment on the switch port "of:0000000000000001/2" to be vlan-tagged instead of vlan-untagged.
+ If you need a vlan-tag in the compute node to distinguish the traffic going to Quagga, you can change the vlan assignment on the switch port "of:0000000000000001/2" to be vlan-tagged instead of vlan-untagged.
Deploy the Quagga Docker Image
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -77,14 +77,14 @@
.. code-block:: console
- $ docker pull opencord/quagga
+ $ docker pull opencord/quagga
We also need to download the **pipework** tool which will be used to connect the docker image to the physical interface that we set aside earlier.
.. code-block:: console
- $ wget https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework
- $ chmod +x pipework
+ $ wget https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework
+ $ chmod +x pipework
Create a directory for your Quagga configuration files, and create a bgpd.conf and zebra.conf in there.
This folder is going to be mounted into the Quagga container.
@@ -92,20 +92,20 @@
.. code-block:: console
- $ mkdir configs
- $ touch zebra.conf bgpd.conf
+ $ mkdir configs
+ $ touch zebra.conf bgpd.conf
Now run the docker image (make sure the path the config directory matches what is on your system):
.. code-block:: console
- $ sudo docker run --privileged -d -v configs:/etc/quagga -n quagga opencord/quagga
+ $ sudo docker run --privileged -d -v configs:/etc/quagga -n quagga opencord/quagga
Finally, we can use the pipework tool to add the physical interface into the container so that Quagga can talk out over the fabric:
.. code-block:: console
- $ sudo ./pipework mlx1 -i eth1 quagga 10.0.1.3/24
+ $ sudo ./pipework mlx1 -i eth1 quagga 10.0.1.3/24
This will add host interface ``mlx1`` to the container with name ``quagga`` with interface name ``eth1`` inside the container.
The newly added interface will have the IP ``10.0.1.3``.
@@ -115,8 +115,8 @@
.. code-block:: console
- $ sudo docker rm -f quagga
- $ sudo docker run --privileged -d -v configs:/etc/quagga -n quagga opencord/quagga
+ $ sudo docker rm -f quagga
+ $ sudo docker run --privileged -d -v configs:/etc/quagga -n quagga opencord/quagga
Configure Quagga
^^^^^^^^^^^^^^^^
@@ -138,12 +138,12 @@
.. code-block:: text
- !
- hostname cord-zebra
- password cord
- !
- fpm connection ip 10.6.0.1 port 2620
- !
+ !
+ hostname cord-zebra
+ password cord
+ !
+ fpm connection ip 10.6.0.1 port 2620
+ !
The FPM connection IP address is the IP address of **one of the onos cluster instances** - does not matter which one.
If you have other configuration that needs to go in zebra.conf you should add that here as well.
@@ -154,34 +154,34 @@
.. code-block:: text
- hostname bgp
- password cord
- !
- ip prefix-list 1 seq 10 permit 192.168.0.0/16
- !
- route-map NEXTHOP permit 10
- match ip address prefix-list 1
- set ip next-hop 10.0.1.2
- !
- router bgp 65535
- bgp router-id 10.0.1.3
- !
- network 192.168.0.0/16
- !
- neighbor 10.0.1.1 remote-as 65540
- neighbor 10.0.1.1 description upstream1
- neighbor 10.0.1.1 route-map NEXTHOP out
- !
+ hostname bgp
+ password cord
+ !
+ ip prefix-list 1 seq 10 permit 192.168.0.0/16
+ !
+ route-map NEXTHOP permit 10
+ match ip address prefix-list 1
+ set ip next-hop 10.0.1.2
+ !
+ router bgp 65535
+ bgp router-id 10.0.1.3
+ !
+ network 192.168.0.0/16
+ !
+ neighbor 10.0.1.1 remote-as 65540
+ neighbor 10.0.1.1 description upstream1
+ neighbor 10.0.1.1 route-map NEXTHOP out
+ !
This configuration peers with one upstream router ``10.0.1.1`` and advertises one route ``192.168.0.0/16``.
Note that Quagga (and as a result Trellis) is in a different AS ``65535`` from the upstream router AS ``65540``,
as we are using E-BGP for this connectivity.
.. note::
- Pay attention to the configuration to rewrite the next hop of routes that are advertised to the upstream router.
- A ``route-map`` is used to set the next hop of advertised routes to ``10.0.1.2``,
- which is **different from the address that Quagga is using to peer with the external router**.
- As mentioned above, it is important that this rewriting is done correctly so that the fabric switch is able to **distinguish data plane and control plane** traffic.
+ Pay attention to the configuration to rewrite the next hop of routes that are advertised to the upstream router.
+ A ``route-map`` is used to set the next hop of advertised routes to ``10.0.1.2``,
+ which is **different from the address that Quagga is using to peer with the external router**.
+ As mentioned above, it is important that this rewriting is done correctly so that the fabric switch is able to **distinguish data plane and control plane** traffic.
Route service and static route
@@ -197,25 +197,25 @@
.. code-block:: text
- onos> routes
+ onos> routes
- B: Best route, R: Resolved route
+ B: Best route, R: Resolved route
- Table: ipv4
- B R Network Next Hop Source (Node)
- 0.0.0.0/0 172.16.0.1 FPM (127.0.0.1)
- > * 1.1.0.0/18 10.0.1.20 STATIC
- > * 10.0.99.0/24 10.0.1.1 FPM (127.0.0.1)
- * 10.0.99.0/24 10.0.6.1 FPM (127.0.0.1)
- Total: 2
+ Table: ipv4
+ B R Network Next Hop Source (Node)
+ 0.0.0.0/0 172.16.0.1 FPM (127.0.0.1)
+ > * 1.1.0.0/18 10.0.1.20 STATIC
+ > * 10.0.99.0/24 10.0.1.1 FPM (127.0.0.1)
+ * 10.0.99.0/24 10.0.6.1 FPM (127.0.0.1)
+ Total: 2
- Table: ipv6
- B R Network Next Hop Source (Node)
- > * 2000::7700/120 fe80::288:ff:fe00:1 FPM (127.0.0.1)
- > * 2000::8800/120 fe80::288:ff:fe00:2 FPM (127.0.0.1)
- > * 2000::9900/120 fe80::288:ff:fe00:1 FPM (127.0.0.1)
- * 2000::9900/120 fe80::288:ff:fe00:2 FPM (127.0.0.1)
- Total: 3
+ Table: ipv6
+ B R Network Next Hop Source (Node)
+ > * 2000::7700/120 fe80::288:ff:fe00:1 FPM (127.0.0.1)
+ > * 2000::8800/120 fe80::288:ff:fe00:2 FPM (127.0.0.1)
+ > * 2000::9900/120 fe80::288:ff:fe00:1 FPM (127.0.0.1)
+ * 2000::9900/120 fe80::288:ff:fe00:2 FPM (127.0.0.1)
+ Total: 3
Add a static route
@@ -223,9 +223,9 @@
.. code-block:: console
- onos> route-add <prefix> <nexthop>
- onos> route-add 1.1.0.0/18 10.0.1.20
- onos> route-add 2020::101/120 2000::1
+ onos> route-add <prefix> <nexthop>
+ onos> route-add 1.1.0.0/18 10.0.1.20
+ onos> route-add 2020::101/120 2000::1
Remove a static route
@@ -233,8 +233,8 @@
.. code-block:: console
- onos> route-remove <prefix> <nexthop>
- onos> route-remove 1.1.0.0/18 10.0.1.20
+ onos> route-remove <prefix> <nexthop>
+ onos> route-remove 1.1.0.0/18 10.0.1.20
Access route service via REST
@@ -245,18 +245,18 @@
.. code-block:: console
- $ curl --user onos:rocks -X POST -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes -d@routes.json
- $ curl --user onos:rocks -X GET -H 'Accept:application/json' http://<controller-ip>:8181/onos/routeservice/routes | python -mjson.tool
- $ curl --user onos:rocks -X DELETE -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes -d@routes.json
+ $ curl --user onos:rocks -X POST -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes -d@routes.json
+ $ curl --user onos:rocks -X GET -H 'Accept:application/json' http://<controller-ip>:8181/onos/routeservice/routes | python -mjson.tool
+ $ curl --user onos:rocks -X DELETE -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes -d@routes.json
with identical json format for both POST and DELETE:
.. code-block:: json
- {
- "prefix": "20.0.0.1/24",
- "nextHop": "10.0.1.10"
- }
+ {
+ "prefix": "20.0.0.1/24",
+ "nextHop": "10.0.1.10"
+ }
Bulk routes
@@ -264,25 +264,25 @@
.. code-block:: console
- $ curl --user onos:rocks -X POST -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes/bulk -d@routes.json
- $ curl --user onos:rocks -X DELETE -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes/bulk -d@routes.json
+ $ curl --user onos:rocks -X POST -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes/bulk -d@routes.json
+ $ curl --user onos:rocks -X DELETE -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/routeservice/routes/bulk -d@routes.json
with identical json format for both POST and DELETE:
.. code-block:: json
- {
- "routes": [
- {
- "prefix": "20.0.0.1/24",
- "nextHop": "10.0.1.10"
- },
- {
- "prefix": "30.0.0.1/24",
- "nextHop": "10.0.2.15"
- }
- ]
- }
+ {
+ "routes": [
+ {
+ "prefix": "20.0.0.1/24",
+ "nextHop": "10.0.1.10"
+ },
+ {
+ "prefix": "30.0.0.1/24",
+ "nextHop": "10.0.2.15"
+ }
+ ]
+ }
Verify routes
@@ -291,11 +291,11 @@
.. code-block:: console
- onos> flows any of:0000000000000205 30
- <snip>
- id=670000d1f6782c, state=ADDED, bytes=0, packets=0, duration=39, liveType=UNKNOWN, priority=36010, tableId=30, appId=org.onosproject.segmentrouting, payLoad=null, selector=[ETH_TYPE:ipv4, IPV4_DST:1.1.0.0/18],
- treatment=DefaultTrafficTreatment{immediate=[], deferred=[GROUP:0x70000014], transition=TABLE:60, meter=None, cleared=false, metadata=null}
- <snip>
+ onos> flows any of:0000000000000205 30
+ <snip>
+ id=670000d1f6782c, state=ADDED, bytes=0, packets=0, duration=39, liveType=UNKNOWN, priority=36010, tableId=30, appId=org.onosproject.segmentrouting, payLoad=null, selector=[ETH_TYPE:ipv4, IPV4_DST:1.1.0.0/18],
+ treatment=DefaultTrafficTreatment{immediate=[], deferred=[GROUP:0x70000014], transition=TABLE:60, meter=None, cleared=false, metadata=null}
+ <snip>
Notes about next hops
^^^^^^^^^^^^^^^^^^^^^
@@ -305,11 +305,11 @@
.. code-block:: console
- onos> hosts
- <snip>
- id=A2:9B:32:9D:7F:B3/None, mac=A2:9B:32:9D:7F:B3, location=of:0000000000000205/48, vlan=None, ip(s)=[192.168.101.2], configured=false
- id=B2:A4:E2:72:D1:91/None, mac=B2:A4:E2:72:D1:91, location=of:0000000000000204/16, vlan=None, ip(s)=[10.0.1.20], configured=false
- id=EE:22:F7:BE:86:50/None, mac=EE:22:F7:BE:86:50, location=of:0000000000000205/16, vlan=None, ip(s)=[10.0.2.15], configured=false
+ onos> hosts
+ <snip>
+ id=A2:9B:32:9D:7F:B3/None, mac=A2:9B:32:9D:7F:B3, location=of:0000000000000205/48, vlan=None, ip(s)=[192.168.101.2], configured=false
+ id=B2:A4:E2:72:D1:91/None, mac=B2:A4:E2:72:D1:91, location=of:0000000000000204/16, vlan=None, ip(s)=[10.0.1.20], configured=false
+ id=EE:22:F7:BE:86:50/None, mac=EE:22:F7:BE:86:50, location=of:0000000000000205/16, vlan=None, ip(s)=[10.0.2.15], configured=false
If the next hop has not been resolved for any reason, it would be necessary to configure the next hop as a host (/32 prefix) together with MAC address and location.
Learn more about how to configure a host using `Network Config Host Provider <https://wiki.onosproject.org/display/ONOS/Network+Config+Host+Provider>`_
@@ -327,20 +327,20 @@
.. code-block:: text
- ADDED, bytes=0, packets=0, table=30, priority=48010, selector=[ETH_TYPE:ipv4, IPV4_DST:50.0.0.0/24], treatment=[transition=TABLE:60]
+ ADDED, bytes=0, packets=0, table=30, priority=48010, selector=[ETH_TYPE:ipv4, IPV4_DST:50.0.0.0/24], treatment=[transition=TABLE:60]
Route blackholing can be done via network configuration.
.. code-block:: json
- {
- "apps" : {
- "org.onosproject.segmentrouting" : {
- "segmentrouting": {
- "blackholeIps": [
- "50.0.0.0/24"
- ]
- }
- }
- }
- }
+ {
+ "apps" : {
+ "org.onosproject.segmentrouting" : {
+ "segmentrouting": {
+ "blackholeIps": [
+ "50.0.0.0/24"
+ ]
+ }
+ }
+ }
+ }