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.
- Host: GitHub
- URL: https://github.com/university-project-repos/routinginformationprotocolsimulation
- Owner: University-Project-Repos
- Created: 2024-08-03T13:18:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-09T18:35:59.000Z (over 1 year ago)
- Last Synced: 2025-03-23T22:17:23.142Z (8 months ago)
- Topics: 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
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 |#
######################################
```