Tuesday, August 19, 2014

Foundations of Computer Networking chapter-1


Chapter 1

Definitions

  • Computer Network -  Autonomous hosts (computers) interconnected by a single technology, usually for purposes of sharing resources (files, printers, CPU).
  • Distributed system - Access to networked resources is transparent, user views resources rather than a specific machine and its associated resources. User not required to know on which machine specific resources are posited.
    • Is IUS LAN a distributed system?
    • Do you need to know which computer the H: or J: drives reside?
  • IMP - Interface Message Processor. Forwards host messages over a communication channel to another IMP, the IMP connected to the destination host delivers the message. 
  • Subnet - Basically the IMPs and communication channel; not the hosts.
  • Local Area Network - Privately owned networks within a small area (building, campus) a few kilometers in size. Ethernet predominates. Most LANs use a broadcast network, all hosts access the same communications channel. Ethernet uses a logical bus or linear cable connection (at right) that is relatively inexpensive to install but is limited in range (a few kilometers).
    • IUS shares resources (J: drive) from a central site (Bloomington).
    • Where does the IUS LAN end?
  • Wide Area Network - Large area (country, world) often connected over public communications network. Usually implemented by a point-to-point connection joining LANs (see below).
    • Can you give an example of a WAN?
  • Internetwork - Collection of networks, often LAN's, joined by some common connection (WAN) that passes messages from one network to another. In the diagram at right, hosts on the Ethernet and Token ring LANs can communicate across gateways that give access to a subnet. The gateway translates between Ethernet or Token Ring and the subnet message form. The subnet delivers the message to the appropriate gateway. 
    • Can you give an example of an Internetwork?
  • Router/gateway/bridges
    • Routers form the connection point between the same type of networks (e.g. connect two Internet subnets) by determining to which subnet a message should be sent for eventual delivery.
      • Can you think of an example?
    • Gateways perform the hardware and software translation necessary to connect dissimilar networks (e.g. X.25 to ATM, Internet to Microsoft Network, broadcast to point-to-point). 
    • Bridges are simpler versions of gateways, translating only at the hardware level (e.g. Ethernet to Ethernet, Ethernet to Token Ring, etc.).
      • Why would this be useful?
  • Client/server model - Resources such as files held on one or more servers are accessible to a user's client machine. Client  machine executes programs locally while accessing server for files over a communications channel. File server may provide all storage, both program and data. Either the entire file or specific parts of a file (a database record) can be transmitted between client and server.
    • Is the Web a client/server model?
  • Peer-to-Peer - Peer hosts on the network act as servers, giving access to resources such as disk or printer, and as workstations. Given the low hardware cost of servers, reliability problems (people turn their machine off), security issues, administration overhead, etc. it seldom is worth the trouble.
    • Any examples of a peer-to-peer network?
    • How would you characterize borrowing using a credit card versus borrowing from friends? 
  • Broadcast network - Sender transmission visible to all on a single, shared communications channel. Most LANs broadcast but include an address to a specific receiver. On a broadcast network such as Ethernet, some means required for handling contention to ensure that only one sender at a time.
    • Any other examples of broadcast?
    • Obviously radio and TV, what about cable TV? Others?
  • Multicast network - Single transmission addressed to more than one receiver on channel.
  • Point-to-point network
    • Connections between pairs of hosts
    • no addressing or need to limit to one sender required
    • each host may be connected one or multiple hosts
    • many communication channels may be required for constructing a network
    • multicast on network difficult since message must be passed through several intermediate connections.
      • Is the USPS mail point-to-point?
      • The phone system?
      • Classroom discussion?
      • Spreading a rumor?
    The most common point-to-point connection topology are:
    • Star - Usually implies a centralized switching device (computer, switch, etc.) that forms connections by routing from one host to another. Connected devices simple and relatively inexpensive, central switch complex and failure prone at central point, communication limited by capacity of central device.
      • How many bi-directional communication lines are needed to connect 4 devices?
      • What is the longest number of hops between any two devices?
    • Fully Connected - All hosts are directly connected, multiple simultaneous communications possible. Very robust but all devices complex, usually too expensive to be practical except in very small small networks, the number of connections grows rapidly.
      • How many communication lines are needed to connect 6 devices?
      • What is the longest number of hops between any two devices?
    • Tree - Hierarchy of connections, multiple simultaneous communication possible when traffic localized. Upper levels possible bottleneck if most traffic not localized to lower levels. Sensitive to failure at upper levels. A hierarchical structure but not a tree is used to implement much of the Internet since multiple paths are often available, adding robustness.
      • How many communication lines are needed to connect the tree in the diagram?
      • What is the longest number of hops between any two devices?
      • Is there a downside to deep trees?
      • Is there a downside to wide trees?
    • Ring - Circular connection, each host communicating directly with neighbors only. Communication may be bi-directional or unidirectional (if connection only to the right, communication with left neighbor would past though all hosts). Subject to breakage of ring when intermediate host fails or is turned off, requiring centralized switching connections (similar to star) to maintain ring continuity. Used by Token Ring technology.
      • How many communication lines are needed to connect 6 devices?
      • What is the longest number of hops between any two devices on a bi-directional ring?
      • What is the longest number of hops between any two devices on a uni-directional ring?


  • Datagram - Similar to a letter in that each is transmitted independently from source to destination. Datagrams from a source to the same destination may take different paths and arrive out of the time sequence sent.
    • Give an example when data received in a different sequence would cause a problem?
    • Are there advantages to datagrams potentially traveling different routes?
  • Switched Circuit - A physical connection is made from source to destination through interconnecting switches (may actually be a relay switch closing connections between two copper wires). All communications follow the same path and arrive in order sent. Requires a setup of the path between source and destination addresses before communication can occur. Example is an analog phone system where only a single connection can use the switched circuit.
    • Is it possible to send datagrams over a switched circuit? 
  • Virtual Circuit - Differs from switched circuit in that the route is not dedicated to a single user, others may share the channel (four virtual circuits might be carried over a single communications channel). All communication from a host follows the same path so arrives in order sent.
    • Any advantages over a non-virtual circuit?
  • Packets - A container for sending message units over a network. Below is the byte format of the packet used by Novell. May contain complete message or if message larger than maximum packet size then message split into multiple packets.
    Analogous to a letter with:
    • destination address - Address of host to receive message (i.e. the NIC physical address of the receiving host).
    • source address - Address of host sending message.
    • data load - Contents (e.g. Hello).

    • What are the purpose of the checksum and packet length?
    • With a 2 byte Packet Length field, what is the maximum packet size?
       
  • Subnet - The communications system that connects hosts. The figure below illustrates how hosts are part of a LAN which has a gateway or router connecting the LAN to a WAN (wide area network). The gateway system would two interfaces, one on the LAN and one on the WAN side.
  • RFC - Request For Comments -  Technical reports defining the standards used on the Internet (HTTP for the Web, SMTP for email, etc.). These are stored online for easy access by developers. Some sites that maintain public access RFC's and a short list of RFC documents are:

  •  
    RFC Repositories
    Location
    ftp://nic.merit.edu/documents/rfc/
    http://www.cis.ohio-state.edu/hypertext/information/rfc.html
    http://www.rfc-editor.org/
