CSCI 4171-MAC Address of a Random Frame Project- Dalhousie University .

Exercise 1: In this exercise, you will write a simple program to simulate the bridge-processing flowchart for a bridge that we discussed in the lectures (Please see the flowchart given on Page 3). 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: 00-00-00-11-0b-0d à MAC address of the destination host 1 à Port number
00-13-46-c6-a5-35 2 00-13-8f-cd-44-58 3 00-0c-29-51-33-c1 4 etc. You are given another text file (RandomFrames.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: 00-00-00-11-0b-0d à Source MAC address 00-13-46-c6-a5-35 à Destination MAC address 1 à Arrival port number 00-0c-29-51-33-c1 01-00-5e-7f-ff-64 4 01-00-5e-7f-ff-64 00-00-4f-31-fa-fb 3 etc. 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). 00-00-00-11-0b-0d 00-13-46-c6-a5-35 1 Forwarded on port 2 00-0c-29-51-33-c1 01-00-5e-7f-ff-64 4 Discarded 01-00-5e-7f-ff-64 00-00-4f-31-fa-fb 3 Broadcast 2 Note: The reason the last frame is broadcast is because the entry 00-00-4f-31-fa-fb is not in the FDB. You should keep track of the updated FDB and also submit that as part of your output. Your program will be tested using the sample BridgeFDB.txt and RandomFrames.txt. The BridgeFDB.txt and RandomFrames.txt can be downloaded along with the assignment from the Brightspace portal. You may use Java, C, C++ or Python as your programming language.