Dalhousie University Simulation of The Routing Process Programming Task

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.

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

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

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

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order