RFC Documents
RFC Numbers Topic
788, 821 SMTP (Simple Mail Transport Protocol)
1738 URLs (Uniform Resource Locator) in the WWW
114, 172, 265, 354 FTP (File Transfer Protocol)
  • TCP - Transport Control Protocol used for reliable, end-to-end, connection-oriented communications between Internet hosts.
  • IP - Internet Protocol for delivery of Internet packets, concerned with routing, congestion avoidance, etc.
  • UDP - User Datagram Protocol is the unreliable, connectionless protocol. Best effort delivery, packets may arrive out of order sent or not at all.

1.3 Network Software

1.3.1 Protocol Hierarchies

  • Layers -  Most networks are organized as series of layers (hardware and software) designed to isolate common network functions into a layer that is isolated from others. Layers pass information to an adjacent layer (above or below) through an interface (e.g. function calls, electrical connection). Implementation changes can then occur within a layer without affecting other layers as long as the interface between layers remains unchanged. This is an extremely  important concept in networking, allowing a communications protocol, such as TCP/IP to operate unchanged on top of many physical network hardware layers (Ethernet, wireless, modem, etc.).
    • What are some of the interfaces and layers for a sound system with a CD player?
    • For sending and receiving a real letter?
  • Protocol - Rules and conventions. Defines how communication between common layers on different machines is performed. For a simple example, suppose that two machines are passing email. Each machine must follow the email rules which might be implemented at layer 5 on both machines. The email process at layer 5 on the sending host is able to communicate only following email protocols used by the receiving host layer 5. To implement email, the two hosts communicate following layer 5 email protocol only, but passing and receiving messages through layer 4. Communication between layer 5 occurs virtually through layers 4 and below. The physical medium (wire, fiber, wireless, etc.) is the lowest layer where real communication occurs.
    • At what layer is the sender and receiver of a real letter?
    • What is the layer below?
    • What is the interface between the two layers?
  • Network architecture - The set of layers and protocols.
    • What is the protocol for sending a letter?
  • Protocol stack - Ordered list of protocols used by a system. A system may use SMTP for the email at the application layer, TCP for connection layer, IP for network layer, and Ethernet at the physical layer for communicating over Category 5 wire.
  • Virtual communication - Horizontal at a layer between hosts using protocols (e.g. packet format, character codes, wire type, etc.). The email hosts maintain a virtual communication through the layer 5 protocol while the real communication occurs at layer 1. 
  • Real communication - Vertical between adjacent layers using service interface.
    • What is the difference between the real and virtual communication of sending and receiving a letter?
