Problem statement We have to implement the distance-vector (Bellman Ford) routing protocol using Python as the programming language. We are provided with the topology map in the form of configuration files. Each router must only know the costs to reach its direct neighbors and the cost it takes to reach other routers from any given neighbor. The routers must not have global knowledge. Upon initialization, each router creates a distance-vector update packet and sends this packet to all direct neighbors. Upon receiving this distance-vector update packet, each neighboring router will incorporate the provided information into its routing table. Each router should periodically broadcast the distance-vector update packet to its neighbors every 10 seconds. Approach used Multithreading Distance vector routing protocol(Bellman Ford) Socket programming Simulated network(localhost) Simulated network: Since, we are not provided any access to real network routers (for implementation and testing of your programs), we used a simulated network that was running on a single desktop machine (localhost). Multithreading: We have used multithreading in our project in which a single set of code can be used by several processors at different stages of execution. There are two threads in our project. One is for the client status and the other is for the server which will run forever until the router exists. Socket programming: Python provides two levels of access to network services. At a low level, we can access the basic socket support in the underlying operating system, which allow to implement clients and servers for both connection-oriented and connectionless protocols. In our Project we use Connectionless protocol which is UDP (User Datagram Protocol).In our program client and server are implemented together in a same file and we are accessing server name, port number and config filename from command line arguments. Data structure used: For the communication of data between client and the server python dictionaries have been used which are editable later on. We are reading the file and then storing it in a dictionary. To send this data json has been used. Distance vector routing protocol(Bellman Ford): In distance vector routing algorithm distance vector is passed to calculate the minimum cost from one node to the other nodes. Distance vector is actually a dictionary which contains the data about neighbors and their distances from other neighbouring nodes. Bellman runs only if the update vector comes and update vector comes only when the cost changes. Checking an active host: To check whether a host is running or not we have implemented the active host function. This function returns whether a host is active or not. The purpose was to check regularly the active hosts and the closed hosts. Problems Faced: We faced many problem in the implementation of the Bellman Ford algorithm regarding to its calculations and also we still haven't implemented the link down problem solution.
forked from saleemnust/Routing-Protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Problem statement We have to implement the distance-vector (Bellman Ford) routing protocol using Python as the programming language. We are provided with the topology map in the form of configuration files. Each router must only know the costs to reach its direct neighbors and the cost it takes to reach other routers from any given neighbor. The…
HelloLeexy/Routing-Protocol
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Problem statement We have to implement the distance-vector (Bellman Ford) routing protocol using Python as the programming language. We are provided with the topology map in the form of configuration files. Each router must only know the costs to reach its direct neighbors and the cost it takes to reach other routers from any given neighbor. The…
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%