CSCI 4171 Dalhousie University MAC Address of a Random Frame Project
Exercise 1: In this exercise, you will write a simple program to simulate the bridge-processing flowchart fora 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 host1 à Port number 00-13-46-c6-a5-35200-13-8f-cd-44-58300-0c-29-51-33-c14etc.You are given another text file (RandomFrames.txt) that contains the source MAC address, the destinationMAC address of a random frame on the network that the bridge is connected to, and the port number of thebridge that it arrives on. The entries in this text file are arranged as shown below:00-00-00-11-0b-0d à Source MAC address00-13-46-c6-a5-35 à Destination MAC address1 à Arrival port number00-0c-29-51-33-c101-00-5e-7f-ff-64401-00-5e-7f-ff-6400-00-4f-31-fa-fb3etc.Your program should read the two text files, and for each random frame, it should make a decision either toforward/discard/broadcast the frame. If the source MAC address is not in the database, then it should updateit.Ignore the CRC error detection part (that is, assume that the frames are error free). Store the resulting outputin 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 200-0c-29-51-33-c1 01-00-5e-7f-ff-64 4 Discarded01-00-5e-7f-ff-64 00-00-4f-31-fa-fb 3 Broadcast2Note: 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 partof your output. Your program will be tested using the sample BridgeFDB.txt andRandomFrames.txt.The BridgeFDB.txt and RandomFrames.txt can be downloaded along with the assignment from theBrightspace portal.You may use Java, C, C++ or Python as your programming language. CSCI 4171/CSCI 6704
NETWORKS
ASSIGNMENT NO.3
Date Given: Saturday, October 23, 2021
Date Due: Saturday, November 6th, 2021, 11.59 PM
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
1
00-13-46-c6-a5-35
2
00-13-8f-cd-44-58
3
00-0c-29-51-33-c1
4
etc.
à MAC address of the destination host
à Port number
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-0c-29-51-33-c1
01-00-5e-7f-ff-64
00-13-46-c6-a5-35
01-00-5e-7f-ff-64
00-00-4f-31-fa-fb
1
4
3
Forwarded on port 2
Discarded
Broadcast
1
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.
Exercise 2: Consider the bridge configuration shown in the figure below. Bridges B1 and B2 connect two
LANs, and A and B are hosts on one LAN. This is one of the configurations that results in a classic problem
in bridges called the bridge loop problem that results in a race condition. One of the solutions to this
problem is then bridge spanning tree protocol. Conduct an online search to understand this problem, and
how it is fixed. Write a short report (approximately one page, 12 point, single font including citations) on
your study of the problem and its solution.
A
Bridge B1
B
Bridge B2
What to submit: One zip file containing the following:
a) Source code for Exercise 1
b) Text file/PDF containing the output for Exercise 1
c) BridgeFDB.txt file (updated) for Exercise 1
d) PDF for Exercise 2
2
Bridge Operation Flowchart (including Bridge Learning)
Bridge B
Frame with source address = X and destination address = Y arrives at
port p.
Fail
CRC
Discard frame
Pass
É
Is the entry
[X p]?
I
µ
Change entry to [X p]
Broadcast frame on all
ports except p
Check source
address X. Is
there an entry
for X in FDB?
Add entry [X p]
Check
destination
address Y. Is
there an entry
for Y in FDB?
I Yes
Is the
entry
[Y p]?
Discard frame
thts
EY 9
Forward frame on
port q
3
00-00-00-11-0b-0d
00-13-46-c6-a5-35
1
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
00-1d-60-29-cc-b2
00-1d-7d-77-de-3c
4
00-19-5b-0d-04-dc
00-21-91-f5-d5-d4
1
00-1a-4d-34-ab-cd
00-e0-4c-86-70-09
2
00-1f-d0-c8-49-7f
00-24-1d-3a-7d-14
3
00-11-22-33-44-55
00-1d-60-29-a5-ae
3
00-24-1d-3a-b8-2a
00-19-5b-0d-04-dc
2
00-0c-29-33-47-6f
00-11-22-33-44-55
200-00-00-11-0b-0d
1
00-13-46-c6-a5-35
2
00-13-8f-cd-44-58
3
00-0c-29-51-33-c1
4
01-00-5e-7f-ff-64
4
00-1a-4d-30-f7-a7
3
00-0e-38-72-eb-97
2
00-e0-4c-34-e4-9c
1
00-0c-29-e6-60-20
1
00-00-0c-07-ac-66
2
00-1f-d0-c8-4a-27
3
00-1f-d0-c8-49-7c
4
00-11-22-33-44-55
3
00-00-4d-0a-9f-3d
2
00-24-1d-3a-cc-e4
1
00-ff-00-02-00-17
1
00-21-91-8c-b9-3f
2
00-0e-d7-bf-56-6b
3
00-1d-7d-4c-6a-d9
4
00-0c-29-f1-3c-61
4
00-0c-29-fe-f7-2d
3
00-1a-4d-34-ab-cd
2
00-e0-4c-86-70-09
1
00-50-ba-bc-bb-41
1
00-0c-29-e6-60-16
2
00-1f-d0-c8-49-7f
3
00-24-1d-3a-7d-14
4
00-1a-4d-34-aa-7b
4
00-1d-60-29-a5-ae
3
00-24-1d-3a-b8-2a
2
00-19-5b-0d-04-dc
1
00-21-91-f5-d5-d4
1
00-0c-29-33-47-6f
2
00-18-f3-05-c0-3e
3
00-1b-2f-2f-a5-21
4
00-1d-7d-4c-6a-21
4
00-07-95-49-70-63
3
00-15-58-07-0b-f8
2
00-ff-00-02-00-16
1
00-13-8f-f4-01-8f
1
00-1d-58-00-00-1e
2
00-d0-2b-61-65-0a
3
00-1d-60-29-cc-b2
4
00-1d-7d-77-de-3c
4
00-13-8f-f0-96-87
3
00-1a-4d-34-ab-df
2
Top-quality papers guaranteed
100% original papers
We sell only unique pieces of writing completed according to your demands.
Confidential service
We use security encryption to keep your personal data protected.
Money-back guarantee
We can give your money back if something goes wrong with your order.
Enjoy the free features we offer to everyone
-
Title page
Get a free title page formatted according to the specifics of your particular style.
-
Custom formatting
Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.
-
Bibliography page
Don’t pay extra for a list of references that perfectly fits your academic needs.
-
24/7 support assistance
Ask us a question anytime you need to—we don’t charge extra for supporting you!
Calculate how much your essay costs
What we are popular for
- English 101
- History
- Business Studies
- Management
- Literature
- Composition
- Psychology
- Philosophy
- Marketing
- Economics