TCP/IP is designed to transmit data across packet switched networks. A packet is a
block of data that carries along with it the addressing information necessary to deliver
data to their destination. A packet switched network uses the addressing information to
switch the packet from network to network as it moves towards its destination.
The terms datagram and packet are often used interchangeably. Within this document the terms are used with specific and distinct meanings: a packet is any block of data with addressing information; a datagram is a packet format defined by IP. An IP datagram has a header that is made up of five or six 32-bit words, followed by data. The header includes two length fields, one that specifies the length of the header and one that specifies the entire length of the packet. The destination address in an IP datagram is in word five of the header. It is a 32-bit address that identifies the destination network and the specific interface address of a host on that network. If the destination address is on the local network, then the datagram is delivered directly to the destination. If the destination is not on the local network then the datagram is passed to a gateway on the local network for delivery. The complete destination address is 32 bits in length, and is usually written as four 8-bit (byte) values separated by periods. Each byte value can range from 0 to 255. This is often called either dotted-decimal or dotted-quad format. Examples of destination addresses would include; 127.0.0.1, 192.168.10.1, and 205.217.146.198. |