SDX: Software Defined Internet Exchange

Overview

Installation steps:

  • Download and import the Internet2-SDX virtual machine (VM) image, below, in VirtualBox and you are all set :)
$ wget http://sites.noise.gatech.edu/~shahbaz/internet2-sdx.ova

The username and password for the VM are 'sdx'.

Miscellaneous

  1. Follow the instructions, here, to setup the VirtualBox and enable SSH access on your VM.

  2. Visit the following sites to learn about Pyretic, POX, and Mininet:

SDX Platform

The SDX platform runs as a module on top of the Pyretic runtime. It consists of main.py file, which reads the sdx_global.cfg and sdx_policies.cfg configuration files. The sdx_global.cfg points to the topology file e.g., topology/mininet.topo, that contains information about the overall topology of the IXP i.e., how many autonomous systems (ASes) are connected, which ports they are connected to, and who they are peering with at the IXP. Whereas, the sdx_policies.cfg lists the active policies for each participant which will be composed together, processed and applied to each incoming packet. Here's an example configuration:

  • sdx_global.cfg
["topology/mininet.topo"]
  • topology/mininet.topo
{
        "A": {"Ports": [{"Id": 1, "MAC": "00:00:00:00:00:01"}],
              "Peers": ["B"]},  
        "B": {"Ports": [{"Id": 2, "MAC": "00:00:00:00:00:02"}],
              "Peers": ["A", "C"]},
        "C": {"Ports": [{"Id": 3, "MAC": "00:00:00:00:00:03"},
                        {"Id": 4, "MAC": "00:00:00:00:00:04"}],
              "Peers": ["B"]}
}
  • sdx_policies.cfg
{
        "A": ["pyretic.sdx.policies.inbound_traffic_engineering_ip_prefixes.participant_A"],
        "B": ["pyretic.sdx.policies.inbound_traffic_engineering_ip_prefixes.participant_B"],
        "C": ["pyretic.sdx.policies.inbound_traffic_engineering_ip_prefixes.participant_C"]
}

Policies

The policies are provided under the policies folder. Participants can write any type of policy using the language constructs provided in Pyretic. Each participant writes policies in its own python script which reads the announced prefixes from the accompanying local.cfg file at run time. Following is an example of the traffic offloading policy:

  • python policy
> modify(srcmac=participant.phys_ports[0].mac) >> fwd(participant.peers['A'])) + (parallel([match(dstip=participants["B"]["IPP"][i]) for i in range(len(participants["B"]["IPP"]))]) >> fwd(participant.phys_ports[0])) + (parallel([match(dstip=participants["C"]["IPP"][i]) for i in range(len(participants["C"]["IPP"]))]) >> modify(srcmac=participant.phys_ports[0].mac) >> fwd(participant.peers['C'])) ) ...">
...
def policy(participant, fwd):
    '''
        Specify participant policy
    '''
    participants = parse_config(cwd + "/pyretic/sdx/policies/traffic_offloading_ip_prefixes/local.cfg")
    
    return (
        (parallel([match(dstip=participants["A"]["IPP"][i]) for i in range(len(participants["A"]["IPP"]))]) 
          >> modify(srcmac=participant.phys_ports[0].mac) >> fwd(participant.peers['A'])) +
        (parallel([match(dstip=participants["B"]["IPP"][i]) for i in range(len(participants["B"]["IPP"]))]) 
          >> fwd(participant.phys_ports[0])) + 
        (parallel([match(dstip=participants["C"]["IPP"][i]) for i in range(len(participants["C"]["IPP"]))]) 
          >> modify(srcmac=participant.phys_ports[0].mac) >> fwd(participant.peers['C']))
    )
...
  • local.cfg
{
        "A": {"IPP": ["110.0.0.0/16"]},
        "B": {"IPP": ["120.0.0.0/16"]},
        "C": {"IPP": ["130.0.0.0/16"]}
}

Mininet Topologies

We use mininet, as a rapid prototyping and development platform, for building and testing the applications written atop SDX Platform. For each policy, listed in the policies/ folder, we provide an accompanying mininet script, under scripts/ folder, that creates and configures a network according to the topology written in the topology/mininet.topo file. (At the moment, we have hardcoded the topology in the scripts. In later versions, we will provide an automated model for reading the topology information from the topology/mininet.topo and configuring the network accordingly). Once the network is setup, the script then generates test packets to perform functional testing tailored for the given policies.

  • Example script (scripts/sdx_mininet_simple.py):
