Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The bgpSpeakers list contains an entry for each BGP speaker in the SDN network. The header for each BGP speaker includes an arbitrary name for the speaker, the attachment point where it is connected to the SDN network (specified by DPID and port number) and the MAC address of the BGP speaker. Then, each BGP speaker has a list of "interfaceAddresses", which are the external-facing interfaces this speaker has peering sessions on, and the IP address it uses for that peering session.

 

New Configuration

Please note the configuration file format has changed in ONOS 1.3 (Drake). For information on the older configuration format, please see an archived version of this page for the version of ONOS you are using.

SDN-IP requires some configuration so that it knows where the internal BGP speakers and external BGP peers are located, such that it can respond to ARPs correctly and program connectivity for the BGP traffic.

For each peering session that is set up, there will be a pair of IP addresses. One address is the address of the external peer, and the other address is the address the our internal BGP speaker uses. We require that these addresses are in the same subnet for now.

Network configuration file

SDN-IP's configuration uses the network config subsystem in ONOS. This system allows modifying configuration at runtime, however SDN-IP currently only supports reading static configuration defined at startup (we will add runtime config modification support soon).

Practically this means that SDN-IP config should be placed in the network-cfg.json file in your config directly, and it will be read in automatically at startup by the NetworkConfigLoader. 

If you plan to deploy ONOS and SDN-IP manually you need to copy the configuration file in the config directory on each instance. This is located at KARAF_ROOT/../config, and the path is not currently configurable.

Otherwise, when using the ONOS cell mechansim to deploy an ONOS cluster, the config file can be placed in the ONOS_ROOT/tools/package/config directory, on the management node you use to deploy. Then, they will be automatically be copied to the correct location on the cell instances when the cluster is deployed.

JSON configuration format

The following code block shows an example of the JSON configuration format.

Code Block
{
    "ports" : {
        "of:0000000000000005/4" : {
            "interfaces" : {
                "interfaces" : [
                    {
                        "ips"  : [ "10.0.1.2/24" ],
                        "mac"  : "00:00:00:00:00:01"
                    }
                ]
            }
        },
        "of:0000000000000006/4" : {
            "interfaces" : {
                "interfaces" : [
                    {
                        "ips"  : [ "10.0.2.2/24" ],
                        "mac"  : "00:00:00:00:00:03"
                    }
                ]
            }
        },
        "of:0000000000000007/4" : {
            "interfaces" : {
                "interfaces" : [
                    {
                        "ips"  : [ "10.0.3.2/24" ],
                        "mac"  : "00:00:00:00:00:01"
                    },
                    {
                        "ips"  : [ "10.0.4.2/24" ],
                        "mac"  : "00:00:00:00:00:02"
                    }
                ]
            }
        },
        "of:0000000000000008/4" : {
            "interfaces" : {
                "interfaces" : [
                    {
                        "ips"  : [ "10.0.5.2/24" ],
                        "mac"  : "00:00:00:00:00:02"
                    },
                    {
                        "ips"  : [ "10.0.6.2/24" ],
                        "mac"  : "00:00:00:00:00:03"
                    }
                ]
            }
        },
        "of:0000000000000009/4" : {
            "interfaces" : {
                "interfaces" : [
                    {
                        "ips"  : [ "10.0.7.2/24" ],
                        "mac"  : "00:00:00:00:00:01"
                    }
                ]
            }
        },
        "of:0000000000000010/4" : {
            "interfaces" : {
                "interfaces" : [
                    {
                        "ips"  : [ "10.0.8.2/24" ],
                        "mac"  : "00:00:00:00:00:03",
                        "vlan" : "200"
                    }
                ]
            }
        }
    },
    "apps" : {
        "org.onosproject.router" : {
            "bgp" : {
                "bgpSpeakers" : [
                    {
                        "connectPoint" : "of:0000000000000001/7",
                        "peers" : [
                            "10.0.1.1",
                            "10.0.3.1",
                            "10.0.7.1"
                        ]
                    },
	                {
                        "connectPoint" : "of:0000000000000001/8",
                        "peers" : [
                            "10.0.4.1",
                            "10.0.5.1"
                        ]
                    },
	                {
                        "connectPoint" : "of:0000000000000001/9",
                        "peers" : [
                            "10.0.2.1",
                            "10.0.6.1",
                            "10.0.8.1"
                        ]
                    }
                ]
            }
        }
    }
}

There are two main sections to this file:

  1. The ports section that configures an interface on each switch port that connects to an external BGP router
  2. The bgp section that configures the internal BGP speakers that exist within the SDN network.

"ports" section

Here we configure an interface on each port that connects to an external BGP router. An interface is a set of addresses and other configuration that are logically mapped to the switch port, e.g. IP addresses, a MAC address, or a VLAN tag. These are the addresses that our network (i.e. our internal BGP speaker) is using to talk to entities outside the network. The concept is similar to how you would configure addresses or VLANs on an interface within Linux.

Each interface minimally needs one IP address and one MAC address. This information is used by the ProxyARP application so that it can respond to ARP requests from the outside world with the correct information. For SDN-IP, you need to configure the IP address that your network (and your internal BGP speaker) is using to peer with BGP peers outside the network. The MAC address you use for an interface should match the MAC address on the interface of the host that is running the internal BGP speaker that has that address. This is because BGP traffic from external peers is going to be forwarded to the BGP speaker, and if it has the wrong destination MAC address then the hosts's OS will drop the traffic.

If there is more than one internal BGP speaker having peering sessions on the same switch port, then it is possible to configure multiple interface sections on a single switch port (see port of:0000000000000008/4 in the example). This also works if you want to have different VLANs on the same port for different peering sessions.

"bgp" section

In this section we add configuration for each internal BGP speaker that exists in our network.

Each BGP speaker has a connnectPoint. This is the switch port in the network where the BGP speaker is physically plugged in.

In addition, each BGP speaker has a list of peer IP addresses which are the addresses of the peers which that BGP speaker is peering with. For each peer address that we configure here, there should be a corresponding address for our side of the connection that was configured in the "ports" section (see above). SDN-IP will determine which port the peer is connected at by finding an interface with an IP address in the same subnet. (This means that right now it's best not to use overlapping subnets for different interfaces. However it is fine to have to external peers in the same subnet if they are connected to our network at the same port). Once SDN-IP determines the peer-to-BGP-speaker association, it will install intents to allow BGP traffic to flow through the network between these two points.

SDN-IP component configuration

In addition to the network configuration described above, there is a separate configuration file for the SDN-IP software component. Currently there is one configurable parameter, the port that SDN-IP listens for incoming BGP connections on. If you wish to configure this parameter, place this file at at KARAF_ROOT/etc/org.onosproject.routing.bgp.BgpSessionManager.cfg. Note that by default ONOS listens on TCP port number 2000 for incoming BGP connections, which is not the default BGP port number 179.

Code Block
bgpPort=2000

...

BGP speakers

Each BGP speaker potentially has multiple peering sessions to different external networks. It is possible for these peering sessions to be on different IP subnets, which means each BGP speaker can potentially have multiple IP addresses it is peering on. These addresses must be configured in the sdnipnetwork-cfg.json file, but they also need to be configured on the interfaces of the BGP speaker, so that it can receive packets sent to it on those addresses.

...