Giter Site home page Giter Site logo

distance-vector-routing's Introduction

Project Overview

This Python project implements a robust routing protocol over a network of servers acting as routers. It's designed to adapt dynamically to changes in the network topology and link costs.

Contributors

  • Alan Lam
  • Jonathan Dang
  • Nida Sheikh Nida Hilal
  • Steven Wang

Dependencies

  • Python Version: At least Python 3.11.x

How to Install Dependencies

  • Windows/Mac:
  • Linux:
    • Use the command sudo [apt] install python3.11. Replace [apt] with the package manager for your Linux variant.

Getting Started

Creating Topology Files

Before running the program, create a topology file for each server. This file should only include the link cost to the server's immediate neighbors. The program determines its own host ID and IP port by scanning through the neighbors' link cost list.

Topology File Example

Topology File Example

Running the Program

  1. Run the Script: Execute distance_vector_routing.py in your terminal.
  2. Start the Server: Use the command server -t <topology-file-name> -i <routing-update-interval>.
    • Example: server -t topology-1.txt -i 3
  3. Further Instructions: Additional launch instructions are provided during run-time.

Available Commands

Type help in the terminal to see all available commands. These commands allow you to manage the network effectively.

  • update <server-ID1> <server-ID2> <Link Cost>: Update the link cost between two servers.
    • Example: update 1 2 inf sets the link between servers 1 and 2 to infinity.
    • Example: update 1 2 8 changes the link cost between servers 1 and 2 to 8.
  • step: Send a routing update to neighbors immediately.
  • packets: Display the number of distance vector packets the server has received since the last check.
  • display: Show the current routing table in a sorted order. The format for each line is <destination-server-ID> <next-hop-server-ID> <cost-of-path>.
  • disable <server-ID>: Disable the link to a specific server.
  • crash: Simulate a server crash by closing all connections, setting the link cost to infinity.

More Information

For detailed project information, setup guidelines, and advanced features, please refer to the accompanying Assignment.pdf.

distance-vector-routing's People

Contributors

ntrllog avatar steven100695 avatar jonathan-dang 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.