The figure at right illustrates a typical, five layer network. Virtual communication occurs horizontally between common layers on the hosts, the common layers are peers. From the perspective of each peer, all communication is with the peer on the other host. In fact, the real communication occurs vertically between layers on a single host. The only direct communication can occur at the lowest or physical layer (e.g. over the wire).
In the figure below, protocols virtually communicate horizontally through the real vertical communication layers. A Web client implements the protocol to communicate with a Web server, however the real communication must pass from the client down through interfaces to the underlying layers, across a physical connection that actually carries the bits, then up through the layer interface to the Web server protocol implementation.

A more detailed illustration of the vertical communication is below. As a message at Layer 5 is sent from a host, it moves down the layers. Each layer communicates virtually horizontally with its peer by adding information to the message received from the higher layer, this information is usually termed a header or trailer. For example, the information added by the sending host at layer 3 is used at layer 3 on the receiving host, the headers and trailers implement the virtual communication. On reaching the destination host, the message moves from lower to higher layers. Each peer layer examines and removes the header (or trailer) before passing the message to the next higher layer.

  • In mailing a letter, give an example layer and the extra information needed at that layer to deliver the letter.

1.3.2 Design Issues for the Layers

  1. Addressing - Each layer must be able to identify senders/receivers.
  2. Data transfer
    • Simplex - Data travels in only one direction.
      • Is junk mail an example? CB? Telephone?
    • Half duplex - Data travels in both directions but only one direction at a time.
      • Is junk mail an example? CB? Telephone?
    • Full duplex -  Data travels in both directions at the same time.
      • Is junk mail an example? CB? Telephone?
  3. Error detection - Possible correction or retransmit. Requires additional information such as parity bits.
  4. Sequencing - When channel does not preserve order, receiver must reorder.
  5. Flow control - Preventing fast sender from overwhelming receiver.
    • Printers are example of a slow receiver.
  6. Message size - Cannot accept arbitrarily long message though short messages are inefficient due to protocol overhead.
  7. Multiplexing - Use of same channel for multiple messages simultaneously (e.g. closed caption TV, phone trunks, or simultaneous FTP, SMTP, HTTP over same channel).
  8. Routing - Directing message to correct destination. When multiple paths, possible to use most efficient routes or several simultaneously. 

1.3.3 Interfaces and Services

  • Entities - Implement layer services, either hardware or software. Might be a set of error checking functions or a network interface controller chip. Note that the services implemented at layer n are used by layer n+1 above. Layer n is the service provider and n+1 is the service user (i.e. layer 3 provides services to layer 4).
  • SAP - Service Access Point, wall plugs in the phone system, function calls in a software layer.