def simple(cli, controllerIP):
    "Create and test SDX Simple Module"
    print "Creating the topology with one IXP switch and three participating ASs\n\n" 
    topo = SingleSwitchTopo(k=3)
    net = Mininet(topo, controller=lambda name: RemoteController( 'c0', controllerIP ), autoSetMacs=True)
    net.start()
    hosts=net.hosts
    print "Configuring participating ASs\n\n"
    for host in hosts:
        if host.name=='h1':
            host.cmd('ifconfig lo:40 110.0.0.1 netmask 255.255.255.0 up')
            host.cmd('route add -net 120.0.0.0 netmask 255.255.255.0 gw 10.0.0.2 h1-eth0')
            host.cmd('route add -net 130.0.0.0 netmask 255.255.255.0 gw 10.0.0.2 h1-eth0')
        if host.name=='h2':
            host.cmd('route add -net 110.0.0.0 netmask 255.255.255.0 gw 10.0.0.1 h2-eth0')
            host.cmd('ifconfig lo:40 120.0.0.1 netmask 255.255.255.0 up')
            host.cmd('route add -net 130.0.0.0 netmask 255.255.255.0 gw 10.0.0.3 h2-eth0')
        if host.name=='h3':
            host.cmd('route add -net 110.0.0.0 netmask 255.255.255.0 gw 10.0.0.2 h3-eth0')
            host.cmd('route add -net 120.0.0.0 netmask 255.255.255.0 gw 10.0.0.2 h3-eth0')
            host.cmd('ifconfig lo:40 130.0.0.1 netmask 255.255.255.0 up')
    if (cli): # Running CLI
        CLI(net)
    else:
        print "Running the Ping Tests\n\n"
        for host in hosts:
            if host.name=='h1':
                host.cmdPrint('ping -c 5 -I 110.0.0.1 130.0.0.1')

    net.stop()
    print "\n\nExperiment Complete !\n\n"

Examples

We have provided three examples in the code repository: (1) A simple policy, (2), traffic-offloading policy, and (3) inbound-TE policy. Each has two flavors, one is using only the IP addresses and the other one using IP prefixes (this is a new feature provided in the latest release of Pyretic).

Each of these examples, assume three participants, A, B and C; all having a peering relationship with each other. A and B connect to only one port at the IXP, while C connects at two ports namely (C1, and C2). We implement a single topology in mininet, where the three participants are connecting to a single switch.

Here, we will show the steps needed to run the SDX platform using two examples:

1. Simple

In simple policy, we only enable connectivity between A and B and block all communication with C. Note, that C still maintains a peering relationship with A and B but the data-plane policy enforced by the SDX platform will not allow any data traffic to passthrough from A and B to C. Here're the steps for running the simple policy:

  1. Make sure that sdx_global.cfg has the following content:
["topology/mininet.topo"]
  1. Change the sdx_policies.cfg to have the following:
{
        "A": ["pyretic.sdx.policies.simple.participant_A"],
        "B": ["pyretic.sdx.policies.simple.participant_B"],
        "C": ["pyretic.sdx.policies.simple.participant_C"]
}
  1. Run SDX platform
$ cd ~/pyretic
$ ./pyretic.py pyretic.sdx.main
  1. In an other terminal, run the sdx_mininet_simple.py script:
$ cd ~/pyretic/pyretic/sdx/scripts
$ sudo sdx_mininet_simple.py

Once running you should see that participant A can ping participant B. To perform the ping test with C, run mininet in cli mode:

$ sudo sdx_mininet_simple.py --cli

Then in the mininet prompt, run the following:

mininet> ping -c 5 -I 110.0.0.1 130.0.0.1

The ping test will fail this time as there is no rule installed on the switch for packets going from A to C.

2. Inbound Traffic-Engineering

In inbout-TE policy, we do traffic engineering on the traffic coming to C from A or B. We distribute the traffic based on the IP prefixes. In this example, all traffic coming for the IP prefix 130.0.0.0/16 will be routed to port C1 and for 140.0.0.0/16 will be routed to C2. Here're the steps for running this policy:

  1. Make sure that sdx_global.cfg has the following content:
["topology/mininet.topo"]
  1. Change the sdx_policies.cfg to have the following:
{
        "A": ["pyretic.sdx.policies.inbound_traffic_engineering_ip_prefixes.participant_A"],
        "B": ["pyretic.sdx.policies.inbound_traffic_engineering_ip_prefixes.participant_B"],
        "C": ["pyretic.sdx.policies.inbound_traffic_engineering_ip_prefixes.participant_C"]
}
  1. Run SDX platform
$ cd ~/pyretic
$ ./pyretic.py pyretic.sdx.main
  1. In an other terminal, run the sdx_mininet_inbound_traffic_engineering.py script:
$ cd ~/pyretic/pyretic/sdx/scripts
$ sudo sdx_mininet_inbound_traffic_engineering.py

Once running you should see that the pings originating from C1, with source IP 130.0.0.1, for A are passing but the ones with source IP 140.0.0.1 are not. Similarly, the opposite happens for C2. This is because the replies for the ping, with source IP 140.0.0.1, from C1 are being sent to C2 based on the traffic-engineering rule applied by the SDX platform.

Contact Us

Please contact us at [email protected] or [email protected] for any questions or concerns.

