An open API service indexing awesome lists of open source software.

https://github.com/university-project-repos/routinginformationprotocolsimulation

Dynamic RIP distance-vector routing protocol simulation project for the University of Canterbury 'Internet Technologies & Engineering' COSC364 course. Slightly modified for modern Python3 versions.
https://github.com/university-project-repos/routinginformationprotocolsimulation

bellman-ford-algorithm collaborative-development computer-network computer-science computer-simulation distance-vector-routing dynamic-routing graph-theory internet-engineering internet-technology network-layer python-3 rip-protocol rip-routing routing-algorithm routing-protocols socket-io udp university-of-canterbury university-project

Last synced: 8 months ago
JSON representation

Dynamic RIP distance-vector routing protocol simulation project for the University of Canterbury 'Internet Technologies & Engineering' COSC364 course. Slightly modified for modern Python3 versions.

Awesome Lists containing this project

README

          

# COSC364 RIP Assignment

Simulates RIP routing protocol.

Reads _id_, _port_, and _output_ data from `.config` files with multiple example networks provided.

Completed to satisfaction for submission only just in the final moments with a significant bug fix and half an hour remaining to write a report - it was a very hectic and chaotic semester.

### Authors:

* [Liam Laing](https://profiles.canterbury.ac.nz/Liam-Laing)
* [Adam Ross](https://github.com/r055a)

# Instructions

## Requirements

* Python3

## Run

#### Single RIP router .config file

`python3 rip_node.py `

#### Network of multiple RIP router .config files

`python3 rip_network.py `

# Example

RIP routing simulation for router #1 when using a four-node network with router #3 inactived:

```
Welcome to the RIP router program. Awaiting initialization...
Router #1 has initialized successfully

----ROUTER #1 INITIALIZATION CONFIRMATION----
Router #1 ports: [1774, 1040, 1041]
Router #1 sockets and bounded ports:
(2, )
(3, )
(4, )

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | True | False |#
#| 3 | 1035 | 3 | True | False |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 1 |#
#| 3 | 4 | 2 |#
#| 4 | 4 | 1 |#
######################################

Router #2 is unresponsive for 4s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | False | False |#
#| 3 | 1035 | 3 | True | False |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 16 |#
#| 3 | 4 | 2 |#
#| 4 | 4 | 1 |#
######################################

Triggered routing table updates to all neighbours at 3.16s

Router #3 is unresponsive for 4s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | False | False |#
#| 3 | 1035 | 3 | False | False |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 16 |#
#| 3 | 4 | 2 |#
#| 4 | 4 | 1 |#
######################################

Triggered routing table updates to all neighbours at 3.16s

Router #4 is unresponsive for 4s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | False | False |#
#| 3 | 1035 | 3 | False | False |#
#| 4 | 9035 | 1 | False | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 16 |#
#| 3 | 4 | 16 |#
#| 4 | 4 | 16 |#
######################################

Triggered routing table updates to all neighbours at 3.16s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | True | False |#
#| 3 | 1035 | 3 | False | False |#
#| 4 | 9035 | 1 | False | False |#
###########################################

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | True | False |#
#| 3 | 1035 | 3 | True | False |#
#| 4 | 9035 | 1 | False | False |#
###########################################

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | True | False |#
#| 3 | 1035 | 3 | True | False |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 1 |#
#| 3 | 4 | 2 |#
#| 4 | 4 | 1 |#
######################################

Router #3 is unresponsive for 4s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | True | False |#
#| 3 | 1035 | 3 | False | False |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 1 |#
#| 3 | 4 | 2 |#
#| 4 | 4 | 1 |#
######################################

Triggered routing table updates to all neighbours at 0.96s

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 1 |#
#| 3 | 3 | 16 |#
#| 4 | 4 | 1 |#
######################################

Router #2 is unresponsive for 4s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | False | False |#
#| 3 | 1035 | 3 | False | False |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 16 |#
#| 3 | 3 | 16 |#
#| 4 | 4 | 1 |#
######################################

Triggered routing table updates to all neighbours at 0.92s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | True | False |#
#| 3 | 1035 | 3 | False | False |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 1 |#
#| 3 | 3 | 16 |#
#| 4 | 4 | 1 |#
######################################

Router #3 is unresponsive for 24s

###########################################
#| ROUTER #1 NEIGHBOUR ROUTER(S) STATUS |#
#|---------------------------------------|#
#| ID | Port | Metric | Active | Garbage |#
#|---------------------------------------|#
#| 2 | 1025 | 1 | True | False |#
#| 3 | 1035 | 3 | False | True |#
#| 4 | 9035 | 1 | True | False |#
###########################################

######################################
#| ROUTER #1 ROUTING TABLE |#
#|----------------------------------|#
#| Destination | First Hop | Metric |#
#|----------------------------------|#
#| 2 | 2 | 1 |#
#| 4 | 4 | 1 |#
######################################
```