1.3.4 Connection-Oriented and Connectionless Services  - Between layers

  • Connection-oriented service -  Think phone system as a model. A connection is first established using the full address, all messages are then sent over the same connection without the need for the original connection addressing information, and messages arrive in the same order sent. When all transmissions are completed by the sender, the connection is broken. Example is TCP client such as email or Web browser, that connects to server, communicates over connection, when finished closes connection. 
  • Connectionless service - Think mail system as a model. As with a letter, each message must be fully addressed since each may travel different routes to the same location and may arrive in a different order sent. Example is UDP (User Datagram Protocol) which uses IP (Internet Protocol) to send packet with source/destination address to receiver, each packet may travel different route, arrive out of order sent, or not at all. 
  • Datagram service - Unreliable connectionless service, that is the message receipt is not acknowledged. Best-effort delivery but datagram may arrive out of order or not at all. UDP is an example.
  • Request-reply service - Sender transmits message, receiver replies. Often used to implement client/server model where client requests and server responds. TCP, a reliable connection-oriented service is implemented with IP datagrams by maintaining ordering on packets and guaranteeing delivery through sequence numbers and acknowledgements. Each datagram request sent requires a receipt acknowledgement reply.
    • Does the post office provide any request-reply service?

1.3.5 Service Primitives

  • Primitives (operations) specify the service available to an entity.
     
Primitive Meaning
Request An entity wants the service to do some work.
Indication An entity is to be informed about an event.
Response An entity wants to respond to an event.
Confirm The response to an earlier request has come back
Consider how, in the following figure,  a connection is negotiated between two systems with A initiating a connection to B.
  1. The connection request is made on system A through the Request primitive and the Connect system B parameter.
  2. The request is delivered to system B, generating an event that a connection request has been made.
  3. System B responds to A with the connection request acceptance.
  4. The response is delivered to A, generating an event on its arrival confirming the connection.

The following figure illustrates how an email application on system A might use the TCP layer services to establish a connection to the email application on system B. Note that layers below TCP are not shown but would be used.
 



Layer n+1
Layer n
 
 
 
Layer n+1
 
Layer n

1.3.6 The Relationship of Services to Protocols

  • Service - Function call to lower layer routine. Example:
send("Hello");                                         Layer n+1 calls function at Layer n
private void send(char packet[]);                Layer n implements function
 
Note that send is implemented at Layer n where implementation is hidden and isolated though interface (function prototype) is visible to layer n+1.
  • Protocol - Rules defining what the service must do but not how. One can freely change a protocol layer as long as the services provided remains the same. For example, one can use either Token Ring or Ethernet at layer n with no change to the n+1 layer above. The n+1 layer would make the same function calls as before since both the Token Ring and Ethernet protocols would implement the same services.
    • What are some well known networking protocols?

Exercise  - Simulate the operation of a four layered communications protocol.
  1. Arrange seat rows of four people numbering each row. The number is the physical location.
  2. Person at head of row is Layer 4, have them pick a funny name as their address. Write their names on the board.
  3. Tell each Layer 2 person their address and physical location (seat row).
  4. Each layer (person) performs two tasks (send and receive) by following the protocol.
Layer 4Application send
  1. Write a clean message on paper
  2. Write destination address on sticky note
  3. Pass to layer 3 via send( message, address)
    • Pass the two papers to person behind you
receive
  1. Call Layer 3 receive(message, address) and wait for results
  2. Read: address sent me message.
  3. Go to 1
Layer 3Transport send( envelop, address )
  1. Fragment message (tear in fragments)
  2. Place each fragment in an envelop
  3. Write fragment number and total number of fragments on envelop
  4. Write destination address on sticky note for each envelop
  5. Pass to layer 2 via send(envelop, address)
    • Pass each envelop and sticky note to person behind you
receive(message, address)
  1. Call Layer 2 receive( envelop, address) and wait for results
  2. Remove fragment from envelop.
  3. Place fragment in correct sequence.
  4. If all fragments received:
    • Write address on sticky note
    • Pass to Layer 4 assembled fragments and address
      • Person in front of you
  5. Go to 1
Layer 2Network send(envelop, address)
  1. Place envelop in an envelop.
  2. If you do not know the physical location of the destination address
    • Locate physical location (seating row) of address on network.
    • Call out "where is address _____"). Remember it
  3. Copy destination address and your source address on envelop
  4. Write destination physical location on sticky note
  5. Pass to layer 1 (person behind you) via send(envelop, physical location)
receive(envelop, address)
  1. Call Layer 1 receive(envelop) and wait for results
  2. Remove envelop from envelop.
  3. Write source address on sticky note
  4. Pass to Layer 3
    • Person in front of you
  5. Go to 1
