INSTITUTE OF DISTANCE & ONLINE LEARNING MASTER OF COMPUTER APPLICATIONS ADVANCED COMPUTER NETWORKS MCA634 Self Learning Material R101
MASTER OF COMPUTER APPLICATIONS ADVANCED COMPUTER NETWORKS MCA634 Kiran Gurbani
CHANDIGARH UNIVERSITY Institute of Distance and Online Learning Course Development Committee Chairman Prof. (Dr.) R.S. Bawa Vice Chancellor, Chandigarh University, Punjab Advisors Prof. (Dr.) Bharat Bhushan, Director, IGNOU Prof. (Dr.) Manjulika Srivastava, Director, CIQA, IGNOU Programme Coordinators & Editing Team Master of Business Administration (MBA) Bachelor of Business Administration (BBA) Co-ordinator – Prof. Pragya Sharma Co-ordinator – Dr. Rupali Arora Master of Computer Applications (MCA) Bachelor of Computer Applications (BCA) Co-ordinator – Dr. Deepti Rani Sindhu Co-ordinator – Dr. Raju Kumar Master of Commerce (M.Com.) Bachelor of Commerce (B.Com.) Co-ordinator – Dr. Shashi Singhal Co-ordinator – Dr. Minakshi Garg Master of Arts (Psychology) Bachelor of Science (Travel & Tourism Management) Co-ordinator – Ms. Nitya Mahajan Co-ordinator – Dr. Shikha Sharma Master of Arts (English) Bachelor of Arts (General) Co-ordinator – Dr. Ashita Chadha Co-ordinator – Ms. Neeraj Gohlan Master of Arts (Mass Communication and Bachelor of Arts (Mass Communication and Journalism) Journalism) Co-ordinator – Dr. Chanchal Sachdeva Suri Co-ordinator – Dr. Kamaljit Kaur Academic and Administrative Management Prof. (Dr.) Pranveer Singh Satvat Prof. (Dr.) S.S. Sehgal Pro VC (Academic) Registrar Prof. (Dr.) H. Nagaraja Udupa Prof. (Dr.) Shiv Kumar Tripathi Director (IDOL) Executive Director (USB) © No part of this publication should be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording and/or otherwise without the prior written permission of the author and the publisher. SLM SPECIALLY PREPARED FOR CU IDOL STUDENTS Printed and Published by: Himalaya Publishing House Pvt. Ltd., E-mail: [email protected], Website: www.himpub.com For: CHANDIGARH UNIVERSITY Institute of Distance and Online Learning CU IDOL SELF LEARNING MATERIAL (SLM)
Advanced Computer Networks Course Code: MCA634 Credits: 3 Course Objectives: To understand the concepts of data communication and to study the functions of different layers used in communication the data over network. To introduce IEEE standards employed in computer networking. To make the students to get familiarized with different protocols and network components. Syllabus Unit - 1 – IP Addressing and Routing - I: IP Addresses, Network Part and Host Part, Network Masks, Network Addresses and Broadcast Addresses, Address Classes, Loopback Address, IP Routing Concepts, Routing Tables, Stream and Packets. Unit - 2 – IP Addressing and Routing - II: Sliding Window, TCP, TCP Connection, Multiple Conversations, Port Numbers, Multiple Connection from Many hosts and One Host, IPv6: The Next Generation Protocol. Unit - 3 – Domain Network Services (DNS): Domain Names, Authoritative Hosts, Delegating Authority, Resource Records, SOA Records, DNS Protocol, DHCP and Scope Resolution. Unit - 4 – Network Applications: HTTP, E-mail, etc., Hyper Text Transfer Protocol (HTTP). Unit - 5 – HTTP Communications: HTTP Request, Request Headers/Responses, Status Code, Error Status Code E-mail – Sending and Receiving E-mails, E-mail Addressing, Message Structure, MIME: Multipurpose Internet Mail Extensions, SMTP: Simple Mail Transfer Protocol with Examples. CU IDOL SELF LEARNING MATERIAL (SLM)
Unit - 6 – Mail Exchangers: Delivering a message, Mailboxes POP, Post Office Protocol, IMAP – Internet Message Access Protocol, FTP – File Transfer Protocol, Telnet, Remote Communication Protocol, Proxy Server, Proxy Web Servers. Unit - 7 – SNMP: An IP Management Protocol, Network Management Protocols, SNMP: The Simple Network Management, Protocol, Agents and Managers, SNMP Organization, Object Identifiers, Problems with SNMP. Unit - 8 – Wireless Sensor Networks: WSN Functioning, Operation System Support in Sensor Devices, WSN Characteristics, Sensor Network Operations, Sensor Architecture. Unit - 9 – Wireless Mash Networks: WMN Design, Issues in WMNs. Unit - 10 – Computational Grids: Grid Features, Issues in Grid Construction Technology. Unit - 11 – P2P Networks: Characteristics and Addressing, Components of SIP, SIP Session Establishment, SIP Security. Text Books: 1. Michael, A., William, G. and Hancock, M. (2007), Computer Communications and Networking Technologies, Delhi: CENGAGE Learning. 2. Tanenbaum, A.S. (2013), Computer Networks, Delhi: Pearson Education. Reference Books: 1. James, F., Keith, K. and Ross, W. (2012), Computer Networking, Delhi: Pearson Education. 2. Forouzan, B.A. (2003), Data Communications and Networking, New Delhi: McGraw-Hill. CU IDOL SELF LEARNING MATERIAL (SLM)
CONTENTS 1 – 20 21 – 42 Unit 1: IP Addressing and Routing - I 43 – 66 Unit 2: IP Addressing and Routing - II 67 – 81 Unit 3: Domain Network Services (DNS) 82 – 114 Unit 4: Network Applications 115 – 135 Unit 5: HTTP Communications 136 – 153 Unit 6: Mail Exchangers 154 – 164 Unit 7: SNMP (Simple Network Management Protocol) 165 – 174 Unit 8: Wireless Sensor Networks 175 – 183 Unit 9: Wireless Mash Networks 184 – 203 Unit 10: Computational Grids Unit 11: P2P Networks CU IDOL SELF LEARNING MATERIAL (SLM)
UNIT 1 IP ADDRESSING AND ROUTING - I Structure: 1.0 Learning Objectives 1.1 Introduction 1.2 IP Addresses 1.3 Network Part and Host Part 1.4 Network Masks 1.5 Network Addresses and Broadcast Addresses 1.6 Address Classes 1.7 Loopback Address 1.8 IP Routing Concepts 1.9 Routing Tables 1.10 Stream and Packets 1.11 Summary 1.12 Keywords/Abbreviations 1.13 Learning Activity 1.14 Unit End Questions (MCQs and Descriptive) 1.15 References CU IDOL SELF LEARNING MATERIAL (SLM)
2 Advanced Computer Networks 1.0 Learning Objectives After studying this unit, you will be able to: Explain IP addresses. Describe address classes. Elaborate IP routing concepts. Define routing tables, stream and packets. 1.1 Introduction The Internet community originally defined address classes to accommodate different types of addresses and networks of varying sizes. IP address is an address having information about how to reach a specific host, especially outside the LAN. An IP address is a 32 bit unique address having an address space of 232. IP routing is the process of moving data packets between different networks. By default, two different IP networks cannot communicate with each other. They need a mediator device that can switch packet between them. Router takes this responsibility. Routers interfaces are associated with different networks. This association is kept in routing table. Routers use it to take switching decision. A Router is a networking device that forwards data packets between computer networks. This device is usually connected to two or more different networks. When a data packet comes to a router port, the router reads address information in packet to determine out which port the packet will be sent. A packet normally represents the smallest amount of data that can traverse over a network at a single time. A TCP/IP network packet contains several pieces of information, including the data it is carrying, source and destination IP addresses, and other constraints required for quality of service and packet handling. 1.2 IP Addresses Internet Address Classes The Internet community originally defined address classes to accommodate different types of addresses and networks of varying sizes. The class of address defined which bits were used for the network ID and which bits were used for the host ID. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 3 It also defined the possible number of networks and the number of hosts per network. Of five address classes, class A, B, and C addresses were defined for IPv4 unicast addresses. Class D addresses were defined for IPv4 multicast addresses and class E addresses were defined for experimental uses. IP address is an address having information about how to reach a specific host, especially outside the LAN. An IP address is a 32-bit unique address having an address space of 232. Generally, there are two notations in which IP address is written, dotted-decimal notation and hexadecimal notation. Dotted-decimal Notation Hexadecimal Notation IPv4 address in dotted-decimal notation 10101100.00010000.11111110.00000001 01110101 00011101 10010101 11101010 75 95 1D EA 8 bits 0 × 75951DEA 32 bits (4 bytes) Fig. 1.1: Dotted-decimal Notation Fig. 1.2: Hexadecimal Notation 1.3 Network Part and Host Part Each network running TCP/IP must have a unique network number, and every machine on it must have a unique IP address. It is important to understand how IP addresses are constructed before you register your network and obtain its network number. The IP address is a 32-bit number that uniquely identifies a network interface on a machine. An IP address is typically written in decimal digits, formatted as four 8-bit fields separated by periods. Each 8-bit field represents a byte of the IP address. This form of representing the bytes of an IP address is often referred to as the dotted-decimal format. The bytes of the IP address are further 129.144. 50. 56 classified into two parts: the network part and the host part. Figure 1.2(a) shows the network part host part component parts of a typical IP address, 129.144.50.56. Fig. 1.2(a): Parts of an IP Address CU IDOL SELF LEARNING MATERIAL (SLM)
4 Advanced Computer Networks Network Part This part specifies the unique number assigned to your network. It also identifies the class of network assigned. In Figure 1.2(a), the network part takes up two bytes of the IP address. Host Part This is the part of the IP address that you assign to each host. It uniquely identifies this machine on your network. Note that for each host on your network, the network part of the address will be the same, but the host part must be different. Classful Addressing The 32-bit IP address is divided into five sub-classes. These are: Class A Class B Class C Class D Class E Each of these classes has a valid range of IP addresses. Classes D and E are reserved for multicast and experimental purposes respectively. The order of bits in the first octet determine the classes of IP address. IPv4 address is divided into two parts: Network ID Class A NET ID HOST ID Host ID Class B NET ID HOST ID Class C NET ID HOST ID Given an IP address, its class can be determined from the three high-order Class D MULTICAST ADDRESS bits. Figure 1.4 shows the significance in the three high-order bits and the Class E RESERVED range of addresses that fall into each class. For informational purposes, Fig. 1.3: Classes of IP Address with Class D and Class E addresses are also Hostid and Netid shown. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 5 In a Class A address, the first octet is the network portion. So, the Class A example in Figure 1.4 has a major network address of 1.0.0.0.127.255.255.255. Octets 2, 3 and 4 (the next 24 bits) are for the network manager to divide into subnets and hosts as he/she sees fit. Class A addresses are used for networks that have more than 65,536 hosts (actually, up to 16777214 hosts!). In a Class B address, the first two octets are the network portion. So, the Class B example in Figure 1.4 has a major network address of 128.0.0.0.191.255.255.255. Octets 3 and 4 (16 bits) are for local subnets and hosts. Class B addresses are used for networks that have between 256 and 65534 hosts. In a Class C address, the first three octets are the network portion. So, the Class C example in Figure 1.4 has a major network address of 192.0.0.0.233.255.255.255. Octet 4 (8 bits) is for local subnets and hosts – perfect for networks with less than 254 hosts. 0 123 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 Class A 0 24 bits (Node ID) 1.0.0.0.127.255.255.255 Net ID 01 23 0 1 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 Class B 1 0 16 bits (Node ID) 128.0.0.0.191.255.255.255 Net ID 0 1 23 45 6 1 23 45 2 23 45 3 23 45 67 0 7 01 6 7 01 6 7 01 Class C 1 1 0 21 bits 8 bits (Node ID) 192.0.0.0.233.055.255.255 Net ID 01 23 0 1 2 3 4 5 6 7 01 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Class D 1 1 1 0 Multicast bits Group ID (28 bits) 224.0.0.0.239.255.255.255 Multicast 0123 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 Class E 1 1 1 1 0 Reserved for future use (27 bits) 240.0.0.0.254.255.255.255 Experimental Fig. 1.4: Classes of IP Address with Range CU IDOL SELF LEARNING MATERIAL (SLM)
6 Advanced Computer Networks 1.4 Network Masks A netmask is a 32-bit binary mask used to divide an IP address into subnets and specify the network’s available hosts. In a netmask, two of the possible addresses, represented as the final byte, are always pre- assigned and unavailable for custom assignment. For example, in 255.255.225.0, “0” is the assigned network address. In 255.255.255.255, the final “255” is the assigned broadcast address. These two values cannot be used for IP address assignment. Example of a netmask and an example of its binary conversion is as given below. Table 1.1: Netmask Binary Conversion Netmask 255. 255. 255. 255 Binary 11111111 11111111 11111111 11111111 Netmask length 8 16 24 32 Counting out the bits in the binary conversion allows you to determine the netmask length. Above is an example of a 32-bit address. However, this address is a broadcast address and does not allow any hosts (computers or other network devices) to be connected to it. A commonly used netmask is a 24-bit netmask, as seen below. Table 1.2: 24 bit Netmask Binary Conversion Netmask 255. 255. 255. 0 Binary 11111111 11111111 11111111 00000000 Netmask length 8 16 24 – Using a 24-bit netmask, the network would be capable of 2,097,150 networks or 254 different hosts with an IP range of 192.0.1.x to 223.255.254.x, which is usually more than enough addresses for one network. A simple formula can be used to determine the capable amount of networks a netmask can support. 2^(netmask length - # of used segments) - 2 For example, if we used a netmask length of 24, having a netmask of 255.255.255.0 with three used segments, subtract three from the netmask length, e.g., 24 – 3 = 21. With this number CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 7 determined, plug it into the above formula to get 2^21 – 2 = 2,097,150 total number of networks. You are subtracting two from this number because of the broadcast and network addresses that are already being used. Another example is a netmask length of 16, having a netmask of 255.255.0.0 with two used segments. Using the above formula, you would get 2^14 – 2 = 16,382 total number of networks. To determine the number of hosts a netmask is capable of supporting, use the following formula. 2^(# of zeroes) - 2 For example, with a netmask length of 24, as shown in the above chart, there are eight zeroes. Therefore, using the formula above, this would be 2^8 – 2 = 254 total number of hosts. Again, two is subtracted from this number to account for the broadcast and network addresses. Again, another example of a netmask length of 16, there would be 16 zeroes. The formula, in this case, would be 2^16 – 2 = 65,534 total number of hosts. Below is a breakdown of each of the commonly used network classes. Table 1.3: Network Classes of IP Addresses Class Netmask length # of networks # of hosts Netmask Class A 8 126 16,777,214 255.0.0.0 Class B 16 255.255.0.0 Class C 24 16,382 65,534 255.255.255.0 2,097,150 254 1.5 Network Addresses and Broadcast Addresses Understanding Network Classes Second byte Third byte Fourth byte First byte Fig. 1.5: Types of Classes of IP Addresses CU IDOL SELF LEARNING MATERIAL (SLM)
8 Advanced Computer Networks Table 1.4: Classes of IP Addresses with details Class 1st Octet 1st Octet Network/ Default Subnet Number of Hosts per Decimal High-order Host ID Mask Networks Network Range (N=Network, (Usable Bits H=Host) Addresses) A 1 – 126* 0 N.H.H.H 255.0.0.0 126 (27 – 2) 16,777,214 (224 – 2) B 128 – 191 10 N.N.H.H 255.255.0.0 16,382 (214 – 2) 65,534 (216 – 2) C 192 – 223 110 N.N.N.H 254 255.255.255.0 2,097,150 (221 – 2) D 224 – 239 1110 E 240 – 254 1111 (28 – 2) Reserved for Multicasting Experimental; used for research Broadcast Address A broadcast is a multipoint connection in a computer network. A data packet is transmitted from one point to all users of a messaging network in this way. This occurs with the use of the broadcast address. Each network or subnet has a dedicated broadcast address, through which all users of the network can broadcast. In a broadcast address, all the host bits are set to the binary value 1. So, if all host bits are set to the value 0, this is the subnet address. Example: IPv4 address 192.128.64.7/24 192.128.64.7 is the IP address and 24 is the subnet mask. The /24 corresponds to the subnet mask 255.255.255.0. The IP address consists of 4 decimals – called octets – which are separated by points. One octet contains 8 bits, which is why IPv4 is a 32-bit address. Each octet can represent a number between 0 and 255. In this case, the whole of the last octet consists of host bits. Therefore, in this example, the broadcast address would be 192.128.64.255 – so, all host bits at 1. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 9 IP address/ Subnet mask 128 64 32 16 8 4 2 1 . 128 64 32 16 8 4 2 1. 128 64 32 16 8 4 2 1 . 128 64 32 16 8 4 2 1 Decimal number Network IP Network share 1-255 Host Fig. 1.5(a): Broadcast Addresses In the example of the IPv4 address 192.128.64.7/24, the host portion as well as the network portion of an address can be read. This way, you also find out the broadcast address. This can be read from this chart: 192.128.64.1 = first host address 192.128.64.254 = last host address 192.128.64.255 = broadcast address Where can you find the broadcast address? The IP address is a 4-digit series of numbers with values from 0 to 255. A broadcast IP address is only assigned once in each network. It is always the last IP address of the subnet. 1.6 Address Classes IP Address 32 bits w.x.y.z Fig. 1.6: IP Address Format CU IDOL SELF LEARNING MATERIAL (SLM)
10 Advanced Computer Networks Class A Class A network IDs were assigned to networks with a very large number of hosts. The high-order bit in a class A address is always set to zero, which makes the address prefix for all class A networks and addresses 0.0.0.0/1 or 128.0.0.0. The next seven bits (completing the first octet) are used to enumerate class A network IDs. Therefore, address prefixes for class A network IDs have an 8-bit prefix length (/8 or 255.0.0.0). The remaining 24 bits (the last three octets) are used for the host ID. The address prefix 0.0.0.0/0 or 0.0.0.0, 0.0.0.03 is a reserved network ID and 127.0.0.0/8 or 127.0.0.0 or 255.0.0.03 is reserved for loopback addresses. Out of a total of 128 possible class A networks, there are 126 networks and 16,777,214 hosts per network. Class A Network ID Host ID Fig. 1.7: IP Address format with Netid and Host ID Class B Class B network IDs were assigned to medium- to large-sized networks. The two high-order bits in a class B address are always set to 10, which makes the address prefix for all class B networks and addresses 128.0.0.0/2 or 128.0.0.0 or 192.0.0.0. The next 14 bits (completing the first two octets) are used to enumerate class B network IDs. Therefore, address prefixes for class B network IDs have a 16-bit prefix length (/16 or 255.255.0.0). CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 11 The remaining 16 bits (last two octets) are used for the host ID. With 14 bits to express class B network IDs and 16 bits to express host IDs, this allows for 16,384 networks and 65,534 hosts per network. Class B Network ID Host ID Fig. 1.8: Class B with Netid and Host ID Class C This addresses were assigned to small networks. The three high-order bits in a class C address are always set to 110, which makes the address prefix for all class C networks and addresses 192.0.0.0/3 or 192.0.0.0 or 224.0.0.0. The next 21 bits (completing the first three octets) are used to enumerate class C network IDs. Therefore, address prefixes for class C network IDs have a 24-bit prefix length (/24 or 255.255.255.0). The remaining 8 bits (the last octet) are used for the host ID. With 21 bits to express class C network IDs and 8 bits to express host IDs, this allows for 2,097,152 networks and 254 hosts per network. Class C Network ID Host ID Fig. 1.9: Class C with Netid and Host ID CU IDOL SELF LEARNING MATERIAL (SLM)
12 Advanced Computer Networks Class D Class D addresses are reserved for IPv4 multicast addresses. The four high-order bits in a class D address are always set to 1110, which makes the address prefix for all class D addresses 224.0.0.0/4 or 224.0.0.0. Class E Class E addresses are reserved for experimental use. The high-order bits in a class E address are set to 1111, which makes the address prefix for all class E addresses 240.0.0.0/4 or 240.0.0.0. 1.7 Loopback Address Special IPv4 Addresses 1. 0.0.0.0 Known as the unspecified IPv4 address, it is used to indicate the absence of an address. The unspecified address is used only as a source address when the IPv4 node is not configured with an IPv4 address configuration and is attempting to obtain an address through a configuration protocol such as Dynamic Host Configuration Protocol (DHCP). 2. 127.0.0.1 Known as the IPv4 loopback address, it is assigned to an internal loopback interface, enabling a node to send packets to itself. 1.8 IP Routing Concepts Routing protocol shares routing update that contains network information. Routers keep this information in routing tables. Routing tables are used to determine the best path for packet. Routing protocols uses several concepts to determine the best path. IP Routing IP routing is the process of moving data packets between different networks. By default, two different IP networks cannot communicate with each other. They need a mediator device that can switch packet between them. Router takes this responsibility. Router interfaces are associated with different networks. This association is kept in routing table. Routers use it to take switching decision. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 13 Static Routing When routers learn from an administrator, it is called static routing. In static routing, we have to add all network locations manually. If any change occurs in network, administrator is responsible to update it by hand in all routers. Advantages of Static Routing It is easy to implement. It is most secure way of routing, since no information is shared with other routers. It puts no overhead on resources such as CPU or memory. Disadvantages of Static Routing It is suitable only for small network. If a link fails, static route cannot reroute the traffic. Dynamic Routing When routers learn from neighboring router through the routing protocols, it is called dynamic routing. In dynamic routing, routers add network locations automatically from the routing information. If any change occurs in network, affected routers update others via routing information. Advantages of Dynamic Routing It is suitable for all type of networks. Automatically build routing tables. Reroute the traffic from possible network, in link failure condition. Disadvantages of Dynamic Routing It is hard to implement. It is less secure, since it shares routing updates with other routers. It puts additional overhead on resources such as CPU, memory and link bandwidth. Depending on network requirement, we can use either static routing or dynamic routing. Even more, we can use a combination of both dynamic and static routing. Routing Updates Routing update is a mechanism of sharing information with neighboring routers. In a particular time duration, router advertise its routing information through broadcast or multicast. CU IDOL SELF LEARNING MATERIAL (SLM)
14 Advanced Computer Networks Different protocols have different time intervals. Some protocols use broadcast for routing updates while some use multicast. Routing updates contain all necessary information for routing protocol such as learned network, timers, AS, AD, matrix values, interface details, etc. 1.9 Routing Tables Routing Tables in Computer Network Routers: A Router is a networking device that forwards data packets between computer network. This device is usually connected to two or more different networks. When a data packet comes to a router port, the router reads address information in packet to determine out which port the packet will be sent. For example, a router provides you with the internet access by connecting your LAN with the Internet. Fig. 1.10: Router When a packet arrives at a Router, it examines destination IP address of a received packet and make routing decisions accordingly. Routers use Routing Tables to determine out which interface the packet will be sent. A routing table lists all networks for which routes are known. Each router’s routing table is unique and stored in the RAM of the device. Routing Table A table is maintained by the internal router called as Routing table. It helps the internal router to decide on which interface the data packet should be forwarded A routing table is a set of rules, often viewed in table format, that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed. All IP-enabled devices, including routers and switches, use routing tables. Routing table consists of the following three fields: 1. IP Address of the destination subnet 2. Subnet mask of the subnet Interface See below a Routing Table: CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 15 Destination Subnet mask Interface 128.75.43.0 255.255.255.0 Eth0 128.75.43.0 255.255.255.128 Eth1 192.12.17.5 255.255.255.255 Eth3 default Eth2 The entry corresponding to the default gateway configuration is a network destination of 0.0.0.0 with a network mask (netmask) of 0.0.0.0. The Subnet Mask of default route is always 255.255.255.255. Entries of an IP Routing Table A routing table contains the information necessary to forward a packet along the best path toward its destination. Each packet contains information about its origin and destination. Routing Table provides the device with instructions for sending the packet to the next hop on its route across the network. Each entry in the routing table consists of the following entries: Network ID: The network ID or destination corresponding to the route. Subnet Mask: The mask that is used to match a destination IP address to the network ID. Next Hop: The IP address to which the packet is forwarded. Outgoing Interface: Outgoing interface the packet should go out to reach the destination network. Metric: A common use of the metric is to indicate the minimum number of hops (routers crossed) to the network ID. Routing table entries can be used to store the following types of routes: Directly Attached Network IDs Remote Network IDs Host Routes CU IDOL SELF LEARNING MATERIAL (SLM)
16 Advanced Computer Networks Default Route Destination 1.10 Stream and Packets What Packet Mean? In computer networks, a packet is a container or box that carries data over a TCP/IP network and internetworks. A packet is the most fundamental logical arbitration of data that is passed over a network. A packet normally represents the smallest amount of data that can traverse over a network at a single time. A TCP/IP network packet contains several pieces of information, including the data it is carrying, source and destination IP addresses, and other constraints required for quality of service and packet handling. Role of Packets and Streams 1. A packet isn’t information or data itself; as the name suggest, it contains or encloses the actual information that is traveling to another computer. But its value is in more than bundling data into a message; packets also have the ability to do the following: Addressing Error correction Using multiple pathways to send the data Organizing the data according to its data type, such as a frame, segment or block Of course, the packet that matters the most for us is an Internet packet: when you send a request for information from a website, for instance. 2. First, your computer creates a packet, organized in a very specific way that the receiving computer can understand and use. This entire packet or “stream of data” is broken down to a specific number of “bytes” (eight bits of zeros or ones), which are individual packets that are part of the big data packet. Each packet holds about 1,000 to 1,500 bytes. 3. The packet has a “header”; to the packet, your computer adds the IP address of the computer that your data is supposed to get to, and puts your IP address on it to. 4. Your computer adds two identifying numbers to each of the smaller packets. The first number represents the number of packets that all of the information is divided into. The CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 17 second number represents the number of each individual packet among the total sequence of packets. 5. Your computer’s internal networking hardware and software follow guidelines for bundling the data that you are sending out...the “payload.” Those guidelines are spelled out in the Transmission Control Protocol/Internet Protocol (TCP/IP). 6. Each packet also has a trailer or footer, which contains a few electronic bits that tell the receiving computer when it reached the end of the packet sequence. It also might include the results of a Cyclic Redundancy Check (CRC). The CRC contains the sum of all the “1s” in the packet, added up by your computer. The receiving also does the same math, and if the math doesn’t add up, it may ask your computer to retransmit the packet. 7. Your computer sends each packet onto the Internet separately, and each packet takes the best route available at the time when it can go. Why does it happen this way? So that the network can spread data traffic evenly, and all your data won’t get stuck or slowed down in one spot. (Keep in mind, a traffic jam might only last a fraction of a second.) Streams – Data Streams The cast term here signifies some data (stream of packets) is being transmitted to the recipient(s) from client(s) side over the communication channel that help them to communicate. 1. Unicast: This type of information transfer is useful when there is a participation of single sender and single recipient. So, in short, you can term it as a one-to-one transmission. 2. Broadcast: Broadcasting transfer (one-to-all) techniques can be classified into two types: Limited Broadcasting: Suppose you have to send stream of packets to all the devices over the network that you reside, this broadcasting comes handy. Direct Broadcasting: This is useful when a device in one network wants to transfer packet stream to all the devices over the other network. 3. Multicast: In multicasting, one/more senders and one/more recipients participate in data transfer traffic. In this method, traffic recline between the boundaries of unicast (one-to- one) and broadcast (one-to-all). 1.11 Summary The IP addresses are used to identify systems on a TCP/IP network. The IP address is an absolute identifier of both the individual machine and the network on which it resides. CU IDOL SELF LEARNING MATERIAL (SLM)
18 Advanced Computer Networks Every IP datagram packet transmitted over a TCP/IP network contains the IP addresses of the source system that generated it and the destination system for which it is intended in its IP header. To send a packet across an internet, the sender places the destination’s protocol address in the packet and passes the packet to protocol software for delivery. To provide uniform addressing in an internet, protocol software defines an abstract addressing scheme that assigns each host a unique protocol address. Users, application programs and higher layers of protocol software use the abstract protocol addresses to communicate. IP addressing is specified by the Internet Protocol (IP). The IP standard specifies that each host is assigned a unique 32-bit number known as the host ’ s Internet Protocol address, which is often abbreviated IP address, or Internet address. Each packet sent across an internet contains the 32-bit IP address of the sender (source) as well as the intended recipient (destination). Thus, to transmit information across a TCP/IP internet, a computer must know the IP address of the remote computer to which the information is being sent. IPv4 and IPV6 both can be configured either manually or through DHCP. It does not require manual configuration or DHCP. It uses host address (A) resource records in the Domain Name System (DNS) to map host names to IPv4 addresses. 1.12 Keywords/Abbreviations Subnet Mask: A number that defines a range of IP addresses available within a network. IP (Internet Protocol): The fundamental protocol for communications on the Internet. Static Routing: The process in which the system network administrator would manually configure network routers with all the information necessary for successful packet forwarding. Dynamic Routing: A process where a router can forward data via a different route or given destination based on the current conditions of the communication circuits within a system. Router: A networking device that forwards data packets between computer network. Routing Table: A set of rules, often viewed in table format, that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed. Packet: The smallest amount of data that can traverse over a network at a single time. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - I 19 Abbreviations IP: Internet Protocol IPv4: Internet Protocol version 4 TCP/IP: Transmission Control Protocol/Internet Protocol 1.13 Learning Activity 1. How many bits Version 4 of IP address has? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 2. What is the format of IP address? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 3. What is Virtual Routing and Forwarding (VRF)? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 4. What is the difference between Static Routing and Dynamic Routing? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 1.14 Unit End Questions (MCQs and Descriptive) A. Descriptive Type Questions 1. Explain IP addresses and classes of IP Address. 2. Explain Network Part and Host Part of IP Address. 3. Explain Network Mask and Subnet Mask. 4. Explain Network addresses and Broadcast addresses. 5. Explain Classes of Addresses. 6. Explain Loopback address in detail. 7. Explain IP routing concepts. CU IDOL SELF LEARNING MATERIAL (SLM)
20 Advanced Computer Networks 8. Explain different Routing Tables. 9. Explain Packets and Streams. B. Multiple Choice/Objective Type Questions 1. First address in a block is used as network address that represents the __________. (a) Class Network (b) Entity (c) Organization (d) Codes 2. Network addresses are a very important concept of __________. (a) Routing (b) IP Addressing (c) Mask (d) Classless Addressing 3. In IPv4 Addresses, classful addressing is replaced with __________. (a) Classless Addressing (b) Classful Addressing (c) Classful Advertising (d) Classless Advertising 4. Several techniques can make size of routing table manageable and also handle issues such as __________. (a) Maturity (b) Error reporting (c) Tunneling (d) Security 5. RPF stands for__________. (b) Reverse Path Failure (a) Reverse Path Forwarding (c) Reverse Packet Forwarding (d) Reverse Protocol Failure Answers 1. (c), 2. (b), 3. (a), 4. (d), 5. (a) 1.15 References 1. https://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf 2. https://resources.saylor.org/wwwresources/archived/site/wp-content/uploads/2012/02/ Computer-Networking-Principles-Bonaventure-1-30-31-OTC1.pdf 3. Computer Network (Third Edition) by Andrew S. Tanenbaum. 4. Computer Network Top-down Approach by James F. Kurose and Keith W. Ross. CU IDOL SELF LEARNING MATERIAL (SLM)
UNIT 2 IP ADDRESSING AND ROUTING - II Structure: 2.0 Learning Objectives 2.1 Introduction 2.2 Sliding Window 2.3 Transmission Control Protocol (TCP) 2.3.1 TCP Header Format 2.4 TCP Connection Establishment 2.4.1 TCP Connection Termination 2.5 Multiple Conversations 2.5.1 Maximum Segment Size (MSS) 2.5.1 Acknowledgement Number 2.6 Port Numbers 2.7 Multiple Connection from Many Hosts and One Host 2.8 IPv6: The Next Generation Protocol 2.8.1 IPv6 Addressing 2.8.2 IPv6 Protocol 2.8.3 ICMPv6 Protocol 2.9 Summary 2.10 Keywords/Abbreviations CU IDOL SELF LEARNING MATERIAL (SLM)
22 Advanced Computer Networks 2.11 Learning Activity 2.12 Unit End Questions (MCQs and Descriptive) 2.13 References 2.0 Learning Objectives After studying this unit, you will be able to: Describe sliding window Define TCP connection Explain Multiple Connection from many hosts and one host Elaborate IPv6 2.1 Introduction An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer, etc.) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. IP addresses are 32-bit integers which are represented in the familiar dot-based notation. The dot-based notation is nothing but a decimal representation for each byte of the IP address. The internet, as the name suggests, is a network of networks. Thus, to uniquely identify a host on the internet, one needs to know the network’s ID and the host’s ID in the network. Thus, IP address consist of two components, the network ID and the host ID. The network ID is the number assigned to a network in the internet. Host ID represents the ID assigned to a host in the network. Two versions of the Internet Protocol (IP) are in use: IP version 4 and IP version 6. Each version defines an IP address differently. Because of its prevalence, the generic term IP address typically still refers to the addresses defined by IPv4. The gap in version sequence between IPv4 and IPv6 resulted from the assignment of number 5 to the experimental Internet Stream Protocol in 1979, which however was never referred to as IPv5. IP addresses are classified into several classes of operational characteristics: unicast, multicast, anycast and broadcast addressing. The most common concept of an IP address CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 23 is in unicast addressing, available in both IPv4 and IPv6. A multicast address is associated with a group of interested receivers. In IPv4, addresses 224.0.0.0 through 239.255.255.255 (the former Class D addresses) are designated as multicast addresses. 2.2 Sliding Window TCP Sliding Window technology is able to control the data flow between two hosts by dynamically changing window size. Every TCP/IP host supports full-duplex data transmission. So, there are two Sliding Windows in TCP: one is used for receiving and the other is used for sending. What’s more, TCP uses positive acknowledgement technology whose acknowledgement number refers to next expected bytes. To modify the The sender is windows size too fast! Fig. 2.1: Sliding Window As shown above, it is an example of single direction sending, which introduces how Sliding Window achieves flow control. The server sends to client 4 1022-byte segments, and the window size of sender is 4096 bytes. Receiver will acknowledge by using ACK4097, and modify window size to 2048 bytes. This means client (receiver) only has 2048-byte buffer space. Therefore, sender changes its sending speed and sends 2048-byte segment which the receiver can afford. Sliding window mechanism provides reliable flow control method for data transmission between end-to-end devices. However, it is only on source and destination devices that Sliding Window mechanism will take effect. When there is congestion between interim devices (like routers), Sliding Window has no use. Thus, ICMP source quench mechanism could be used in congestion management. CU IDOL SELF LEARNING MATERIAL (SLM)
24 Advanced Computer Networks 2.3 Transmission Control Protocol (TCP) The Transmission Control Protocol (TCP) is one of the most important protocols of Internet Protocols suite. It is most widely used protocol for data transmission in communication network such as internet. TCP provides reliable and connection-oriented service for applications. The reliability of TCP is guaranteed through the following aspects: Connection-oriented transport: In TCP, before any end of the link begins to transfer data, the connection between two parties of the link must be established. MMS: In TCP, it indicates the maximum length of the data packet could be sent to another end of the link. After the connection is established, the two parties of the connection should advise its own MMS to use the bandwidth resources more efficiently. Transmission acknowledgement mechanism: In TCP, after a segment is transmitted, a timer would be started, and waiting for the acknowledgement from the receiver; if the acknowledgement cannot be received within the timer, the segment will be retransmitted. Header and data checksum: TCP will maintain the checksum of header and data, which is the end-to-end check. Its purpose is to detect the variation of the data during the transmission procedure. If there is some error in the segment checksum, this segment will be discarded by TCP receiver and the acknowledgement will not be replied. Hence, the TCP retransmission mechanism will be started. Flow control: Both ends of the TCP connection have a buffer with fixed space. Only the amount of data less than the size of receiver’s buffer could be sent by the sender. This mechanism prevents such a situation happening in which the buffer is overloaded because of the speed difference of two hosts. 2.3.1 TCP Header Format TCP uses IP as the network layer protocol, and TCP segment is encapsulated into the IP packet. TCP segment is made up of two parts, TCP Header and TCP Data. If there is no option field, the length is 20 bytes. TCP header includes the fields shown in the slide. There are some explanations of some fields: 16-bit source port number: TCP will allocate a source port number for the source application. 16-bit destination port number: The port number of destination application. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 25 Source and Destination Port: Every TCP segment includes the source and destination port number, used to find the sending and receiving application. Using these two numbers, together with the source and destination IP address of IP header, a unique TCP connection could be confirmed. Sequence Number is a 32-bit number that identifies where the encapsulated data fits within a data stream from the sender. TCP Header Format TCP data segment IP Head TCP Head TCP Data 0 15 16 31 16-bit source port 16-bit destination port 32-bit sequence number 20 32-bit acknowledge number bytes Header Reserved 16-bit windows size length 16-bit checksum 16-bit urgent pointer options data Fig. 2.2: TCP Header Format Acknowledgment Number is a 32-bit field that identifies the sequence number the source next expects to receive from the destination. The Acknowledgement Number is the last data sequence number plus one. 4-bit header length: It indicates the header is of 32 bits. Window Size is a 16-bit field used for flow control. It indicates the number of bytes that are expected to be received. Because this field is of 16 bits, the maximum window size is 65535 bytes. Checksum is 16 bits, covering both the header and the encapsulated data, allowing error detection. 2.4 TCP Connection Establishment TCP provides full-duplex transmission protocol which is reliable and connection-oriented. The reliability of TCP is guaranteed by some methods. One of them is to establish the connection CU IDOL SELF LEARNING MATERIAL (SLM)
26 Advanced Computer Networks before sending any data. The TCP connection is established through three-way handshakes procedure: TCP Connection Establishment Client Server Fig. 2.3: TCP Connection Establishment 1. Request end (or Client) sends a SYN field, indicating the client’s expectation to connect to the port of server, with Initial Sequence Number (ISN) “a”. 2. The Server replied SYN with sequence number “b”. At the same time, the acknowledgement number is set to be “a+1” to acknowledge the SYN packet of the client. 3. The Client will sent the acknowledgement packet with acknowledgement number set to be “b+1” to acknowledge the SYN packet of the server. The TCP connection is then established. 2.4.1 TCP Connection Termination As it is mentioned before, TCP is a full-duplex transport layer protocol. Full-duplex indicates the two ends of the connection could transmit or receive data at the same time. Thus, the two parties should terminate the connection individually. The TCP connection is established through three-way handshakes procedure, while the TCP connection is terminated through four-way handshakes procedure: CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 27 TCP Connection Termination Client Server Fig. 2.4: TCP Connection Termination 1. Request end (or Client) sends a FIN field, indicating the client’s expectation to terminate the connection, with initial sequence number “a”. 2. The Server set the acknowledgement number to be “a+1” to acknowledge the FIN packet of the Client. 3. The Server replied sends FIN field with sequence number “b”, acknowledgement number “a+1”. 4. The client will send the acknowledgement packet with acknowledgement number set to be “b+1”. The TCP connection is then terminated. 2.5 Multiple Conversations 2.5.1 Maximum Segment Size (MSS) MSS (Maximum Segment Size) indicates the maximum size of the segment that could be sent to the other end of the connection. When a connection is established, their two ends should advertise its own MSS. The default value of MSS is 536 bytes, so the allowable length of IP packet is 576 bytes (536 + 20-byte IP header + 20-byte TCP header). Through the negotiation of MSS, the network resources could be used more efficiently and the network performance could be improved. 2.5.2 Acknowledgement Number The reliability of TCP is guaranteed by the acknowledgement mechanism to ensure the correct data transmission from the source equipment to the destination. CU IDOL SELF LEARNING MATERIAL (SLM)
28 Advanced Computer Networks The working mechanism of acknowledgement mechanism is as follows: When the destination equipment receives the data packets sent by the source equipment, it will reply an acknowledgement to the sender; and if the sender receives the acknowledgement, it will continue to send data packets. However, if the sender does not receive the acknowledgement, after a period of time, (a timer will be started by the sender when the data is sent), the sender will decrease the transmission speed, and retransmit the packets in question. As the figure shows, a virtual end-to-end link is established between the source and destination equipment, and data packets are sent. Transmission virtual circuit Source destination Host Host Send 1,2,3 Acknowledge 4 Send 4,5,6 Acknowledge 4 Send 4,5,6 Fig. 2.5: Transmission Virtual Circuit The source equipment sends 3 data packets (1, 2, 3) to the destination at one time. After the destination equipment receives the data packets, it will acknowledge them by the sequence number of fourth data packet which is 4. When the source equipment receives the data packets, it will continue to send another three data packets (4, 5, 6) as the example shows, because the destination equipment has not received the fourth data packet correctly. The destination equipment still uses acknowledgement number 4 as the reply. Hence, the fourth data packet will be retransmitted by the source equipment. After the destination equipment receives the fourth data packet, and acknowledges it by the acknowledgement number 7, the next three data packets could be sent continuously. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 29 2.6 Port Numbers A port number is a way to identify a specific process to which an Internet or other network message is to be forwarded when it arrives at a server. For the Transmission Control Protocol and the User Datagram Protocol, a port number is a 16-bit integer that is put in the header appended to a message unit. In computer networking, port numbers are part of the addressing information used to identify the senders and receivers of messages. They are associated with TCP/IP network connections and might be described as an add-on to the IP address. Port numbers allow different applications on the same computer to share network resources simultaneously. Home network routers and computer software work with these ports and sometimes support configuring port number settings. TCP/IP Ports and Sockets Explained On a TCP/IP network, every device must have an IP address. The IP address identifies the device, e.g., computer. However, an IP address alone is not sufficient for running network applications, as a computer can run multiple applications and/or services. Just as the IP address identifies the computer, the network port identifies the application or service running on the computer. The use of ports allows computers/devices to run multiple services/applications. The diagram below shows a computer-to-computer connection and identifies the IP addresses and ports. Port 5000 Port 80 Web server Port 25 Port 25 email server IP Address + Port number = Socket Fig. 2.6: TCP/IP Ports and Sockets CU IDOL SELF LEARNING MATERIAL (SLM)
30 Advanced Computer Networks Port Number Ranges and Well-known Ports A port number uses 16 bits and so can therefore have a value from 0 to 65535 decimal. Port numbers are divided into ranges as follows: Port numbers 0-1023 – Well-known Ports: These are allocated to server services by the Internet Assigned Numbers Authority (IANA), e.g., Web servers normally use port 80 and SMTP servers use port 25 (see diagram above). Ports 1024-49151 – Registered Port -These can be registered for services with the IANA and should be treated as semi-reserved. User-written programs should not use these ports. Ports 49152-65535: These are used by client programs and you are free to use these in client programs. When a Web browser connects to a web server, the browser will allocate itself a port in this range. These are also known as ephemeral ports. 2.7 Multiple Connection from Many Hosts and One Host A multi-homed host is a host (a firewall in this case) that has more than one network interface, with each interface connected to logically and physically separate network segments. A dual-homed host (host with two interfaces) is the most common instance of a multi-homed host. A dual-homed firewall is a firewall with two network interfaces cards (NICs), with each interface connected to a different network. For instance, one network interface is typically connected to the external or untrusted network, whereas the other interface is connected to the internal or trusted network. In this configuration, a key security tenet does not allow traffic coming in from the untrusted network to be directly routed to the trusted network, and the firewall must always act as an intermediary. Hosts that have more than one network interface usually have one Internet Protocol (IP) address for each interface. Such hosts are called multi-homed hosts. EGO identifies hosts by their official host name. So, it needs to match each of the network addresses of multi-homed hosts with a single host name. To do this, the host name information must be configured so that all of the Internet addresses for a host resolve to the same name. Multiple Network Interfaces Some system manufacturers recommend that each network interface, and therefore, each Internet address, be assigned a different host name. Each interface can then be directly accessed CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 31 by name. This setup is often used to make sure that NFS requests go to the nearest network interface on the file server, rather than going through a router to some other interface. Configuring this way can confuse EGO because there is no way to determine that the two different names (or addresses) mean the same host. All host naming systems can be configured so that host address lookups always return the same name, while still allowing access to network interfaces by different names. Each host has an official name and a number of aliases, which are other names for the same host. By configuring all interfaces with the same official name but different aliases, you can refer to each interface by a different alias name while still providing a single official name for the host. IP Connectivity Some or all hosts have multiple network interfaces that connect to physically segmented networks. You may not want EGO to use the first IP address according to DNS to initiate a connection. IP Preference A host has multiple network interfaces that connect to physically connected networks, but for routing or performance reasons, you might want to assign network interface preferences to different activities. For example, communication between a client and management hosts could use one network interface, and communication between compute and management hosts could use another network interface. While it might be physically possible for a socket client to use the first IP address of a socket server according to DNS to initiate a connection, this might not be desirable. Host Name Lookup A common DNS server might return a different IP address in host name lookups depending on which subnet that host is on (different BIND or DNS views). For example, host named hostA might resolve to 192.168.0.1 on one subnet and 10.0.0.1 on another subnet on the same network. Filtering a Preferred IP Address from Multiple IP Addresses Use EGO_PREFERRED_IP_MASK in ego.conf to specify the preferred IP address for multiple network interfaces. If more than one IP address matches the IP mask, the first matching IP address is used as the preferred IP address. If no addresses match the mask, the order of the address list is not changed. CU IDOL SELF LEARNING MATERIAL (SLM)
32 Advanced Computer Networks Under some circumstances (when you have multiple aliases), you also need to specify the unique official name and list the aliases. 2.8 IPv6: The Next Generation IP Protocol The current IP network is in a process of transition from IPv4 to IPv6. Mobile access networks are one of the major potential application areas for IPv6. ● This is mainly due to the large address space of IPv6. Besides, a large percentile of packets in such networks will carry real-time traffic such as voice or video. These applications are expected to be important for IPv6, as they may depend heavily on the QoS mechanism in IPv6 networks. Nevertheless 3GPP is considering using IPv4 addresses initially instead of IPv6 addresses. From the signalling point of view, the IPv6 protocol has many features related to QoS and other capabilities. By utilizing IPv6 features, such as ease of defining explicit route, flow labelling capability and improved support for extensions and options like hop-by-hop option header or destination option header, it is possible to improve the efficiency of IPv6 networks without modifying the existing signalling protocols. IPv6 offers improvement such as: Expansion capacity for addressing and routing: The IP address space is expanded from 32 bits to 128 bits, enabling a greatly increased number of address combinations, levels of hierarchical address organization and auto-configuration of addresses. Simplified header format: The IPv6 basic header is only 40 bytes long inspite of the greatly increased address allocation. Enhanced options support: Several different, separate “extension headers” are defined, which enable flexible support for options without all of the header structure having to be interpreted and manipulated at every router point along the way. Quality of service: The Flow Label and the Priority fields in the IPv6 header are used by a host to identify packets that need special handling by IPv6 routers, such as non-default quality of service or “real-time” service. This capability is important in that it needs to support applications that require some degree of consistent throughput, delay and jitter. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 33 Auto-configuration: Adds the concept of dynamic assignment of part of the address space, based on geographic and topographic features of a given physical connection. Elimination of the need for NATs (network address translators): Since the IP address space supports approximately 3.4 × 1038 possible combinations, the need for private addressing schemes behind NATs is unnecessary on grounds of address conservation; Improved security with mandatory IPsec implementation: IPv6 provides for integral support for authentication, privacy and data integrity measures, by requiring all implementations to support these features; Mobility: Mobile computers are assigned with at least two IPv6 addresses whenever they are roaming away from their home network: one (the home address) is permanent and the other (the IPv6 link-local address) is used temporarily. In addition, the mobile node will typically auto-configure a globally routable address at each new. 2.8.1 IPv6 Addressing An IPv6 address is made of 128 bits divided into eight 16-bits blocks. Each block is then converted into 4-digit hexadecimal numbers separated by colon symbols. IPv6 addresses are denoted by eight groups of hexadecimal quartets separated by colons in between them. Following is an example of a valid IPv6 address: 2001:cdba:0000:0000:0000:0000:3257:9652 Any four-digit group of zeroes within an IPv6 address may be reduced to a single zero or altogether omitted. Therefore, the following IPv6 addresses are similar and equally valid: 2001:cdba:0000:0000:0000:0000:3257:9652 2001:cdba:0:0:0:0:3257:9652 2001:cdba::3257:9652 Network Notation in IPv6 The IPv6 networks are denoted by Classless Inter Domain Routing (CIDR) notation. A network or subnet using the IPv6 protocol is denoted as a contiguous group of IPv6 addresses whose size must be a power of two. The initial bits of an IPv6 address (these are identical for all hosts in a network) form the networks prefix. The size of bits in a network prefix are separated with a /. CU IDOL SELF LEARNING MATERIAL (SLM)
34 Advanced Computer Networks For example, 2001:cdba:9abc:5678::/64 denotes the network address 2001:cdba:9abc: 5678. This network comprises of addresses rearranging from 2001:cdba:9abc:5678:: up to 2001:cdba:9abc:5678:ffff:ffff:ffff:ffff. In a similar fashion, a single host may be denoted as a network with a 128-bit prefix. In this way, IPv6 allows a network to comprise of a single host and above. Special Addresses in IPv6 ::/96 The zero prefix denotes addresses that are compatible with the previously used IPv4 protocol. ::/128 An IPv6 address with all zeroes in it is referred to as an unspecified address and is used for addressing purposes within a software. ::1/128 This is called the loopback address and is used to refer to the local host. An application sending a packet to this address will get the packet back after it is looped back by the IPv6 stack. The local host address in the IPv4 was 127.0.0.1. 2001:db8::/32 This is a documentation prefix allowed in the IPv6. All the examples of IPv6 addresses should ideally use this prefix to indicate that it is an example. fec0::/10 This is a site-local prefix offered by IPv6. This address prefix signifies that the address is valid only within the local organization. Subsequently, the usage of this prefix has been discouraged by the RFC. fc00::/7 This is called the Unique Local Address (ULA). These addresses are routed only within a set of cooperating sites. These were introduced in the IPv6 to replace the site-local addresses. These addresses also provide a 40-bit pseudorandom number that reduces the risk of address conflicts. ff00::/8 This prefix is offered by IPv6 to denote the multicast addresses. Any address carrying this prefix is automatically understood to be a multicast address. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 35 fe80::/10 This is a link-local prefix offered by IPv6. This address prefix signifies that the address is valid only in the local physical link. IPv6 addresses are broadly classified into three categories: 1. Unicast addresses A Unicast address acts as an identifier for a single interface. An IPv6 packet sent to a Unicast address is delivered to the interface identified by that address. 2. Multicast addresses A Multicast address acts as an identifier for a group/set of interfaces that may belong to the different nodes. An IPv6 packet delivered to a Multicast address is delivered to the multiple interfaces. 3. Anycast addresses Anycast addresses act as identifiers for a set of interfaces that may belong to the different nodes. An IPv6 packet destined for an Anycast address is delivered to one of the interfaces identified by the address. 2.8.2 IPv6 Protocol The IPv6 protocol component that is installed in Windows operating systems is a series of interconnected protocols that include Internet Control Message Protocol version 6 (ICMPv6), Multicast Listener Discovery (MLD) and Neighbor Discovery. These core protocols replace the Internet layer protocols in the Defense Advanced Research Projects Agency (DARPA) model. All protocols above the Internet layer rely on the basic services that IPv6 provides. Protocols at the Host-to-Host Transport and Application layers are largely unchanged, except when addresses are part of the payload or part of the data structures that the protocol maintains. For example, both Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) must be updated to perform new checksum calculations that include IPv6 addresses. CU IDOL SELF LEARNING MATERIAL (SLM)
36 Advanced Computer Networks TCP must be updated to store IPv6 addresses in its internal Transmission Control Block (TCB). Routing Information Protocol (RIP) must be updated to send and receive IPv6 route prefixes. IPv6 Packet Extension Header Upper Layer Protocol IP Header We may divide IPv6 datagram packet header as three parts. 1. IPv6 Datagram Packet Header 2. Extension Header 3. Upper Layer Protocol Data. IPv6 datagram packet also has extension headers of varying lengths. If extension headers are present in IPv6 datagram packet, a Next Header field in the IPv6 header points the first extension header. Each extension header contains another Next Header field, pointing the next extension header. The last IPv6 datagram packet extension header points the upper layer protocol header (Transmission Control Protocol (TCP), User Datagram Protocol (UDP) or Internet Control Message Protocol (ICMPv6)). IPv6 Header Format Flow label Hop limit Next header Version Traffic class Source address Payload length Destination address Version: The size of the Version field is 4 bits. The Version field shows the version of IP and is set to 6. Traffic Class: The size of Traffic Class field is 8 bits. The Traffic Class field is similar to the IPv4 Type of Service (ToS) field. This field indicates the IPv6 packet’ s class or priority. Flow Label: The size of Flow Label field is 20 bits. The Flow Label field provides additional support for real-time datagram delivery and quality of service features. The CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 37 purpose of Flow Label field is to indicate that this packet belongs to a specific sequence of packets between a source and destination and can be used to prioritized delivery of packets for services like voice. Payload Length: The size of the Payload Length field is 16 bits. The Payload Length field shows the length of the IPv6 payload, including the extension headers and the upper layer protocol data. Next Header: The size of the Next Header field is 8 bits. The Next Header field shows either the type of the first extension (if any extension header is available) or the protocol in the upper layer such as TCP, UDP, or ICMPv6. Hop Limit: The size of the Hop Limit field is 8 bits The Hop Limit field shows the maximum number of routers the IPv6 packet can travel. This field is similar to IPv4 Time to Live (TTL) field. This field is typically used by distance vector routing protocols, like Routing Information Protocol (RIP) to prevent layer 3 loops (routing loops). Source Address: The size of the Source Address field is 128 bits. The Source Address field shows the IPv6 address of the source of the packet. Destination Address: The size of the Destination Address field is 128 bits. The Destination Address field shows the IPv6 address of the destination of the packet. 2.8.3 ICMPv6 Protocol The Internet Control Message Protocol Version 6 (ICMPv6) is a new version of the ICM protocol that forms an integral part of the Internet Protocol version 6 (IPv6) architecture. ICMPv6 messages are transported within an IPv6 packet that may include IPv6 extension headers. ICMPv6 offers a comprehensive solution by offering the different functions earlier subdivided among the different protocols such as ICMP, ARP (Address Resolution Protocol) and IGMP (Internet Group Membership Protocol version 3). ICMPv6 further simplifies the communication process by eliminating obsolete messages. ICMPv6 is a multipurpose protocol and is used for a variety of activities including error reporting in packet processing, diagnostic activities, Neighbor Discovery process and IPv6 multicast membership reporting. To perform these activities, ICMPv6 messages are subdivided into two classes: error messages and information messages. CU IDOL SELF LEARNING MATERIAL (SLM)
38 Advanced Computer Networks 1. Error Messages The Internet Control Message Protocol version 6 (ICMPv6) Error messages belong to four different categories: Destination Unreachable, Time Exceeded, Packet Too Big and Parameter Problems. 2. Information Messages The Internet Control Message Protocol version 6 (ICMPv6) Information messages are subdivided into three groups: Diagnostic messages, Neighbor Discovery messages and messages for the management of multicast groups. Packets Format ICMPv6 TYPE ICMPv6 CODE CHECKSUM ICMPv6 DATA ICMPv6 packets have the format shown in the above figure. The 8-bit Type field indicates the type of the message. If the high-order bit has value zero (values in the range from 0 to 127), it indicates an error message; if the high-order bit has value 1 (values in the range from 128 to 255), it indicates an information message. The 8-bit Code field content depends on the message type. The Checksum field helps in the detection of errors in the ICMP message and in part of the IPv6 message. ICMPv6 Message Types ICMPv6 is a multipurpose protocol as it is used for a plethora of activities such as reporting errors encountered in processing data packets, reporting multicast memberships, performing Neighbor Discovery and performing diagnostics. An ICMP message is identified by a value of 58 in the Next Header field of the IPv6 header or of the preceding Header. ICMPv6 Advantages If a wrong IP address is used for configuring a client to the DNS server, an ICMP message is sent by the destination device to indicate the error. CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 39 If a program does not allow fragmentation of its communications but it is required to communicate with a destination device, the router undertaking the fragmentation of the packet sends an ICMP message to the source device to indicate the error. If a client sends all communications to a particular router despite another router offering a best route, the particular router responds with the IP address of the router that provides a better route in the form of an ICMP message. All IP headers contain a Time to Live (TTL) value. This value is decremented as the IP packet is forwarded through each router. If a packet arrives at a router with a Time To Live (TTL) value of 1, the router cannot decrement the value any further and forward it. Instead, the router discards the packet and sends an ICMP message to indicate the expiry of the packet’s TTL value. The Internet Control Message Protocol version 6 (ICMPv6) also provides testing and diagnostics services for many utilities. In order to test the communication process, an ICMP echo is used by the Internet Protocol Packet Internet Gopher (PING) utility. In order to discover the routers on a path, the Trace Route utility uses ICMP echo requests with different TTL values. For example, the Trace Route utility creates and sends an ICMP echo packet with a TTL value of 1. Since the router cannot set the TTL value to 0 and forward the packet, it sends an ICMP message indicating that the destination device is unreachable. This way, the Trace Route utility gets to know the IP address of the first router. The utility then increments the TTL and repeats the process. The second router in the route responds in the same manner and is added to the list of known routers. This process continues until the packet reaches the destination device and it sends an echo reply after receiving the packet. 2.9 Summary TCP Sliding Window technology is able to control the data flow between two hosts by dynamically changing window size. Every TCP/IP host supports full-duplex data transmission. So, there are two Sliding Windows in TCP: one is used for receiving and the other is used for sending. What’s more, TCP uses positive acknowledgement technology whose acknowledgement number refers to next expected bytes. The Transmission Control Protocol (TCP) is one of the most important protocols of Internet Protocols suite. TCP provides full-duplex transmission protocol which is reliable and connection-oriented. The reliability of TCP is guaranteed by some methods. One of them is to establish the connection before sending any data. The TCP connection is established through three-way handshakes procedure. CU IDOL SELF LEARNING MATERIAL (SLM)
40 Advanced Computer Networks MSS (Maximum Segment Size) indicates the maximum size of the segment that could be sent to the other end of the connection. On a TCP/IP network, every device must have an IP address. Port numbers are divided into ranges as Port numbers 0-1023 – Well-known ports, Ports 1024-49151 – Registered Port and Ports 49152-65535 – Ephemeral Ports. Registered Port and Ports 49152-65535 – Ephemeral Ports.are used by client programs. A multi-homed host is a host (a firewall in this case) that has more than one network interface, with each interface connected to logically and physically separate network segments. A dual-homed host (host with two interfaces) is the most common instance of a multi-homed host. The current IP network is in a process of transition from IPv4 to IPv6. Mobile access networks are one of the major potential application areas for IPv6. This is mainly due to the large address space of IPv6. Besides, a large percentile of packets in such networks will carry real-time traffic such as voice or video. 2.10 Keywords/Abbreviations IP Address: An Internet Protocol address (IP address) is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. IPv4: An address consists of 32 bits which limits the address space to 4294967296 (232) possible unique addresses. Unicast Address: An address that is associated with a single device or host, but a device or host may have more than one unicast address. MSS (Maximum Segment Size): The maximum size of the segment could be sent to the other end of the connection. ICMPv6: Internet Control Message Protocol version 6 (ICMPv6) is a new version of the ICM protocol that forms an integral part of the Internet Protocol version 6 (IPv6) architecture. Abbreviations IP Address: An Internet Protocol Address IPv6: Internet Protocol version 6 TCP: Transmission Control Protocol CU IDOL SELF LEARNING MATERIAL (SLM)
IP Addressing and Routing - II 41 MSS: Maximum Segment Size ICMPv6: Internet Control Message Protocol version 6 2.11 Learning Activity 1. Explain difference between TCP and IP. ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 2. Explain difference between IPv4 addressing mode and IPv6 addressing mode. ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 2.12 Unit End Questions (MCQs and Descriptive) A. Descriptive Type Questions 1. What do you understand by three-way handshaking in TCP connection establishment? Explain. 2. Explain TCP connection termination procedure with proper example. 3. Explain Sliding Window concept in TCP. 4. Explain TCP Header format with neat diagram. 5. Explain four-way connection of TCP. 6. Explain three-way termination of TCP Termination. 7. Explain different Port Numbers used for TCP Connection. 8. Explain multiple network interface. 9. Explain different next generation protocols. 10. Explain IPv6 Addressing in detail. 11. Explain IPv6 Protocol. 12. Explain ICMPV6 Protocol. CU IDOL SELF LEARNING MATERIAL (SLM)
42 Advanced Computer Networks B. Multiple Choice/Objective Type Questions 1. TCP/IP host supports __________ data transmission. (a) Full-duplex (b) Half duplex (c) Simplex (d) None of above 2. __________ is connection-oriented protocol. (a) IP (b) TCP (c) Both IP and TCP (d) None of above 3. __________ is reliable protocol. (a) IP (b) Both (c) TC (d) None of above 4. __________ protocol supports Classless Addressing. (a) Both IPv4 and IPv6 (b) IPv4 (c) None of all (d) IPv6 5. Anycast Addressing is supported by __________ protocol. (a) IPv6 (b) IPv4 (c) Both IPv4 and IPv6 (d) None of above Answers 1. (a), 2. (b), 3. (c), 4. (d), 5. (a) 2.13 References 1. https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13788- 3.html 2. https://www.eventhelix.com/RealtimeMantra/Networking/ip_routing.htm 3. https://book.cakephp.org/2/en/development/routing.html CU IDOL SELF LEARNING MATERIAL (SLM)
UNIT 3 DOMAIN NETWORK SERVICES (DNS) Structure: 3.0 Learning Objectives 3.1 Introduction 3.2 Domain Name System (DNS) 3.3 Domain Names 3.4 The Internet Domain Name Server Hierarchy 3.5 Working of DNS 3.6 Authoritative Hosts 3.7 Delegating Authority 3.8 DNS Resource Records 3.9 SOA Records 3.10 DNS Protocol 3.11 DHCP and Scope Resolution 3.12 Summary 3.13 Keywords/Abbreviations 3.14 Learning Activity 3.15 Unit End Questions (MCQs and Descriptive) 3.16 References CU IDOL SELF LEARNING MATERIAL (SLM)
44 Advanced Computer Networks 3.0 Learning Objectives After studying this unit, you will be able to: Define domain names Describe DNS protocol Explain DHCP and scope resolution 3.1 Introduction DNS (Domain Name System) is often a very difficult part of learning how to configure websites and servers. Understanding how DNS works will help you diagnose problems with configuring access to your websites and will allow you to broaden your understanding of what’s going on behind the scenes. An application layer protocol defines how the application processes running on different systems, pass the messages to each other. DNS is a TCP/IP protocol used on different platforms. It is a host name to IP address translation service. It is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers. 3.2 Domain Name System (DNS) DNS stands for Domain Name System. It is a directory service that provides a mapping between the name of a host on the network and its numerical address. DNS is required for the functioning of the internet. Each node in a tree has a domain name, and a full domain name is a sequence of symbols specified by dots. It is a service that translates the domain name into IP addresses. This allows the users of networks to utilize user-friendly names when looking for other hosts instead of remembering the IP addresses. An application layer protocol defines how the application processes running on different systems, pass the messages to each other. DNS is a TCP/IP protocol used on different platforms. It is a host name to IP address translation service. It is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers. Every host is identified by the IP address but remembering numbers is very difficult for the people and also the IP addresses are not static. Therefore, a mapping is required to change the CU IDOL SELF LEARNING MATERIAL (SLM)
Search
Read the Text Version
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210