Git Product home page Git Product logo

sdn-routing's Introduction

Link-State Routing in Software Defined Networking

Create a simulated software defined network and run least-cost paths Dijkstra's algorithm.

Contents

 

Description

This project aims to simulate SDN LSRouting and data delivering using OpenFlow on small self-traffic network.

  1. TestNet - used to create and test software defined networks with switches implementing OpenFlow protocol. Networks are created using custom topology presets where each switch-to-switch link has a weight assigned to it.
  2. LSRouting - performs link-state routing using Dijkstra's least-cost paths algorithm. The results of the algorithm are used to configure flow table entries in every switch in the network.

 

Installation Guides

Clone the repository, install Python packages on the VM, and run run.py script.

View detailed installation instructions.

 

Preset Networks

TestNet includes multiple preset networks. The name of a preset describes its relative size. Most presets were reconstructed from familiar examples to demonstrate correctness of the routing algorithm.

  1. Baby – very small network with 3 switches and 3 links (network diagram).
  2. Tiny (default) – simple network with 4 switches and 5 links in-between them (network diagram).
  3. Small – a network with 6 switches and 10 links (network diagram).
  4. ...
  5. ...

View all network diagrams here.

 

Run Simulation

Select Network

  1. Run a TestNet simulation.

    $ sudo python ~/sdn-routing/run.py
  2. Choose a preset network from the list.

    < SELECT NETWORK TOPOLOGY > 
    1. Baby Topology - very small network with 3 switches and 3 links.
    2. Tiny Topology (default) - simple network with 4 switches and 5 links.
    3. Small Topology - a network with 6 switches and 10 links.
    4. Large Topology - network of 16 connected switches (debug).
    5. Massive Topology - 200 switches and 1000 links, on average (debug).
    (see network diagrams in the project definition) 
    Input the index (1 to 5) of a network you want to test:
    
  3. First configuration command-line interface (CLI) will start. Here you can enter commands to monitor network traffic (tcpdump, wireshark, etc.) or view initial network configuration (all, flows, etc.).

    < STARTING CONFIGURATION INTERFACE > 
    Input commands (optional):
    (E.g., track packets with 'sudo wireshark &', 'tcpdump', etc.)
    When you are ready to start the simulation tests, type 'exit' or press CTRL-D.
    
  4. Type exit to exit the configuration phase and begin the tests. Upon selecting, the network will launch. Next LSRouting algorithm will determine the shortest paths from hosts to hosts. The following tests will be conducted:

    TestNet> exit
    
    < RUNNING TESTS... >
    
    1. Initial Setup Test: Check host reachability before adding flow tables.

      Expected results: The hosts should not reach other hosts because routing has not been set up yet.

    2. Routing Test: Check host reachability after adding flow tables.

      Expected results: The hosts should reach other hosts after the controller constructs flow tables determined by the link-state routing algorithm. A path from one host to another has the lowest possible cost.

    3. Network Conditions Test: Check host reachability after disabling a link.

      Expected results: A link between two nodes is no longer available. Some hosts may lose connection to other hosts because their traffic is routed through that link.

    4. Second Routing Test: Recompute the least-cost paths and update flow table entries considering the change in network conditions.

      Expected results: All hosts should be able to communicate. A path from one host to another has the lowest possible cost.

  5. When the tests finish, the second CLI will start. View network statistics with all or any other debugging command. Type exit to exit the simulation phase and leave.

View sample outputs.

 

Debugging Commands

  • Multiple commands (sample output):
    • all – run multiple relevant tests on a network, one by one
  • Link-State routing (sample output):
    • weights – weight of links
    • costs – cost of the lowest-cost path to every other switch
    • routes – first-hop switches with the lowest cost
    • paths – all shortest paths
  • OpenFlow (sample output):
    • stats – traffic statistics for each switch
    • flows – flow table entries of every switch
    • deleteFlows – delete all flows
  • Run on every node (sample output):
    • ips – IP addresses
    • arps – ARP caches
    • netstats – routing tables
    • ifconfigs – interface configurations

 

Wireshark

  • Tiny Network:
    1. Initially, Host 1 cannot reach Host 2 because the flow tables of SDN-controlled switches are not computed. Wireshark and tcpdump show that Host 1 sends 3 ARP packets to find Host 2, but does not receive a reply Image 1
    2. When the flows tables are computed and updated, the least-cost path from Switch 1 to Switch 2 is going through Switch 4. The packets from Host 1 travel to Switch 1 (left), Switch 4 (middle), and then Switch 2 (right) before reaching the destination Host 2 Image 2
    3. Host 2 replies to Host 1.

 

Contributors

  • Maxim Puchkov
  • Xiyu Zhang

See latest CHANGES.md (display as plaintext).

 

GitLab repository: https://csil-git1.cs.surrey.sfu.ca/471-project-6/sdn-routing.git

Submission commit: fc0d92894f57bba92ee192848637363dcf56e3d8 (Nov 21, 2019)

Presentation commit: 8608fcc5712eef882d29a005759e99982857abb0 (Nov 26, 2019)

sdn-routing's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.