Layer 1Physical send(envelop, physical location)
  1. Place envelop in an envelop.
  2. Write physical location on new envelop
  3. Pass the envelop to physical location (person at back seat of row)
receive(envelop)
  1. Remove envelop from envelop.
  2. Pass to Layer 2
    • Person in front of you
  • Example - The following is an example of a client and server that uses TCP/IP related services. The client connects (a TCP service) to an echo server to send (a TCP service) and receive (a TCP service) an echo response from the server as in the figure at right. TCP service calls are given below in bold. Note that the reality of TCP service implementation is never as neat as the abstraction, for example, it is not obvious whether the socket creation call  (underlined below) is a TCP or operating system service. One view that helps clarify the distinction is that the TCP services on one host should communicate with another host. The socket function is instead an operating system function that allocates resources on the local host only and does not communicate with another host. The send function is obviously a TCP service since it literally sends data using the TCP connection from the echoclient to the echoserver.
  • Click to download or execute programs on a Windows machine:
    1. echoServer            The echoServer must be executing before the echoClient.
    2. echoClient             Type anything on the client and it will be displayed on the
                                  server and echoed back to the client. Press Ctrl C to terminate.
    In the following examples, the communication between the client and server is implemented by corresponding function calls in each row of the table.
     
    Client/Server Communication
    Client Server
      connect(s,(struct sockaddr*)&sin,sizeof(sin))     accept(s,(struct sockaddr*)&sin,&sinlen ) 
      send(s,buffer,strlen(buffer)+1,0)   recv(h,buffer,sizeof(buffer),0)
      recv(s,buffer,sizeof(buffer),0)   send(h,buffer,strlen(buffer)+1,0)
TCP client - echoclient.cpp
//      echoClient.cpp - Use: echoClient <IP> or <DNS>
//      Visual C++ Project | Settings | Link | Object/Library modules | ws2_32.lib 

#define WIN32_LEAN_AND_MEAN 
#include <winsock2.h> 
#include <iostream.h>

int main(int argc, char* argv[])              
{       char                          buffer[128]; 
        int                             retval; 
        unsigned int                addr=0; 
        struct sockaddr_in        sin; 
        struct hostent             *host; 
        WSADATA                   wsaData; 
        SOCKET                      s; 
 
        WSAStartup(0x202,&wsaData);                                // Startup 
                                                                                                
        host = gethostbyname(argv[1]);                              // Try DNS lookup

        if (!host)                                                               // DNS failed try as IP
                addr = inet_addr(argv[1]);  
        if ((!host)  && (addr == INADDR_NONE) ) {               // DNS and IP failed 
                cout << "Unable to resolve " << argv[1] << '\n'; 
                return -1; 
        }  
        if (host != NULL) {                                                     // Copy server info 
                memcpy(&(sin.sin_addr),host->h_addr,host->h_length); 
                sin.sin_family = host->h_addrtype; 
        }
        else {
                sin.sin_addr.s_addr = addr; 
                sin.sin_family = AF_INET; 
        }
        sin.sin_port = htons(889);
                                                                         
        if ((s = socket(AF_INET, SOCK_STREAM,0)) == INVALID_SOCKET){  // Create socket
                cout << "socket() failed with error " << WSAGetLastError() << '\n'; 
                return -1; 
        }                                                                                // Connect to server port
        if (connect(s,(struct sockaddr*)&sin,sizeof(sin)) == INVALID_SOCKET) { 
                cout << "connect() failed with error " << WSAGetLastError() << '\n'; 
                return -1; 
        } 
        cout << "Opened connection.\n"; flush(cout);
        
        while(cin >> buffer) {                                               // Read behaved user input
                buffer[sizeof(buffer)]='\0';                                 // allows buffer over run
                                                                            
                send(s,buffer,strlen(buffer)+1,0);                  // Send to echo server
                                                                                
                retval=recv(s,buffer,sizeof(buffer),0);             // Receive echo from server
                                                                                
                if(retval < sizeof(buffer)) buffer[retval]='\0';        // 0 terminate buffer
                                                                                               
                cout << "Received " << buffer << "\n";   flush(cout); // print the server
        } 
        closesocket(s);                                                                // Close connection
        cout << "Closed connection.\n"; flush(cout);
        return 0;
}
TCP server - echoserver.cpp
//      echoServer.cpp - Use: echoServer
//      Visual C++ Project | Settings | Link | Object/Library modules | ws2_32.lib 

#define WIN32_LEAN_AND_MEAN 
#include <winsock2.h> 
#include <iostream.h>

int main(void)
{      char                            buffer[128]; 
        int                               retval, sinlen; 
        struct sockaddr_in       sin; 
        WSADATA                    wsaData; 
        SOCKET                       s, h; 

        WSAStartup(0x202,&wsaData); 
        sin.sin_family = AF_INET; 
        sin.sin_addr.s_addr = INADDR_ANY;
        sin.sin_port = htons(889);                           // Port 889
                                                                           // SOCK_STREAM is TCP
        if ((s = socket(AF_INET, SOCK_STREAM,0)) == INVALID_SOCKET){ 
                cout << "socket() failed with error " << WSAGetLastError() << '\n'; 
                return -1; 
        }                                                                  // Bind socket to local port    
        if (bind(s,(struct sockaddr*)&sin,sizeof(sin) ) == SOCKET_ERROR) { 
                cout << "bind() failed with error " << WSAGetLastError() << '\n'; 
                return -1; 
        }                                                                  // Listen for socket connection
        if (listen(s,1)== SOCKET_ERROR) { 
                cout << "listen() failed with error " << WSAGetLastError() << '\n'; 
                return -1; 
        } 
        sinlen = sizeof(sin); 
        
        while(1) {                                                      // Accept incoming connection   
          if ((h=accept(s,(struct sockaddr*)&sin,&sinlen )) == INVALID_SOCKET) { 
                cout << "accept() failed with error " << WSAGetLastError() << '\n'; 
                return -1; 
          } 
          cout << "Opened connection.\n";       flush(cout);
                                                                           // receive while connection open
          while((retval=recv(h,buffer,sizeof(buffer),0)) != SOCKET_ERROR && retval != 0){ 
                if(retval < sizeof(buffer))                      // Make into 0 terminated string
                        buffer[retval]='\0';
                cout << "Received " << buffer << "\n";   flush(cout); 
                                                                            // Echo what was received
                send(h,buffer,strlen(buffer)+1,0);
          } 
          closesocket(h);
          cout << "Closed connection.\n";       flush(cout);
        }
        return 0;
}

1.4 Reference Models

  • A networking architecture reference model describes the organization of the architecture, at what layer are specific services provided, etc.

1.4.1 OSI Reference Model

A standard model that has not been widely implemented but is of value primarily as an example of a well designed model that can be used to understand network organization. It is not an architecture since it does not specify the services and protocols of each layer but rather what each layer should do. Most operational network architectures such as TCP/IP can more or less be represented using a partial model. From bottom to top the OSI model is:
  1. Physical - Mechanical connection, electrical characteristics (voltage, timing,), medium of transmission (wireless, Category 5, fiber). Hosts are physically connected by this layer. Ethernet is an example.
  2. Data Link - Raw bit transmission, assembles data as frames since physical layer handles streams of bits, requires a framing boundary. For example, sending 11111111110010000011111111111101010101011111, a stream of 1's indicate no data, the first 0 is the start of data, followed by 8 data bits, then more 1's for no data, etc. The first 0 acts to frame the 8 data bits of 01000001 (the ASCII code for "A") that follow.
  3. Network - Main job is routing messages from a source to a destination. The IP layer of TCP/IP.
  4. Transport  - Break up and assemble data between network and session layer since session message may be too large for network layer. Implements connections to destination host's transport layer. Handles flow control preventing fast sender from overwhelming receiver. The TCP layer if TCP/IP.
  5. Session - A session consists of all messages passed between two hosts to complete some operation. For example, an email session consists of the sending machine connecting to the receiving machine, passing the mail recipient's address and message, the disconnecting.
  6. Presentation - Data representation or other common standards (use of ASCII, Unicode, etc.).
  7. Application -  User interface to network (email, ftp, Web).
The OSI model is today important primarily as a point of reference from which other protocols are typically discussed.

Data Transmission in the OSI Model - The figure below illustrates how data would flow using the OSI model, where peer communications occurs through headers added to the higher layer message.

