1. 程式人生 > >1-Computer Networks and the Internet

1-Computer Networks and the Internet

  • Each protocol belongs to one of the layers. A layer offers service to the layer above by (1) performing certain actions within that layer and by (2) using the services of the layer directly below it.
  • A protocol layer can be implemented in software, in hardware, or in a combination of the two.
  • Application-layer protocols(such as HTTP and SMTP) and transport-layer protocols are always implemented in software in the end systems.
  • Network layer is often a mixed implementation of hardware and software.
  • Physical layer and data link layers are implemented in hardware(network interface card, for example, Ethernet or WiFi interface cards) since they are responsible for handling communication over a specific link.
  • Layering provides a structured way to discuss system components. Modularity makes it easier to update system components. One drawback of layering is that one layer may duplicate lower-layer functionality. For example, many protocol stacks provide error recovery on both a per-link basis and an end-to-end basis. A second potential drawback is that functionality at one layer may need information that is present only in another layer; this violates the goal of separation of layers.
  • When taken together, the protocols of the various layers are called the protocol stack. The Internet protocol stack consists of five layers: the physical, link, network, transport, and application layers.
    Application Layer
  • The application layer is where network applications and their application-layer protocols reside. The Internet’s application layer includes many protocols, such as the HTTP, SMTP, and FTP. Certain network functions are done with the help of the domain name system (DNS).
  • An application-layer protocol is distributed over multiple end systems, with the application in one end system using the protocol to exchange packets of information with the application in another end system. Packet of information at the application layer is a message.
    Transport Layer
  • The Internet’s transport layer transports application-layer messages between application endpoints.
  • There are two transport protocols, TCP and UDP, either of which can transport application-layer messages.
  • TCP provides a connection-oriented service to its applications. This service includes guaranteed delivery of application-layer messages to the destination and flow control (that is, sender/receiver speed matching). TCP also breaks long messages into shorter segments and provides a congestion-control mechanism, so that a source throttles its transmission rate when the network is congested.
  • The UDP protocol provides a connectionless service to its applications which provides no reliability, no flow control, and no congestion control.
  • We refer to a transport-layer packet as a segment.
    Network Layer
  • The Internet’s network layer is responsible for moving network-layer packets known as datagrams from one host to another. The Internet transport-layer protocol (TCP or UDP) in a source host passes a transport-layer segment and a destination address to the network layer. The network layer then provides the service of delivering the segment to the transport layer in the destination host.
  • The Internet’s network layer includes the IP Protocol, which defines the fields in the datagram as well as how the end systems and routers act on these fields. There is only one IP protocol, and all Internet components that have a network layer must run the IP protocol.
  • The Internet’s network layer also contains routing protocols that determine the routes that datagrams take between sources and destinations. The Internet has many routing protocols. Although the network layer contains both the IP protocol and numerous routing protocols, it is often simply referred to as the IP layer, reflecting the fact that IP is the glue that binds the Internet together.
    Link Layer
  • To move a packet from one node to the next node in the route, the network layer relies on the services of the link layer. At each node, the network layer passes the datagram down to the link layer, which delivers the datagram to the next node along the route. At this next node, the link layer passes the datagram up to the network layer.
  • The services provided by the link layer depend on the specific link-layer protocol that is employed over the link. For example, some link-layer protocols provide reliable delivery, from transmitting node to receiving node. Note that this reliable delivery service is different from the reliable delivery service of TCP, which provides reliable delivery from one end system to another. Examples of link-layer protocols include Ethernet, WiFi, and the cable access network’s DOCSIS protocol.
  • A datagram may be handled by different link-layer protocols at different links along its route, so the network layer will receive a different service from each of the different link-layer protocols. We’ll refer to the link-layer packets as frames.
    Physical Layer
  • Physical layer move the individual bits within the frame from one node to the next. The protocols in this layer are link dependent and further depend on the actual transmission medium of the link. In each case, a bit is moved across the link in a different way.
    The OSI Model
  • The functionality of five of these layers is roughly the same as their similarly named Internet counterparts.
  • The role of the presentation layer is to provide services that allow communicating applications to interpret the meaning of data exchanged. These services include data compression and data encryption and data description.
  • The session layer provides for delimiting and synchronization of data exchange, including the means to build a checkpointing and recovery scheme.