ProductsLogo
LogoStudy Documents
LogoAI Grader
LogoAI Answer
LogoAI Code Checker
LogoPlagiarism Checker
LogoAI Paraphraser
LogoAI Quiz
LogoAI Detector
PricingBlogAbout Us
logo

Simulation Programs for Bridge Processing and Routing

Verified

Added on  2019/09/18

|3
|584
|321
Project
AI Summary
The assignment involves writing two programs: one to simulate bridge processing using a flowchart and another to illustrate packet routing at a router. The bridge processing program reads text files containing forwarding database (FDB) and randomly generated frames, updating the FDB and/or forwarding/discarding the frames based on the flowchart. The packet routing program accepts input from two text files: a routing table with five columns and a list of packets with destination addresses. It outputs how each packet will be handled by the router, considering both network-specific and host-specific entries.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
NE T WORKS
ASSIGNMENT
In this assignment, you will write two programs for simulation - one for bridge processing and one
for routing. You may use Java, C, C++ or Python as the language for building your progr a ms.
1. Write a simple program to simulate the bridge processing flowchart discussed in the lectures.
Th e program should read a text file that contains the forwarding database (FDB). The first line in
the te xt file contains the number of ports on the bridge. The program should then read another text
f ile containing randomly generate frames just the source and destination numbers and port numbers
of arrival. For each frame, the program should use the flowchart to make an update of the
forw a rd i ng database and/or to forward/discard the frame. Ignore the CRC error detection part (that is,
assume t h at the frames are error free). Include the source code and sample runs of the program.

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
As a simple example, the text file containing the FDB and port numbers could look like t h i s :
4
A 1
B 1
C 2
D 2
E 3
F 3
X 3
In the above example, the bridge has four ports (1, 2, 3 and 4) and the current FDB has 7 entries. (Port no.4
has not yet received any frame and hence there is no entry for port no. 4).
The second text file could be like t h i s :
A B 1
X B 3
A M 1
M X 4
Etc.
The first line means that the frame has source address A and destination address B and arrives at port 1 of
the bridge. In this case, the frame should be discarded by the br i dge.
The output would look something like t h i s :
A B 1 Frame discarded
X B 3 Frame sent on port 1
A M 1 Frame broadcast on all out ports
M X 4 FDB updated; Frame sent on port 3
Etc.
You should keep track of the updated FDB and also submit that as part of your ou t pu t .
2. Write a program that illustrates packet routing at a router. The program should accept as input t h e
fo ll ow i ng :
a. A text file containing a routing table (the five column generic routing table with m a sk,
destination address, next hop, flag and i nt e rf ace ).
Document Page
b. A text file containing a list of packets (with just destination a ddr e ss e s)
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 a general manner, in the sense, it should work for any routing table a nd
any packet. It should work for both network specific and host specific entries. However, you need no t
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 e n t r ie s
in the routing table. Submit the source code and sample runs of the program.
1 out of 3
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]