View the step-by-step solution to:


This question was created from Assign3.Networks.17.pdf


2. Write a program that illustrates packet routing at a router. The program should accept as input the
a. A text file containing a routing table (the five column generic routing table with mask,
destination address, next hop, flag and interface).
b. A text file containing a list of packets (with just destination addresses)
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 will be forwarded
192. 168.5.2 out on interface 51".
Your program should be written in a general manner, in the sense, it should work for any routing table and
any packet. It should work for both network specific and host specific entries. However, you need not
consider subnetting, that is, the masks can be the default ones for Class A (, Class B (255.255.0,0)
and Class C ( Test your program for different types of packets and different types of entries
in the routing table. Submit the source code and sample runs of the program.
What to submit: One zip file containing the source codes (do not cut and paste source codes - they should
be in the original form), sample input text files and sample outputs.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes