



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




OSI is Applications, Presentation, Session, Transport, Network, Data Link, and Phyiscal (top to bottom). Kurose/Ross is Application, Transport, Network, Data Link, and Physical (basically, the TCP/IP stack). For the OSI model: Application – provides access to user applications Presentation – provides data independence Session – manages end-to-end connections Transport – provides reliable end-to-end data transport Network – maintains point-to-point connections Data Link – provide reliable point-to-point data transport Physical – transmission of bit stream
The delay components are Processing, queueing, transmission, and propagation. Processing delay can be reduced by faster CPUs, queueing and transmission delay by faster links, and propagation delay only by moving content closer to its user.
Main process Listen for a connection on port 80 Accept a connection and spin-off a thread or process to handle the connection
Handle GET process Parse the HTTP header for the GET object name Open the file for the object If file not found, send an HTTP 404 message If file found, send an HTTP 200 message followed by the file Close the connection Exit the thread or process
The program is missing hton*() conversions in lines 31 and 32. A bind() is missing following line 32. Also missing after line 32 is a listen(). In line 40 these should be a “+1” to the string length (to include the end of string character needed in the receiver). Finally, at the end of the program a close of the connect_s socket is missing.
Wait for call from above Wait for ACK or NACK
| | | (a) | |--------------------------------------------->|-------+ | (c) | | (b) |<---------------------------------------------|<------+ | |
|------+ | | (a) |<-----+ | ) |------+ | | (b) |<-----+
In distance-vector protocols message exchanges are between neighbors. In link-state protocols message exchanges are gobal (i.e., broadcast) to all nodes.
RIP and BGP are distance-vector protocols. OSPF is a link-state protocol.
Consider three nodes with A connected to B at cost 1 and B connected to C at cost 1. The route from A to C is through B at cost 2. If the link from B to C fails (now cost from B to C is infinity) the following will happen. At the next vector exchange A will learn that cost to B is infinity and enter this in its vector. However, B will learn that the cost to C is 2 via A and will enter 3 as its cost to C (going through A as the case may be). In the next exchange A will learn from B that the cost to C is 3 and now enter 4 as its cost to C. In this same exchange, B will learn from A that the cost to C is infinity, so it will enter infinity as its cost. And so on, until the cost to C is infinity for both A and B.
By having an IP address hierarchical as network-host, we can reduce the size of routing tables by having routing tables only handle forwarding from network to network. Only at the destination network is the host address portion used for delivering the packet to the destination host.
Host A has no way of knowing the MAC address of host B on the other side of a router. A router does not pass broadcasr ARP frames. In any case, the MAC address of the router port connecting host A’s LAN to host B’s LAN must be used to forward an A-to-B packet through the router. If some other MAC address (e.g., that of host B) were used, routing would not take place.
ICC, INFOCOM, GLOBECOM, SIGCOMM, and LCN are all networking conferences. Other possible answers include IPCCC, IC3N, Mobicom, and even VTC is acceptable. All have been discussed or mentioned in some context in the class. In any case, each of these conferences are likely to appear in the references in any paper you pick-up.
1 //============================================================ file = s.c ===== 2 //= A message "server" program = 3 //============================================================================= 4 #include <stdio.h> // Needed for printf() 5 #include <string.h> // Needed for memcpy() and strcpy() 6 #include <windows.h> // Needed for all Winsock stuff 7 8 #define PORT_NUM 1050 // Arbitrary port number for the server 9 10 void main(void) 11 { 12 WORD wVersionRequested = MAKEWORD(1,1); // Stuff for WSA functions 13 WSADATA wsaData; // Stuff for WSA functions 14 unsigned int server_s; // Server socket descriptor 15 struct sockaddr_in server_addr; // Server Internet address 16 unsigned int connect_s; // Connection socket descriptor 17 struct sockaddr_in client_addr; // Client Internet address 18 struct in_addr client_ip_addr; // Client IP address 19 int addr_len; // Internet address length 20 char out_buf[100]; // 100-byte output buffer for data 21 char in_buf[100]; // 100-byte input buffer for data 22 23 // Initializes winsock 24 WSAStartup(wVersionRequested, &wsaData); 25 26 // Create a socket 27 server_s = socket(AF_INET, SOCK_STREAM, 0); 28 29 // Fill-in my socket's address information 30 server_addr.sin_family = AF_INET; // Address family to use 31 server_addr.sin_port = PORT_NUM; // Port number to use 32 server_addr.sin_addr.s_addr = INADDR_ANY; // Listen on any IP address 33 34 // Accept a connection. 35 addr_len = sizeof(client_addr); 36 connect_s = accept(server_s, (struct sockaddr *)&client_addr, &addr_len); 37 38 // Send to the client 39 strcpy(out_buf, "Test message from server to client"); 40 send(connect_s, out_buf, strlen(out_buf), 0); 41 42 // Receive from the client 43 recv(connect_s, in_buf, sizeof(in_buf), 0); 44 printf("Received from client... data = '%s' \n", in_buf); 45 46 // Close and clean-up 47 closesocket(server_s); 48 WSACleanup(); 49 }