关键词 > CSCI4171/CSCI6704

CSCI 4171 Networks and Communications

发布时间:2023-10-30

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CSCI 4171 Networks and Communications

CSCI 6704 Advanced Topics in Networks

Fall 2023

Assignment No. 3

Date Given: Monday, October 16, 2023

Due (on Brightspace): Monday, October 30, 2023, 11.59 PM

In this assignment, you will write a program to simulate bridge-processing including bridge-learning that we discussed in the lectures. Please review the annotated notes including the Bridge Operation Flowchart. You will be essentially implementing this flowchart (don’t worry about the CRC part).

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:

First write a small program to randomly generate 100 frames. Each frame has a source MAC address and a destination MAC address. Both addresses must be from the list of addresses in the BridgeFDB.txt file. Each random entry also has the arrival port number. The arrival port number is 1, 2, 3 or 4. If the arrival port number matches the port number in the BridgeFDB.txt file, then the host has not moved from its original place. If the arrival port number is different from the port number in the BridgeFDB.txt file, then this host has moved to a different port.

A sample output of your random frame generation program could look like this:

Save your output from this program in a text file called RandomFrames.txt.

Next write another program that reads the two text files, namely, BridgeFDB.txt and RandomFrames.txt, and for each random frame, it should decide to forward/discard/broadcast the frame. If the source MAC address is not in the database, then it should update it. If the host has moved to a new port, again the FDB must be updated.

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).

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. What to submit: Source code files and BridgeOutput.txt. Your program will be tested using the sample BridgeFDB.txt and RandomFrames.txt.

The BridgeFDB.txt can be downloaded along with the assignment from the Brightspace portal.

You may use Java, C, C++ or Python as the language for building your programs.

What to submit: One zip file containing the following:

a) Source codes for the two programs

b) RandomFrames.txt

d) Text file containing the output

e) BridgeFDB.txt file (updated)

Make sure that your full name and banner ID appears on the top of the text documents and in comments in your source codes.

Late Submission Penalty: The assignment is due on Monday (October 30) at 11.59 PM. Late submissions up to 5 hours (4.59 AM on Tuesday) will be accepted without penalty. After that, there will be a 10% late penalty per day on the mark obtained. For example, if you submit the assignment on Tuesday at 12 noon and your score is 8/10, it will be reduced to 7.2/10. Submissions past five days after the grace submission time will not be accepted.