1.4.2 TCP/IP Reference Model

  • Used for the Internet, roughly fitting in between applications such as email, Web, etc. and the data link and physical layers.

  • Internet - A connectionless, packet switched network with host connecting via IMPs (Internet Message Processor or routers). In the figure at right the subnet would correspond to the IMPs of the Internet with hosts connected on LANs then through a gateway to the IMP subnet.
     
    5. Application layer - High level protocols for:
    • email - SMTP (Simple Mail Transfer Protocol).
    • file transfer - ftp (file transfer protocol).
    • terminal connection - telnet
    • name service - DNS (Domain Name Service).
    • Web - HTTP (HyperText Transfer Protocol).
    4. Transport layer 
    • TCP (Transport Control Protocol) - Allows source and destination peers to converse using end-to-end TCP (reliable connection-oriented service). TCP used where pipe-like requirements with guaranteed delivery using acknowledgments are needed. Splits large transmitt segments, reassembles before delivery to receiver application.
    • UDP (User Datagram Protocol, unreliable datagram service) between any machine on the network. UDP is send and forget, making only one shot attempt to send message. Splits large transmit datagrams, reassembles before delivery to receiver application.
    3. Network layer
    • IP (Internet Protocol) the internet layer. Provides connectionless service to route packets across network. Defines packet format and protocol. Concerned with routing (requires network addressing scheme) and congestion management (packets arriving faster than router can forward) major issues.
    2. Host-to-Network Interface 
    • Data-link layer. How to organize packets, error handling. On broadcast channel, how to control access to a common channel, addressing other hosts on channel.
    1. Physical 
    • Physical network for transmitting raw bits, concerned with timing, voltage, etc.

Example

Transmit and receive an email message using the following, simplified TCP/IP reference description.
5. Application layer
  • email - SMTP (Simple Mail Transfer Protocol). Adds 1) email sender and 2) recipient address header (e.g. rwisman@ius.edu) to message. Passes to TCP with 1) recipient network address and 2) port parameters (normally send and receive on TCP application port 25). Removes sender and recipient address from message and delivers (e.g. to rwisman).
4. Transport layer 
  • TCP (Transport Control Protocol) - Adds 1) source and 2) destination application port and 3) message ID number header to message. Fragments large message adding 4) fragment number and common message ID number header. Passes to IP 1) destination network address (e.g. ius.edu=149.160.30.25) and 2) protocol (e.g. TCP or UDP) parameters. Removes added port, ID and fragment headers and reassembles fragments before delivery to receiver application port.
3. Network layer
  • IP (Internet Protocol) the internet layer. Adds 1) host destination, 2) source network address and 3) protocol headers (TCP) to message. Passes to interface (we assume only one here) 1) protocol (e.g. IP) parameter. Rejects non-broadcast messages to other IP network address. Removes network address and protocol headers and delivers to protocol (e.g. TCP).
2. Host-to-Network Interface 
  • Data-link layer. Adds 1) source and 2) destination NIC number headers to message. Rejects non-broadcast messages to other NIC number. Passes bits to physical as voltages, light, etc. Removes NIC headers, delivers to to protocol (e.g. IP).
1. Physical 
  • Physical network for transmitting/receiving raw bits, concerned with timing, voltage, etc. Voltages, light, etc. received from/delivered to connected NIC.
  • Network Interface and Hardware layers - Below IP is not defined. Implication is that Token Ring, Ethernet, or even a good quality piece of string could provide the physical connection for network.
  • Example - Two of the most popular Internet protocols are SMTP for email and HTTP for Web applications. Though normally a Web server is accessed by a Web client such as a browser, this example illustrates that the only requirement for a Web client to operate with a Web server is that the client follow the HyperText Transport Protocol (HTTP).

1.5 Example Networks

  • Three networks predominate today, an internet (the Internet) using TCP/IP, and LANs from Novell and Microsoft. The section on the Internet should be read fully, pages 47-56.

1.5.1 Novell Netware

Popular as PC LAN protocol for client-server networking. As the figure at right illustrates, the physical and data link can be one of several, it is not uncommon to have both Ethernet and Token-ring NICs and other protocols in a single host. This will be examined in more detail later.
The network layer is unreliable, connectionless inter-network protocol IPX (Internet Packet eXchange) that passes packets transparently from source to destination, even to different networks.
The transport layer has two protocols, SPX (Sequenced Packet eXchange) is reliable, connection oriented. NCP (Network Core Protocol) is used by the file system.
The packet format used by IPX is important as it is key to routing packets from host to host across several intervening networks. Note in the diagram at right that each packet contains both source and destination addresses. That is typical of connectionless protocols and allows each to take a different route when multiple paths exist. The data portion of the packet generally contains the message from higher layers (SPX, NCP).

