Objective: Implement self-learning and forwarding of bridge/switch via programing simulation. Consider a network topology where a switch is connected some PCs and other switches. For our implementation, we will consider that each switch has only 8 ports. Each switch will be represented by one program (sw) and each PC will be represented by another program (pc). We will use UDP port numbers to represent the ethernet address of each PC. Running the pc side program: python pc.py -s <my src port> -d <switch udp port> Here <my src port> represents src mac address of PC and program will listen for incoming msgs on this UDP port. The <switch UDP port> indicates to which switch this PC is connected. On invoking the program, it will ask for input in the following format: <dst port>, <msg data> When i/p is received, this PC will send this data to switch i.e. to process listening on <switch udp port>. Running the switch program: python switch.py -s <my port>, -p <port-1>, ..., <port-N> The interpretation of these params are as follows: <my port> is the udp port on which a switch will listen to receive msg from connected devices. <port-1>, ..., <port-N> are ports which implies that devices are connected i.e. those devices having these ethernet addresses (devices listening on these UDP ports>
surajgillespie/SwitchSimulation
this is a python program written to simulate the forward of packets and update the switch table entries.