Dalhousie University Simulation of The Routing Process Programming Task

Description

 write a simple program to simulate the routing decision taken at a router that we discussed in the lectures. You are given a text file (RoutingTable.txt) containing a routing table for a router (the five column generic routing table with mask, destination address, next hop, flag and interface). You will notice that this is almost the same routing table as the one that we discussed in the lectures. The first few lines of the text file are shown below:
192.168.1.0/24 ? Destination address/Number of ones in the mask
– ? – means no next hop
E0 ? Outgoing interface 192.168.2.0/24 ? Destination address/Number of ones in the mask 
192.168.4.2 ? Next hop 
S0 ? Outgoing interface Etc. 
 

4 attachmentsSlide 1 of 4attachment_1attachment_1attachment_2attachment_2attachment_3attachment_3attachment_4attachment_4

Unformatted Attachment Preview

192.168.1.0/24

E0
192.168.2.0/24
192.168.4.2
S0
192.168.3.0/24
192.168.5.2
S1
192.168.4.0/24

S0
192.168.5.0/24

S1
192.168.6.0/24
192.168.4.2
S0
192.168.2.2/32
192.168.5.2
S1
192.168.3.3/32
192.168.4.2
S0
0.0.0.0/0
192.168.4.2
S0
192.168.1.0/24

E0
192.168.2.0/24
192.168.4.2
S0
192.168.3.0/24
192.168.5.2
S1
192.168.4.0/24

S0
192.168.5.0/24

S1
192.168.6.0/24
192.168.4.2
S0
192.168.2.2/32
192.168.5.2
S1
192.168.3.3/32
192.168.4.2
S0
0.0.0.0/0
192.168.4.2
S0
CSCI 4171/CSCI 6704
NETWORKS
ASSIGNMENT NO.4
Date Given: Sunday, November 7th, 2021
Date Due: Sunday, November 21st, 2021, 11.59 PM
The objective of this assignment is the simulation of the routing process in a router. You may use Java, C,
C++ or Python as the language for building your program.
Download the associated text files (given next to the Assignment link).
Exercise: You will write a simple program to simulate the routing decision taken at a router that we discussed
in the lectures. You are given a text file (RoutingTable.txt) containing a routing table for a router (the five
column generic routing table with mask, destination address, next hop, flag and interface). You will notice
that this is almost the same routing table as the one that we discussed in the lectures. The first few lines of the
text file are shown below:
192.168.1.0/24
E0
192.168.2.0/24
192.168.4.2
S0
Etc.






Destination address/Number of ones in the mask
– means no next hop
Outgoing interface
Destination address/Number of ones in the mask
Next hop
Outgoing interface
Notice that three rows are sufficient to capture the information in the five columns of the routing table. The
type of entry (direct, network specific, host specific or default) is not given but you can determine that from
the given information.
You are given another text file (RandomPackets.txt) that contains a list of packets with random destination
addresses that arrive at this router. The first few lines of the text file are shown below:
192.168.1.1
192.168.3.2
200.56.45.89
255.0.0.0
127.0.0.1
etc.
If you check the above packets with the given routing table, you will notice that packet #2 is a host specific
packet, packet #3 should take the default route, packet #4 does not belong to class A, B or C and should be
discarded, packet #5 has a loopback address and should be discarded.
Your program should read the two text files and decide what to do with each packet, displayed as follows:
192.168.1.1 will be forwarded on the directly connected network
interface E0.
192.168.3.2 will be forwarded to 192.168.5.2 out on interface S1
200.56.45.89 will be forwarded to 192.168.4.2 out on interface S0
255.0.0.0 is malformed; discarded
127.0.0.1 is loopback; discarded
on
Store the answers in a text file (RoutingOutput.txt).
Write your program in a general manner, in the sense, it should work for any routing table and any packet.
You may assume that all the masks in the table are the default ones for Class A (255.0.0.0), Class B
(255.255.0,0) and Class C (255.255.255.0)..
What to submit: One zip file containing the following:
a) Commented Source code
b) RoutingOutput.txt
192.168.1.1
192.168.3.2
200.56.45.89
255.0.0.0
127.0.0.1
192.168.2.2
192.168.3.2
192.168.10.45
192.168.6.34
192.168.0.15
192.168.4.3
192.168.5.79
10.5.6.7
172.3.4.5
192.168.0.192

Purchase answer to see full
attachment

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

Reviews, comments, and love from our customers and community:

Article Writing

Keep doing what you do, I am really impressed by the work done.

Alexender

Researcher

PowerPoint Presentation

I am speechless…WoW! Thank you so much!

Stacy V.

Part-time student

Dissertation & Thesis

This was a very well-written paper. Great work fast.

M.H.H. Tony

Student

Annotated Bibliography

I love working with this company. You always go above and beyond and exceed my expectations every time.

Francisca N.

Student

Book Report / Review

I received my order wayyyyyyy sooner than I expected. Couldn’t ask for more.

Mary J.

Student

Essay (Any Type)

On time, perfect paper

Prof. Kate (Ph.D)

Student

Case Study

Awesome! Great papers, and early!

Kaylin Green

Student

Proofreading & Editing

Thank you Dr. Rebecca for editing my essays! She completed my task literally in 3 hours. For sure will work with her again, she is great and follows all instructions

Rebecca L.

Researcher

Critical Thinking / Review

Extremely thorough summary, understanding and examples found for social science readings, with edits made as needed and on time. Transparent

Arnold W.

Customer

Coursework

Perfect!

Joshua W.

Student

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>