115-441 Computer NetworksProject 1: IRC and RoutingAssigned: Tuesday, September 6th 2005Due: Tuesday, October 11th, 2005 (11:59 PM EST)Lead TA: Sachin Kulkarni <[email protected]> 1 IntroductionThe purpose of this project is to give you experience in developing concurrent network applications. You will use the BERKELEY SOCKETS API to write an Internet chat server using a subset of the Internet Relay Chat protocol (IRC)1 and implement two different routing protocols so chat messages can be exchanged between a network of chat servers.IRC is a global, distributed, real-time chat system that operates over the Internet. An IRC network consists of a set of interconnected servers. Once users are connected to an IRC server, they can converse with other users connected to any server in the IRC network. IRC provides for group communication, via named channels, as well as personal communication through “private” messages. For more information about IRC, including available client software and public IRC networks, please see The IRC Prelude.2If you have not used IRC before, you may want to try it out to get a feel for what it is. For a quick start, log in to an Andrew machine, and run irc <nickname> irc.debian.org where <nickname> is the nickname you want to use. Then type /join #c<cr> to join the C programming channel. Other channels you might be interested include #debian, #redhat, #perl, #Linux, and #c++. After you have tried out the text mode IRC client, you may want to try out more elaborate clients, such as xchatand chatzilla (part of mozilla).In addition, you will also implement a shortest path link state routing protocol. In this protocol, each node in the network periodically exchanges information with its neighbors so that everyone in the network knows the best path to take to reach each destination. This is similar to the protocols used in Internet routers. At the end of this project, you will have your own network of chat servers, which could be used to talk with users across the world.2 Logistics- The tar file for this project can be found at:http://www.cs.cmu.edu/~srini/15-441/F05/assignments/project1/project1.tar.gz- This is a group project. You must find exactly one partner for this assignment. The only reason you should not have a partner is if there are an odd number of people in the class and you are left out (in which case contact us). Talk to your neighbors and use the bboards.- Once you have found a partner, email Sachin ([email protected]) your names and andrew logins so we can assign a group number to you. Use “15441 GROUP” as the subject line. Please try to be sure you know who you will work with for the full duration of the project so we can avoid the hassle of people switching later.- This is a large project, but not impossible. Here is a recommended set of suggested milestones: 1 http://www.irchelp.org/irchelp/rfc/2 http://www.irchelp.org/irchelp/new2irc.html2√ Date Milestone 9/69/99/179/189/219/2410/110/510/710/910/11Project AssignedRead and understand project handout and RFCSimple standalone IRC server completeCHECKPOINT open for business! (see boards)Simple standalone IRC server tested thoroughlyCHECKPOINT DUE (may do earlier!)Routing daemon implementation completeRouting daemon tested thoroughlyIRC server extensions/forwarding protocol completeIRC server extensions tested thoroughlyLast minute rush to get things done and hand-in3 General OverviewAn IRC network is composed of a set of nodes interconnected by virtual links in an arbitrary topology. Each node runs a process that we will call a routing daemon. Each routing daemon maintains a list of IRC users available to the system. Figure 1 shows a sample IRC network composed of 5 nodes. The solid lines represent virtual links between the nodes. Each node publishes a set of users (i.e., the nicks of the IRC clients connected to it) to the system. The dotted lines connect the nodes to their user sets.The usage model is the following: If Bob wants to contact Alice, the IRC server on the left first must find the route or path from it to the node on the right. Then, it must forward Bob’s message to each node along the path (the dashed line in the figure) until it reaches the IRC server at Alice’s node, which can then send the message to the client Alice.In essence, each node in the system performs functions similar to the ones performed in the network layer, namely forwarding and routing. Forwarding is the action performed by each node to guide a packet toward its destination. Routing refers to the action of building the data structures necessary to reach particular destinations (in terms of the IRC server, a destination is a username/nick).Figure 1 – Sample IRC NetworkThe routing daemon will be a separate program from your IRC server. Its purpose is to maintain the3routing state of the network (e.g., build the routing tables or discover the routes to destinations). When the IRC server wants to send a message to a remote user, it will ask the routing daemon how to get there and then send the message itself. In other words, the routing daemon does the routing and the IRC server does the forwarding.3In your implementation, the routing daemon will communicate with other routing daemons (on other nodes) over a UDP socket to exchange routing state. It will talk to the IRC server that is on the same node as it via a local TCP socket. The IRC server will talk to other IRC servers via the TCP socket that it also uses to communicate with clients. It will simply use special server commands. This high level design is shown in the two large IRC server nodes in Figure 1.In order to find out about the network topology, each routing daemon will receive a list of neighboring nodes when it starts. In this project, you can assume that the no new nodes or links will ever be added to the topology after starting, but nodes and links can fail (i.e., crash or go down) during operation (and may recover after failing).4 DefinitionsBefore jumping into the gory details, let us define some terminology.- node – An IRC server and routing daemon pair running together that is part of the larger network. In the real world, a node would refer to a single computer, but we can run multiple “virtual” nodes on the same computer since they can each run on different
View Full Document