A protocol is a set of rules that determines how computers communicate with each other across networks. Computers communicate with one another by exchanging data messages. To accept and act on these messages, computers must have definitions of how a message is interpreted. Examples of messages include those establishing a connection to a remote machine, e-mail messages, and files transferred over a network.
A protocol describes the following:
- The format that a message must conform to
- The way in which computers must exchange a message within the context of a particular activity
A routed protocol allows the router to forward data between nodes on different networks. In order for a protocol to be routable, it must provide the ability to assign a network number and a host number to each individual device. Some protocols, such as IPX, require only a network number because these protocols use the host's MAC address for the host number. Other protocols, such as IP, require a complete address consisting of a network portion and a host portion. These protocols also require a network mask in order to differentiate the two numbers. The network address is obtained by ANDing the address with the network mask.
The reason that a network mask is used is to allow groups of sequential IP addresses to be treated as a single unit. If this grouping were not allowed, each host would have to be mapped individually for routing. According to the Internet Software Consortium, this would not be possible with the 162,128,000 hosts that are currently on the Internet.
IP as a routed protocol
The Internet Protocol (IP) is the most widely used implementation of a hierarchical network-addressing scheme. IP is a connectionless, unreliable, best-effort delivery protocol. The term connectionless means that no dedicated circuit connection is established prior to transmission as there is when placing a telephone call. IP determines the most efficient route for data based on the routing protocol. The terms unreliable and best-effort do not imply that the system is unreliable and does not work well, but that IP does not verify that the data reached its destination. This function is handled by the upper layer protocols. As information flows down the layers of the OSI model, the data is processed at each layer. At the network layer, the data is encapsulated into packets, also known as datagrams. IP determines the contents of the IP packet header, which includes addressing and other control information, but is not concerned with the actual data. IP accepts whatever data is passed down to it from the upper layers. |
Packet propagation and switching within a router
As a packet travels through an internetwork to its final destination, the Layer 2 frame headers and trailers are removed and replaced at every Layer 3 device. This is because Layer 2 data units, frames, are for local addressing. Layer 3 data units, packets, are for end-to-end addressing. Layer 2 Ethernet frames are designed to operate within a broadcast domain using the MAC address that is burned into the physical device. Other Layer 2 frame types include Point-to-Point Protocol (PPP) serial links and Frame Relay connections, which use different Layer 2 addressing schemes. Regardless of the type of Layer 2 addressing used, frames are designed to operate within a Layer 2 broadcast domain, as the data crosses a Layer 3 device the Layer 2 information changes. As a frame is received at a router interface, the destination MAC address is extracted. The address is checked to see if the frame is directly addressed to the router interface, or if it is a broadcast. In either of these two cases, the frame is accepted. Otherwise, the frame is discarded since it is destined for another device on the collision domain. The accepted frame has the Cyclic Redundancy Check (CRC) information extracted from the frame trailer, and calculated to verify that the frame data is without error. If the check fails, the frame is discarded. If the check is valid, the frame header and trailer are removed and the packet is passed up to Layer 3. The packet is then checked to see if it is actually destined for the router, or if it is to be routed to another device in the internetwork. If the destination IP address matches one of the router ports, the Layer 3 header is removed and the data is passed up to the Layer 4. If the packet is to be routed, the destination IP address will be compared to the routing table. If a match is found or there is a default route, the packet will be sent to the interface specified in the matched routing table statement. When the packet is switched to the outgoing interface, a new CRC value is added as a frame trailer, and the proper frame header is added to the packet. The frame is then transmitted to the next broadcast domain on its trip to the final destination |
Two types of delivery services are connectionless and connection-oriented. These two services provide the actual end-to-end delivery of data in an internetwork.
Most network services use a connectionless delivery system. Different packets may take different paths to get through the network, but are reassembled after arriving at the destination. In a connectionless system, the destination is not contacted before a packet is sent. A good comparison for a connectionless system is a postal system. The recipient is not contacted to see if they will accept the letter before it is sent. Also, the sender never knows whether the letter arrived at the destination.
In connection-oriented systems, a connection is established between the sender and the recipient before any data is transferred. An example of a connection-oriented network is the telephone system. The caller places the call, a connection is established, and then communication occurs.
Connectionless network processes are often referred to as packet switched processes. As the packets pass from source to destination, packets can switch to different paths, and possibly arrive out of order. Devices make the path determination for each packet based on a variety of criteria. Some of the criteria, such as available bandwidth, may differ from packet to packet.
Connection-oriented network processes are often referred to as circuit switched processes. A connection with the recipient is first established, and then data transfer begins. All packets travel sequentially across the same physical or virtual circuit.
The Internet is a gigantic, connectionless network in which all packet deliveries are handled by IP. TCP adds Layer 4, connection-oriented reliability services to IPAnatomy of an IP packet
IP packets consist of the data from upper layers plus an IP header. The IP header consists of the following:
- Version – Indicates the version of IP currently used; four bits. If the version field is different than the IP version of the receiving device, that device will reject the packets.
- IP header length (HLEN) – Indicates the datagram header length in 32-bit words. This is the total length of all header information, accounting for the two variable-length header fields.
- Type-of-service (TOS) – Specifies the level of importance that has been assigned by a particular upper-layer protocol, eight bits.
- Total length – Specifies the length of the entire packet in bytes, including data and header, 16 bits. To get the length of the data payload subtract the HLEN from the total length.
- Identification – Contains an integer that identifies the current datagram, 16 bits. This is the sequence number.
- Flags – A three-bit field in which the two low-order bits control fragmentation. One bit specifies whether the packet can be fragmented, and the other specifies whether the packet is the last fragment in a series of fragmented packets.
- Fragment offset – Used to help piece together datagram fragments, 13 bits. This field allows the previous field to end on a 16-bit boundary.
- Time-to-live (TTL) – A field that specifies the number of hops a packet may travel. This number is decreased by one as the packet travels through a router. When the counter reaches zero the packet is discarded. This prevents packets from looping endlessly.
- Protocol – indicates which upper-layer protocol, such as TCP or UDP, receives incoming packets after IP processing has been completed, eight bits.
- Header checksum – helps ensure IP header integrity, 16 bits.
- Source address – specifies the sending node IP address, 32 bits.
- Destination address – specifies the receiving node IP address, 32 bits.
- Options – allows IP to support various options, such as security, variable length.
- Padding – extra zeros are added to this field to ensure that the IP header is always a multiple of 32 bits.
- Data – contains upper-layer information, variable length up to 64 Kb.
While the IP source and destination addresses are important, the other header fields have made IP very flexible. The header fields are the information that is provided to the upper layer protocols defining the data in the packet.
Cisco Systems, Inc.
0 comments:
Post a Comment