exercise 2 in this exercise you will write a simple program to simulat
Question
Exercise 2: In this exercise, you will write a simple program to simulate the bridge-processing flowchart for a bridge
that we discussed in the lectures. You are given a text file (BridgeFDB.txt) that contains the forwarding database of a
bridge with four ports. The entries in the text file are arranged as shown below:
You are given another text file (Random Frames.txt) that contains the source MAC address, the destination MAC
address of a random frame on the network that the bridge is connected to, and the port number of the bridge that it
arrives on. The entries in this text file are arranged as shown below:
Your program should read the two text files, and for each random frame, it should make a decision either to
forward/discard/broadcast the frame. If the source MAC address is not in the database, then it should update it.
Ignore the CRC error detection part (that is, assume that the frames are error free). Store the resulting output in
another text file (BridgeOutput.txt).
Your output would look something like this (for the above three sample frames).