CMSC 417 Programming Assignment 5: Routing Protocol, Assignments of Computer Systems Networking and Telecommunications

The requirements for programming assignment 5 in the cmsc 417 course, focusing on routing protocols. Students are tasked with building a new type of message containing route advertisements, implementing triggered and periodic updates, and forwarding packets. The document also covers protocol 2, routing table management, and handling withdrawals.

Typology: Assignments

Pre 2010

Uploaded on 07/30/2009

koofers-user-g2m-1
koofers-user-g2m-1 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
cmsc 417 programming assignment #5
May 2, 2006
Goal: Routing
1 Deadline
DUE: Friday, May 12. The late deadline will be Monday, May 15; you have only one late deadline to play
with.
2 Context
Build a new type of message that will contain a list of route advertisements of the form:
struct route_advertisement {
uint32_t destination_address;
uint8_t cost;
unsigned char reserved[3];
}
The absence of an entry does not signify its unreachability. Infinity is 16. Let an advertisement with cost
16 signifiy a withdrawal. Advertisements with cost zero are invalid.
The reserved field ensures that the visible length of the route advertisement is 8 bytes, because an array
of route advertisements would have each one starting on a new four-byte boundary.
You must send triggered updates. You must not send more than one triggered update per incoming
message (if many routes are changed, these routes should be bundled into the same message). The triggered
update should be delayed by a second.
You must send periodic updates at least once per minute to refresh the routes of your neighbors. Use a
50 second timer plus ten seconds uniformly at random. (50+random()%10) You may replace the 25 second
hello messages with periodic updates.
3 Protocol two
Send and receive route advertisements with ttl 1 using protocol 2. Protocol 1 will remain the string payload.
Every 8 bytes of a protocol 2 packet is a route advertisement. Upon receipt, accept new routes using the
distance vector route acceptance rules.
Use split horizon in assembling protocol two packets. Split horizon across the multiple-access network
formed by the multicast involves not advertising routes learned from the multicast interface back to the
multicast interface.
1
pf3

Partial preview of the text

Download CMSC 417 Programming Assignment 5: Routing Protocol and more Assignments Computer Systems Networking and Telecommunications in PDF only on Docsity!

cmsc 417 programming assignment

May 2, 2006

Goal: Routing

1 Deadline

DUE: Friday, May 12. The late deadline will be Monday, May 15; you have only one late deadline to play with.

2 Context

Build a new type of message that will contain a list of route advertisements of the form:

struct route_advertisement { uint32_t destination_address; uint8_t cost; unsigned char reserved[3]; }

The absence of an entry does not signify its unreachability. Infinity is 16. Let an advertisement with cost 16 signifiy a withdrawal. Advertisements with cost zero are invalid. The reserved field ensures that the visible length of the route advertisement is 8 bytes, because an array of route advertisements would have each one starting on a new four-byte boundary. You must send triggered updates. You must not send more than one triggered update per incoming message (if many routes are changed, these routes should be bundled into the same message). The triggered update should be delayed by a second. You must send periodic updates at least once per minute to refresh the routes of your neighbors. Use a 50 second timer plus ten seconds uniformly at random. (50+random()%10) You may replace the 25 second hello messages with periodic updates.

3 Protocol two

Send and receive route advertisements with ttl 1 using protocol 2. Protocol 1 will remain the string payload. Every 8 bytes of a protocol 2 packet is a route advertisement. Upon receipt, accept new routes using the distance vector route acceptance rules. Use split horizon in assembling protocol two packets. Split horizon across the multiple-access network formed by the multicast involves not advertising routes learned from the multicast interface back to the multicast interface.

4 Your routing table

Your routing table should consist of elements of the form:

struct route_table_entry { uint32_t destination_address; uint8_t cost; uint32_t next_hop_neighbor; };

with pointers if needed for a linked list or open hash table.

5 Printing the routing table

In response to “print routing table” (feel free to also do so on “prt”), print each routing table entry, comma- separated. Since a few of you had non-standard views of what comma separated values should look like, here’s a snippet.

printf("%u, %u, %u\n", r.destination_address, r.cost, r.next_hop_neighbor);

Do not print entries that have cost infinity, if, for some reason, you decided to continue storing them.

6 By popular demand

When you see a packet of protocol 1 and a destination of your address, print the contents. Hooray!

7 Forwarding

When you see a packet of any protocol destined for someone in your routing table, decrement the ttl and forward unless the ttl is zero or is more than infinity (16) (just in case someone else forgot to discard. Forwarding should be the same as sending; restated, sending should use forwarding. That is, attempt to forward if the destination address of the message is different from your address and is not zero. Processing a message to be forwarded should not affect the neighbor table. That is, the source address should remain unchanged and might represent a distant node, so shouldn’t affect the neighbor table. Only update the neighbor table with an address when the destination address of a packet is zero. Forwarding should use the sendmsg rate limiting.

8 Withdrawals

Generate a withdrawal when a TCP connection goes down or a neighbor is expired from the neighbor table. If you’re not connected by TCP to anyone, propagating a withdrawal is unnecessary (all others on the multicast will notice the neighbor’s absence, and split horizon means that no one is using you to get to that neighbor).

9 When there’s no route

Print ERR:NOROUTE as on sendmsg when the neighbor is absent. We’ll not build an error message.