For more information, visit our project page at noise-lab.net/projects/software-defined-networking/sdx.

You might also like...
A deployer and package manager for OceanBase open-source software.

OceanBase Deploy OceanBase Deploy (简称 OBD)是 OceanBase 开源软件的安装部署工具。OBD 同时也是包管理器,可以用来管理 OceanBase 所有的开源软件。本文介绍如何安装 OBD、使用 OBD 和 OBD 的命令。 安装 OBD 您可以使用以下方

LSO, also known as Linux Swap Operator, is a software with both GUI and terminal versions that you can manage the Swap area for Linux operating systems.
LSO, also known as Linux Swap Operator, is a software with both GUI and terminal versions that you can manage the Swap area for Linux operating systems.

LSO - Linux Swap Operator Türkçe - LSO Nedir? LSO, diğer adıyla Linux Swap Operator Linux işletim sistemleri için Swap alanını yönetebileceğiniz hem G

A basic ticketing software.
A basic ticketing software.

Ticketer A basic ticketing software. Screenshots Program Launched Issuing Ticket Show your Ticket Entry Done Program Exited Code Features to implement

The official repository of iGEM Paris Bettencourt team's software tools.
The official repository of iGEM Paris Bettencourt team's software tools.

iGEM_ParisBettencourt21 The official repository of iGEM Paris Bettencourt team's software tools. Cell counting There are two programs dedicated to the

Modify version of impacket wmiexec.py, get output(data,response) from registry, don't need SMB connection, also bypassing antivirus-software in lateral movement like WMIHACKER.
Modify version of impacket wmiexec.py, get output(data,response) from registry, don't need SMB connection, also bypassing antivirus-software in lateral movement like WMIHACKER.

wmiexec-RegOut Modify version of impacket wmiexec.py,wmipersist.py. Got output(data,response) from registry, don't need SMB connection, but I'm in the

Launcher program to select which version of the Q-Sys software to launch.
Launcher program to select which version of the Q-Sys software to launch.

QSC-QSYS Launcher Launcher program to select which version of the Q-Sys software to launch. Instructions To use the application simply save the "Q-Sys

A software dedicated to automaticaly select the agent of your desire in Valorant

AUTOPICKER A software dedicated to automaticaly select the agent of your desire in Valorant GUIDE Before stariting to use this program check if you ha

Comments
  • docs: fix simple typo, inbout -> inbound

    docs: fix simple typo, inbout -> inbound

    There is a small typo in README.md.

    Should read inbound rather than inbout.

    Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

    opened by timgates42 0
Owner
Software Defined Internet Exchange Point
Software Defined Internet Exchange Point
EasyBuild is a software build and installation framework that allows you to manage (scientific) software on High Performance Computing (HPC) systems in an efficient way.

EasyBuild is a software build and installation framework that allows you to manage (scientific) software on High Performance Computing (HPC) systems in an efficient way.

EasyBuild community 87 Dec 27, 2022
This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

Andre 1 Oct 24, 2022
Replay Felica Exchange For Python

FelicaReplay Replay Felica Exchange Description Standalone Replay Module Usage Save FelicaRelay (>=2.0) output to file, then python replay.py [FILE].

null 3 Jul 14, 2022
FileTransfer - to exchange files from phone to laptop

A small website I locally host on my network to exchange files from my phone and other devices to my laptop.

Ronak Badhe 4 Feb 15, 2022
Multi View Stereo on Internet Images

Evaluating MVS in a CPC Scenario This repository contains the set of artficats used for the ENGN8601/8602 research project. The thesis emphasizes on t

Namas Bhandari 1 Nov 10, 2021
Bookmarkarchiver - Python script that archives all of your bookmarks on the Internet Archive

bookmarkarchiver Python script that archives all of your bookmarks on the Internet Archive. Supports all major browsers. bookmarkarchiver uses the off

Anthony Chen 3 Oct 9, 2022
The Open edX platform, the software that powers edX!

This is the core repository of the Open edX software. It includes the LMS (student-facing, delivering courseware), and Studio (course authoring) compo

edX 6.2k Jan 1, 2023
Nimbus - Open Source Cloud Computing Software - 100% Apache2 licensed

⚠️ The Nimbus infrastructure project is no longer under development. ⚠️ For more information, please read the news announcement. If you are interested

Nimbus 194 Jun 30, 2022
pspsps(1) is a compyuter software to call an online catgirl to the Linux terminyal.

pspsps(1): call a catgirl from the Internyet to the Linux terminyal show processes: ps show catgirls: pspsps —@[email protected] pspsps(1) is a compyute

Melissa Boiko 32 Dec 19, 2022
An open letter in support of Richard Matthew Stallman being reinstated by the Free Software Foundation

An open letter in support of RMS. To sign, click here and name the file <username>.yaml (replace <username> with your name) with the following content

null 2.4k Jan 7, 2023