Reference no: EM13866964
In this assignment, you will write two simulation programs, one for bridge processing and one for routing. You may use Java, C, C++ or Python as the language for building your programs.
1. Write a simple program to simulate the bridge processing flowchart discussed. The program should read a text file that contains the (a) forwarding database and (b) the port numbers of a bridge. The program should randomly generate frames - just the source and destination numbers. For each frame, the program should use the flowchart to make an update of the forwarding database and/or to forward/discard the frame. Ignore the CRC error detection part (that is, assume that the frames are error free). Include the source code and sample runs of the program.
2. Write a program that illustrates packet routing at a router. The program should accept as input the following:
a. A text file containing a routing table (the five column generic routing table with mask, destination address, next hop, flag and interface).
b. A text file containing a list of packets (with just destination addresses)
It should produce an output showing a list of how each packet will be handled by the router. For instance, it should output
"Packet with destination address 192.168.1.1 will be forwarded to 192.168.5.2 out on interface S1".
Your program should be written in ageneralmanner, in the sense, it should work for any routing table and any packet. It should work for both network specific and host specific entries. However, you need not consider subnetting, that is, the masks can be the default ones for Class A (255.0.0.0), Class B (255.255.0,0) and Class C (255.255.255.0). Test your program for different types of packets and different types of entries in the routing table. Submit the source code and sample runs of the program.