The Internet 9.1 Introduction The Internet is a global network that supports a variety of interpersonal and interactive multimedia applications. Associated with each access network - ISP network, intranet, enterprise network, site/campus LAN, and so on - is a gateway and the global internetwork consists of an interconnected set of regional, national, and international, networks all of which are interconnected together using high bit rate leased lines and routing gateways (routers). Internet operates in a packet-switched mode. Any end system that communicates directly over the Internet does so using the TCP/IP protocol stack. Various access networks have different operational parameters associated with them in terms of their bit rate, frame format, maximum frame size, and types of addresses that are used. In order to make a packet travel through networks having different operational parameters, routing should be performed at the network layer. CYH/MMT/Int/p.1 CYH/MMT/Int/p.2
In the TCP/IP protocol stack the network layer protocol is the Internet protocol (IP). The IP in each end has a unique Internet-wide address known as IP address assigned to it. The IP provides a connectionless best-effort service to the transport layer above it which is either the transmission control protocol (TCP) or the user datagram protocol (UDP). CYH/MMT/Int/p.3 How it works: When either TCP or UDP has a block of information to transfer, it simply passes the block to its local IP together with the IP addresses of the intended recipient. IP adds the destination and source IP addresses to the head of the block, together with an indication of the source protocol (TCP or UDP) to form an IP datagram which is also referred to as a packet. Each access gateway is attached to an internetwork router and, at regular intervals, the IP in these routers exchange routing information. A routing table is built up in each router then. On receipt of a packet, the router reads the destination netid from the packet header and uses its contents of its routing table to forward the packet to the destination internetwork router and, from there, to the destination access gateway. The destination gateway reads the hostid part of the destination IP address and forwards the packet to the destination host. The IP in the host then strips off the header from the packet and passes the block of information (payload) to the peer transport layer protocol indicated in the packet header. CYH/MMT/Int/p.4
If the size of a packet is too large to fit in the destination network, fragmentation will be done by the IP in the corresponding gateway and reassembly will be done in the destination IP. In order to perform the various functions, the IP uses a number of what are known as adjunct protocols. The address resolution protocol (ARP) and reverse ARP (RARP) To determine the physical (MCS) address of a host or gateway given its address (ARP) and, in the case of the RARP, the reverse function. The open shortest path first (OSPF) protocol is used to build up the contents of a routing table. The Internet control message protocol (ICMP) Used by the IP in a host or gateway to exchange error and other control messages with the IP in another host or gateway. The Internet group management protocol (IGMP): Used with multicasting to enable a host to send a copy of a datagram to the other hosts that are part of the same multicast group. Currently, the most widely used version of the IP is version 4 (IPv4) and it is expected to be replaced by version 6 (IPv6) in a longer time span. CYH/MMT/Int/p.5 CYH/MMT/Int/p.6
9.2 IP datagrams The IP is a connectionless protocol and all user information is transferred in the payload part of what is known as a datagram. The total length field defines the total length of the initial datagram including the header and payload parts, which is used in the destination to reassemble the payload. The identification field is used for the destination host to identify which received packet fragments belong to the same original datagram. D-bit indicates the datagram should not be fragmented on the way. M-bit indicates the fragment is the last fragment in the datagram or not. The fragment offset indicates, in multiples of 8 bytes, the position of the first byte of the fragment contained within a smaller packet in relation to the original packet payload. The version field contains the version of the IP used to create the datagram. The intermediate header length field specifies the actual length of the header in multiples of 32-bit words. (5~15) The type of service field specifies the relative priority of the application data and the preferred attributes (e.g. delay) associated with the path to be followed. The time-to-live field defines the maximum time for which a packet can be in transit across the Internet. Normally its value is a hop count and is decremented by one by each gateway/router visited. The packet will be discarded if the value become zero. The protocol field is used to enable the destination IP to pass the payload within each received packet to the same protocol that sent the data. CYH/MMT/Int/p.7 CYH/MMT/Int/p.8
The header checksum is used to detect if there is any error in the header. The source address and destination address are the Internetwide IP addresses of the source and destination host respectively. The options field is used in selected datagrams to carrying additional information relating to security, source routing, loose source routing, route recording, stream identification and time stamp. Security: for authentication & decryption. source routing: specify actual path. loose source routing: specify preferred path. route recording: record the path stream identification: identify the stream to which the packets belong time stamp: record the time used 9.3 Fragmentation and reassembly The maximum frame size of an access network is known as maximum transmission unit (MTU). If the size of a packet is greater than MTU, the IP in the corresponding gateway will divide its block of information into a number of smaller blocks each known as a fragment. All fragments of user data (except the last one) must be in multiples of 8 bytes. Each segment is forwarded in a separate packet. The destination IP reassembles the fragments. Example: Assume Identification assigned by the source IP = 20 Header of each datagram : 20 bytes MTU of the token ring LAN = 4000 bytes MTU of the Ethernet LAN = 1500 bytes The value in the identification field is the same in all fragments and used by the destination IP to relate each fragment to the same original block of information. CYH/MMT/Int/p.9 CYH/MMT/Int/p.10
9.4 IP address The IP in each end has a unique Internet-wide address known as IP address assigned to it. Each IP address has two parts: a network identifier (netid) and a host identifier (hostid). The allocation of netids is currently managed by the Internet Network Information Center (InterNIC). Addresses of different classes are intended for use with networks that have a different number of attached hosts. Special arrangement: Address Special meaning hostid of all 0s Network of the specified netid netid of all 0s Same source network Address of all 1s Boardcast over the source network hostid of all 1s Boardcast over the destination network Class A address Reserved for test purposes with a netid of all 1s The fragment offset indicates, in multiples of 8 bytes, the position of the user data in each fragment relative to the start of the initial datagram. CYH/MMT/Int/p.11 CYH/MMT/Int/p.12
The concept of subnets was introduced to decouple routing associated with a single site from the overall routing function in the global internetwork. 9.9 The PPP link layer protocol A link layer protocol is required to transfer the IP packets/datagrams over the different types of leased line. Many of the access networks provided by ISPs require a link layer protocol to transfer the information entered by a person at home to the ISP network gateway. In general, the information is transferred over a switched connection through a PSTN using modems and character-oriented asynchronous transmission is usually used. CYH/MMT/Int/p.13 CYH/MMT/Int/p.14
A standard link layer protocol known as the point-topoint protocol (PPP) is defined in RFC 1661/2 and 3 to avoid the proliferation of many different protocols. The PPP is based on the HDLC protocol. The default maximum size of the information field is 1500 bytes. The FCS field is used to detect the presence of transmission errors in the frame. The address field is useless as the PPP is intended for use over point-to-point lines. The control field is used for error and flow control. The default value of the control field is 03, which indicates the frame is an unnumbered information (UI) frame. The protocol ID field is used to indicate the type of packet and hence the type of network layer protocol that is present in the information field. CYH/MMT/Int/p.15 CYH/MMT/Int/p.16