Write a program that illustrates packet routing at a router


In this assignment, you will write two simulation programs, one for bridge processing and one for routing. You may use Java, C, C++ or Python as the language for building your programs.

1. Write a simple program to simulate the bridge processing flowchart discussed. The program should read a text file that contains the (a) forwarding database and (b) the port numbers of a bridge. The program should randomly generate frames - just the source and destination numbers. For each frame, the program should use the flowchart to make an update of the forwarding database and/or to forward/discard the frame. Ignore the CRC error detection part (that is, assume that the frames are error free). Include the source code and sample runs of the program.

2. Write a program that illustrates packet routing at a router. The program should accept as input the following:

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 192.168.1.1 will be forwarded to 192.168.5.2 out on interface S1".

Your program should be written in ageneralmanner, 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 (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 entries in the routing table. Submit the source code and sample runs of the program.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program that illustrates packet routing at a router
Reference No:- TGS01151856

Now Priced at $50 (50% Discount)

Recommended (94%)

Rated (4.6/5)

A

Anonymous user

5/18/2016 3:05:51 AM

In this task, you will write two simulation programs, one for bridge processing and one for the routing. You might make use of Java, C, C++ or Python as the language for building your programs. 1) Prepare a simple program to simulate the bridge processing flowchart illustrated. The program must read a text file which includes the (i) forwarding database (ii) the port numbers of bridge. The program must arbitrarily produce frames - just the source and destination numbers. For every frame, the program must make use of the flowchart to make an update of the forwarding database and/or to forward or discard the frame. Avoid the CRC error detection part. Comprise the source code and sample runs of program. 2) Prepare program which discusses the packet routing at a router. The program must accept as input the given: a) A text file having a routing table. b) A text file having a list of packets.