The application layer SAP (Service Advertising Protocol) serves to inform clients what servers are available and services offered. These are forwarded across routers to other LANs on the internetwork.

1.5.2, 1.5.3, 1.5.4  ARPANET/NSFNET/Internet

The original design was rumored to be for continued communication in the face of serious network failure, such as in war. Regardless, the design is very robust, having decentralized control and multiple paths between hosts. Remarkably, the design has also proven efficient and adaptable. While not a particularly clean design (i.e. the distinction between the layer and interface is not always clear) it is the most common networking protocol.
One key to the great acceptance of the Internet protocols (defined in RFCs) is its lack of a specification for how the physical and data link layers are to operate. The physical layer can consist of cans and strings as long a an IP packet can be transmitted. It is also public and free, much was developed by poor, underpaid students (for much of the original TCP/IP protocol and later Web development).
A typical (somewhat similar to the IUS and IU network) network consists of LANs joined by a communications subnet through routers and gateways as in the diagram at right. The subnet itself consists of communication lines and IMPs (Interface Message Processors). The job of an IMP is to communicate with other IMPs, passing host packets toward the destination address, and managing the network (detecting network failures and rerouting around them, etc.). The fact that all network traffic is carried in datagrams allows rerouting, in a connection-oriented subnet, a failure could break the connection which would have to be reestablished through a different path.
Visit www.internic.net for information on obtaining your own Internet domain name.

1.6 Example Data Communication Services

The text discusses several common methods of transmitting bits, mostly over public networks. The protocols discussed are only concerned with transmitting bits from point A to point B, not with what the end hosts do with the bits. Frame relay and ATM are popular now or growing in use, ATM is examined in more detail in Chapter 2 so that section should be read carefully.

1.6.3 Frame relay

With reliable digital connections and inexpensive computers, it addresses the need for a simple, bare-bones communications protocol that shifts more of the burden to the end hosts. Essentially a virtual leased line between two points (possibly to join two distant LANs) that can send frames (packets) across the network. The virtual line is in reality shared with other users so the maximum data rate of a burst is the limit of the network but the average rate must be below some predetermined service average. With a physical leased line, the entire line is leased and is always fully available, this is obviously more expensive than the virtual line. The maximum packet size is 1600 bytes with a 10-bit virtual circuit number for addressing (routing). The data rate is about 1.5 Mbps.

1.6.4 Broadband ISDN and ATM

  • Broadband ISDN - ISDN (Integrated Services Digital Network) is designed to provide relatively low-speed (144 kbps) digital services over the current local loop used for analog (voice) between customers and the phone office. Broadband ISDN requires better cabling (Category 5, fiber, etc.) to achieve the much higher data rates (155 Mbps) but is the primary direction for phone companies to implement an all digital system. It has enough bandwidth for data hogs such as HDTV, video on demand, etc. The underlying technology is ATM.
  • ATM - Asynchronous Transfer Mode, is designed to be fast with very low overhead (i.e. more data can be transmitted that is important to the receiver versus addresses which are important to the delivery mechanism). Asynchronous means that there is no master clock anywhere, ATM cells can arrive at anytime (or not at all) without creating confusion for the receiver. An ATM cell is fixed size, always 53 bytes with 5 bytes for control (addresses, etc.) and 48 bytes available for the user's data.
  • The format of an ATM cell is important, consisting of 53 bytes even when on 1 byte of data is transmitted. Fixed size cells make resource allocation simpler, faster, and more predicable, the small size generally creates small waste. The header can be very small compared to IPX or IP because ATM is connection-oriented, the full address is only required when the initial connection is constructed. The header need only carry the number of the connection used.

It should be noted that ATM has not been accepted as quickly as expected and is likely to have stiff competition in the key areas of video and audio transmission from improved TCP/IP. IP Version 4 (IPV4) is slowly being replaced by a more capable IP Version 6, discussed later in the course.


No comments:

Post a Comment