7IPv4 datagram format (IPV4 Header) Version: IP Version4 for IPv46 for IPv6HLen: Header Length32-bit words (typically 5)TOS: Type of ServicePriority informationIdentifier, flags, fragment offset used primarily for fragmentationTime to liveMust be decremented at each routerPackets with TTL=0 are thrown awayEnsure packets exit the networkProtocolDemultiplexing to higher layer protocolsTCP = 6, ICMP = 1, UDP = 17…Header checksumEnsures some degree of header integrityRelatively weak – only 16 bitsOptionsE.g. Source routing, record route, etc.Performance issues at routersPoorly supported or not at allSource Address32-bit IP address of senderDestination Address32-bit IP address of destination
16Example 1Change the following IP addresses from binary notation to dotted-decimal notation.a b c dSolution We replace each group of 8 bits with its equivalent decimal number and add dots for separation:a b c d
17Example 2Change the following IP addresses from dotted-decimal notation to binary notation.a b c dSolutionWe replace each decimal number with its binary equivalent:a b c d
20ExampleFind the class of each address:a b c dSolution a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first bit is 0; the second bit is 1. This is a class B address. d. The first 4 bits are 1s. This is a class E address..
22Example Find the class of each address: a b c d eSolution a. The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 193 (between 192 and 223); the class is C. c. The first byte is 14 (between 0 and 127); the class is A. d. The first byte is 252 (between 240 and 255); the class is E. e. The first byte is 134 (between 128 and 191); the class is B.
24ExampleGiven the network address , find the class, the block, and the range of the addresses.Solution The class is A because the first byte is between 0 and 127.The block has a netid of 17.The addresses range from to
25ExampleGiven the network address , find the class, the block, and the range of the addresses.Solution The class is B because the first byte is between 128 and 191.The block has a netid ofThe addresses range from to
26Solution The class is C because the first byte is between 192 and 223. ExampleGiven the network address , find the class, the block, and the range of the addresses.Solution The class is C because the first byte is between 192 and 223.The block has a netid ofThe addresses range from to
29Note:The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero.TCP/IP Protocol Suite
30Solution The default mask is 255.0.0.0, ExampleGiven the address , find the beginning address (network address).Solution The default mask is ,which means that only the first byte is preservedand the other 3 bytes are set to 0s.The network address isTCP/IP Protocol Suite
31Solution The default mask is 255.255.0.0, ExampleGiven the address , find the beginning address (network address).Solution The default mask is ,which means that the first 2 bytes are preservedand the other 2 bytes are set to 0s.The network address isTCP/IP Protocol Suite
32ExampleGiven the address , find the beginning address (network address).Solution The default mask is , which means that the first 3 bytes are preserved and the last byte is set to 0. The network address isTCP/IP Protocol Suite
34IPv4 Addressing- Subnetting The problems associated with classful addressing is that the network addresses available for assignment to organizations are close to depletion.This is coupled with the ever-increasing demand for addresses from organizations that want connection to the Internet.In this section we briefly discuss two solutions: subnetting and supernetting.TCP/IP Protocol Suite
35IP addresses are designed with two levels of hierarchy. Note:IP addresses are designed with two levels of hierarchy.TCP/IP Protocol Suite
36A network with two levels of hierarchy (not subnetted) TCP/IP Protocol Suite
37Addresses in a network with and without subnetting TCP/IP Protocol Suite
38Default mask and subnet mask TCP/IP Protocol Suite
39Comparison of a default mask and a subnet mask TCP/IP Protocol Suite
45Chapter 3: ROAD MAP ICMPV4 and ICMPV6 Basics of IPV4 IPV6 in details(Motivation,features,Address Representation ,Unicast and /Multicast Addresses, Header format)ARPRARPMobile IPDistance Vector Routing AgorithmLink State Routing AlgorithmRIPOSPFBGPIntroduction
46ICMP V4 -IntroductionThe IP protocol has no error-reporting or error correcting mechanism.What happens if something goes wrong? What happens if a router must discard a datagram because it cannot find a router to the final destination, orBecause the time-to-live field has a zero value?These are examples of situations where an error has occurred and the IP protocol has no built-in mechanism to notify the original host.The solution is ICMP protocol
49ICMP V4 -MESSAGES ICMP messages are divided into two broad categories: error-reporting messagesquery messages.The error-reporting messages report problems that a router or a host (destination) may encounter when it processes an IP packet.The query messages, help a host or a network manager get specific information from a router or another host. Also, hosts can discover and learn about routers on their network and routers can help a node redirect its messages.
51Basic ICMP HeaderHeaders are 32 bits in length; all contain same three fieldstype - 8 bit message type codeThirteen message type are definedcode - 8 bit;indicating why message is being sentchecksum - standard internet checksumfor purpose of calculation the checksum field is set to zero
55ICMP V6- INTRODUCTIONAnother protocol that has been modified in version 6 of the TCP/IP protocol suite is ICMP.This new version, Internet Control Message Protocol version 6 ( ICMPv6 ), follows the same strategy and purposes of version 4.ICMPv6, however, is more complicated than ICMPv4: some protocols that were independent in version 4 are now part of ICMPv6 andsome new messages have been added to make it more useful.
56Comparison of network layers in version 4 and version 6
58ICMP V6- ERROR MESSAGESAs we saw in our discussion of version 4, one of the main responsibilities of ICMP is to report errors.Four types of errors are handled:destination unreachable,packet too big,time exceeded, andparameter problems
60ICMP V6- INFORMATIONAL MESSAGES Two of the ICMPv6 messages can be categorized as informational messages: echo request and echo reply messages.The echo request and echo response messages are designed to check if two devices in the Internet can communicate with each other.A host or router can send an echo request message to another host; the receiving computer or router can reply using the echo response message.
61ICMP V6- NEIGHBOR-DISCOVERY MESSAGES Several messages in the ICMPv6 have been redefined in ICMPv6 to handle the issue of neighbor discovery.Some new messages have also been added to provide extension.The most important issue is the definition of two new protocols that clearly define the functionality of these group messages:Neighbor-Discovery (ND) protocolInverse-Neighbor-Discovery (IND) protocol.These two protocols are used by nodes (hosts or routers) on the same link (network).
62Chapter 3: ROAD MAPBasics of IPV4ICMPV4 and ICMPV6IPV6 in details(Motivation,features,Address Representation ,Unicast and /Multicast Addresses, Header format)ARPRARPMobile IPDistance Vector Routing AgorithmLink State Routing AlgorithmRIPOSPFBGPIntroduction
63Motivation for Changing IPv4 New countries with differing administrative policiesIPv4 same for about 20 yearsSince IPv4 designedEnhanced processor performanceMemory size increasedNetwork bandwidth for Internet backbone increasedNew LAN technologiesNumber of hosts on Internet risen to over 56 million
64Need Of IPV6 Support billions of hosts Reduce size of routing tables Simplify protocol, to allow routers to process packets fasterProvide better securityPay more attention to type of serviceMake it possible for hosts to roam without changing its address
65Features of IPv6Despite many conceptual similarities IPv6 changes most protocol detailsCompletely revises datagram formatReplace IPv4 variable length fields with a series of fixed format headersStill supports connectionless deliveryAllows sender to choose datagram size but requires sender to specify maximum hops
66Features of IPv6Includes facilities for fragmentation and source routingMain changes introduced are1. Larger Addresses: IPv6 quadruples the size from 32 bits to 128 bits2. Extended Address Hierarchy: Creates ability to have additional address levels on an internetIPv4 Addresses – 2 levels, Network and HostIPv6 Addresses – Can define a hierarchy of ISPs as well as hierarchy within a site
67Features of IPv63. Flexible Header Format: Datagram format entirely differentDefines a fixed size (40 octets) header with optional extended headers4. Improved Options:Has same options as IPv4 plus some new ones5. Provision for Protocol Extension:Move away from protocol that fully specifies all details to one that permits additional features
68Features of IPv66. Support for Autoconfiguration and Renumbering (Plug and Play)Allows computers on an isolated network to assign themselves addresses and begin communicating without depending on a router or manual configurationFacility to permit a manager to renumber networks dynamically7. Support for Resource Allocation:Two facilities for pre-allocation of network resourcesa Flow abstractiona Differentiated Services specification
69Topics discussed in this section: IPv6 ADDRESSESDespite all short-term solutions, address depletion is still a long-term problem for the Internet. This and other problems in the IP protocol itself have been the motivation for IPv6.Topics discussed in this section:Structure Address Space
70An IPv6 address is 128 bits long. NoteAn IPv6 address is 128 bits long.
76Basic IPv6 Address Types Unicast – Destination address specifies a single computer. Route datagram along shortest path.Anycast – Destination is a set of computers, possibly at different locations, that all share a single address. Route datagram along shortest path and deliver to exactly one member of the group (i.e. closest member)Multicast - Destination is a set of computers, possibly at different locations. One copy of the datagram will be delivered to each member of the group using hardware multicast or broadcast if viable.
77The IPv6 fixed header (required). The Main IPv6 HeaderThe IPv6 fixed header (required).
78IPV6 Header Description Version (4-bits): It represents the version of Internet ProtocolTraffic Class (8-bits): These 8 bits are divided into two parts. The most significant 6 bits are used for Type of Service to let the Router Known what services should be provided to this packet.The least significant 2 bits are used for Explicit Congestion Notification (ECN).
79IPV6 Header Description Flow Label (20-bits): This label is used to maintain the sequential flow of the packets belonging to a communication. The source labels the sequence to help the router identify that a particular packet belongs to a specific flow of information. This field helps avoid re-ordering of data packets. It is designed for streaming/real- time media.Payload Length (16-bits): This field is used to tell the routers how much information a particular packet contains in its payload.
80IPV6 Header Description Next Header (8-bits): This field is used to indicate either the type of Extension Header.Hop Limit (8-bits): This field is used to stop packet to loop in the network infinitely. The value of Hop Limit field is decremented by 1 as it passes a link (router/hop). When the field reaches 0 the packet is discarded.Source Address (128-bits): This field indicates the address of originator of the packet.Destination Address (128-bits): This field provides the address of intended recipient of the packet.
84Advantages of IPv6 over IPv4(Ipv4 v/s Ipv6) FeatureIPv4IPv6Source and destination address32 bits128 bitsAddress FormatDotted DecimalHexadecimal NotationNo of Address2^322^128IPSecOptionalrequiredPayload ID for QoS in the headerNo identificationUsing Flow label fieldFragmentationBoth router and the sending hostsOnly supported at the sending hostsHeader checksumincludedNot includedResolve IP address to a link layer addressbroadcast ARP requestMulticast Neighbor Solicitation message
85Advantages of IPv6 over IPv4(Ipv4 v/s Ipv6) (2) FeatureIPv4IPv6Determine the address of the best default gatewayICMP Router Discovery(optional)ICMPv6 Router Solicitation and Router Advertisement (required)Send traffic to all nodes on a subnetBroadcastLink-local scope all-nodes multicast addressConfigure addressManually or DHCPAutoconfigurationManage local subnet group membership(IGMP)Multicast Listener Discovery (MLD)
86Chapter 3: ROAD MAP ARP RARP Basics of IPV4 ICMPV4 and ICMPV6 IPV6 in details(Motivation,features,Address Representation ,Unicast and /Multicast Addresses, Header format)ARPRARPMobile IPDistance Vector Routing AgorithmLink State Routing AlgorithmRIPOSPFBGPIntroduction
88Position of ARP and RARP in TCP/IP protocol suite Notice that ARP and RARP are supplemental to IP.
89ARP (Address Resolution Protocol) ARP associates an IP address with its physical address. On a typical physical network, such as a LAN, each device on a link is identified by a physical or station address that is usually imprinted on the NIC.The delivery of a packet to a host or a router requires two levels of addressing: logical and physical.We need to be able to map a logical address to its corresponding physical address and vice versa. These can be done using either static or dynamic mapping.Logical address to physical address translation can be done statically (not practical) or dynamically (with ARP).
93An ARP request is broadcast; an ARP reply is unicast. NoteAn ARP request is broadcast; an ARP reply is unicast.
94RARP (Reverse Address resolution Protocol) RARP finds the logical address for a machine that only knows its physical address. RARP requests are broadcast, RARP replies are unicast.This if often encountered on thin-client workstations. No disk, so when machine is booted, it needs to know its IP address (don’t want to burn the IP address into the ROM).If a thin-client workstation needs to know its IP address, it probably also needs to know its subnet mask, router address, DNS address, etc.So we need something more than RARP. BOOTP, and now DHCP have replaced RARP.
97RARP, BOOTP AND DHCPwhen diskless workstation is booted. Such m/c get the binary image of its operating system from remote file server. But how does it learn its IP address?The first solution to this problem was RARP used to map Ethernet address to IP address.Next solution is BOOTP . But problem with BOOTP is that it requires manual configuration of tables mapping IP address to Ethernet addressNext come DHCP allows both manual IP address assignment and automatic assignment
98Chapter 3: ROAD MAP ARP RARP Mobile IP Basics of IPV4 ICMPV4 and ICMPV6IPV6 in details(Motivation,features,Address Representation ,Unicast and /Multicast Addresses, Header format)ARPRARPMobile IPDistance Vector Routing AgorithmLink State Routing AlgorithmRIPOSPFBGPIntroduction
99OBJECTIVES:To discuss addressing issues related to a mobile host and the need for a care-of address.To discuss two agents involved in mobile IP communication, the home agent and the foreign agent, and how they communicate.To explain three phases of communication between a mobile host and a remote host: agent discovery, registration, and data transfer.To mention inefficiency of mobile IP in two cases, double crossing and triangular routing, and a possible solution.
100Outline 1 Addressing 2 Agents 3 Three Phases 4 Inefficiency in Mobile IP
1011 ADDRESSINGThe main problem that must be solved in providing mobile communication using the IP protocol is addressing.
102Topics Discussed in the Section Stationary HostMobile HostTCP/IP Protocol Suite
103NoteThe IP addresses are designed to work with stationary hosts because part of the address defines the network to which the host is attached.TCP/IP Protocol Suite
104Figure 10.1 Home address and care-of address TCP/IP Protocol Suite
105mobile host moves from one network to another. NoteMobile IP has two addresses for a mobile host: one home address and one care-of address. The home address is permanent; the care-of address changes as themobile host moves from one network to another.TCP/IP Protocol Suite
10610-2 AGENTSTo make the change of address transparent to the rest of the Internet requires a home agent and a foreign agent.TCP/IP Protocol Suite
107Topics Discussed in the Section Home AgentForeign AgentTCP/IP Protocol Suite
108Figure 10.2 Home agent and foreign agent TCP/IP Protocol Suite
10910-3 THREE PHASESTo communicate with a remote host, a mobile host goes through three phases: agent discovery, registration, and data transfer.The first phase, agent discovery, involves the mobile host, the foreign agent, and the home agent. The second phase, registration, also involves the mobile host and the two agents. Finally, in the third phase, the remote host is also involved. We discuss each phase separately.TCP/IP Protocol Suite
110Topics Discussed in the Section Agent DiscoveryRegistrationData TransferTCP/IP Protocol Suite
111Figure Remote host and mobile host configuration TCP/IP Protocol Suite
113Chapter 3: ROAD MAP ARP RARP Mobile IP Basics of IPV4 ICMPV4 and ICMPV6IPV6 in details(Motivation,features,Address Representation ,Unicast and /Multicast Addresses, Header format)ARPRARPMobile IPDistance Vector Routing AgorithmLink State Routing AlgorithmRIPOSPFBGPIntroduction
114OBJECTIVES:To introduce the idea of autonomous systems (ASs) that divide the Internet into smaller administrative regions.To discuss the idea of distance vector routing and the RIP that is used to implement the idea.To discuss the idea of link state routing as the second intra-AS routing method and OSPF that is used to implement the idea.To discuss the idea of path vector routing as the dominant inter-AS routing method and BGP that is used to implement the idea.TCP/IP Protocol Suite
115Outline 1 Introduction 2 Intra- and Inter-Domain Routing 3 Distance Vector Routing4 RIP5 Link State Routing6 OSPF7 Path Vector Routing8 BGP
1161 INTRODUCTIONAn internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many routers until it reaches the router attached to the destination network.TCP/IP Protocol Suite
117Topics Discussed in the Section Cost or MetricStatic versus Dynamic Routing TableRouting ProtocolTCP/IP Protocol Suite
118Routing Algorithms The Optimality Principle Shortest Path Routing FloodingDistance Vector RoutingLink State RoutingHierarchical RoutingBroadcast RoutingMulticast RoutingRouting for Mobile HostsRouting in Ad Hoc Networks
1192 INTER- AND INTRA-DOMAIN ROUTING Today, an internet can be so large that one routing protocol cannot handle the task of updating the routing tables of all routers.For this reason, an internet is divided into autonomous systems.An autonomous system (AS) is a group of networks and routers under the authority of a single administration.Routing inside an autonomous system is called intra-domain routing.Routing between autonomous systems is called inter-domain routingTCP/IP Protocol Suite
120Figure Autonomous systems TCP/IP Protocol Suite
121Autonomous System (AS) Collection of networks with same policySingle routing protocolUsually under single administrative control4
122Autonomous System... Identified by ‘AS number’ Examples: - service provider- multihomed customers- anyone needing policy descrimination7
123Popular routing protocols TCP/IP Protocol Suite
124What Is an IGP? 5 Interior Gateway Protocol Within an Autonomous SystemCarries information about internal prefixesExamples—OSPF, ISIS, EIGRP…5
125What Is an EGP? 6 Exterior Gateway Protocol Used to convey routing information between Autonomous SystemsDecoupled from the IGPCurrent EGP is BGP6
1263 DISTANCE VECTOR ROUTING Today, an internet can be so large that one routing protocol cannot handle the task of updating the routing tables of all routers. For this reason, an internet is divided into autonomous systems.An autonomous system (AS) is a group of networks and routers under the authority of a single administration.Routing inside an autonomous system is called intra-domain routing.TCP/IP Protocol Suite
127Distance Vector Routing Working No node has complete information about the costs of all network linksGradual calculation of path by exchanging information with neighborsEach node constructs a one-dimensional array containing the “distances” or “costs” to all other nodes (as it relates to its knowledge) and distributes it to its immediate neighbors.Key thing -- each node knows the cost of links to its neighbors.If no link exists between two nodes, the cost of a direct link between the nodes is “infinity”.
128Share Routing table with neighbors Periodic UpdateA node sends its routing table, normally 30 seconds, in a periodic updateTriggered UpdateA node sends its routing table to its neighbors any time when there is a change in its routing table1. After updating its routing table, or2. Detects some failure in the neighboring linksTCP/IP Protocol Suite
129Updating Routing Table If the next-node entry is differentThe receiving node chooses the row with the smaller costIf the next-node entry is the samei.e. the sender of the new row is the provider of the old entryThe receiving node chooses the new row, even though the new value is infinity.TCP/IP Protocol Suite
130Distance Vector Routing Example (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
131Distance Vector Routing – The count-to-infinity problem.
132RIP- Routing Information Protocol The Routing Information Protocol (RIP) is an intra-domain (interior) routing protocol used inside an autonomous system.It is a very simple protocol based on distance vector routing.In the Internet, goal of routers is to learn how to forward packets to various networks.TCP/IP Protocol Suite
133An Example of RIP Routers advertise the cost of reaching networks. In this example, C’s update to A would indicate that C can reach Networks 2 and 3 with cost 0,Networks 5 and 6 with cost 1and Network 4 with cost 2.
134RIP messages TCP/IP Protocol Suite Request A request message is sent by a router that has just come up or by a router that has some time-out entriesA request can ask about specific entries or all entriesResponseA response can be within 30s or when there is a change in the routing tableTCP/IP Protocol Suite
135RIP Timers TCP/IP Protocol Suite Periodic timer Routing tables are exchanged every 30 seconds using the RIP advertisement.Expiration timerIf a router does not hear from its neighbor once every 180 seconds, the neighbor is deemed unreachable.TCP/IP Protocol Suite
136LINK STATE ROUTINGLink state routing has a different philosophy from that of distance vector routing.In link state routing, if each node in the domain has the entire topology of the domain]—the list of nodes and links, how they are connected including the type, cost (metric), and the condition of the links (up or down)—the node can use the Dijkstra algorithm to build a routing table.TCP/IP Protocol Suite
137Link State Routing Each router must do the following: Discover its neighbors, learn their network address.Measure the delay or cost to each of its neighbors.Construct a packet telling all it has just learned.Send this packet to all other routers.Compute the shortest path to every other router.
138Learning about the Neighbors Nine routers and a LAN. (b) A graph model of (a).Hello packets are used to find Neighbors
139Measuring Line Cost Echo packets are used to measure the line cost Calculate total time used to echo packett = Arrival time – Departure timeThen t/2 gives cost(time) of line
140Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.
141Distributing the Link State Packets The packet buffer for router B in the previous slide
142OSPF- Open Shortest Path First The Open Shortest Path First (OSPF) protocol is an intra-domain routing protocol based on link state routing.Its domain is also an autonomous system.Support variety of distance metricsDynamic algorithm that adapted to changes in the topology automatically and quicklyTCP/IP Protocol Suite
143OSPF- Open Shortest Path First Support routing based on type of serviceDo load balancing, splitting the load over multiple linesPrevent spoofing ie better security provisionProvision for dealing with routers that were connected to the internet via a tunnel
144OSPF- Open Shortest Path First OSPF divides AS into areas.Every AS has a backbone area called area 0All areas are connected to backbone areasOSPF has four classes of routerInternal routers wholly within on areaArea border routers connect two or more areasBackbone routers On the backbone areaAS boundary routers Talk to other routers inother AS
145OSPF- Open Shortest Path First The relation between ASes, backbones, and areas in OSPF.
146OSPF- Open Shortest Path First The five types of OSPF messeges.5-66
147BGP- Border Gateway Protocol Border Gateway Protocol (BGP) is an interdomain routing protocol using path vector routing.It first appeared in 1989 and has gone through four versions.The Border Gateway Protocol makes routing decisions based on paths, network policies or rule-sets configured by a network administrator,TCP/IP Protocol Suite
148BGP- Border Gateway Protocol When BGP runs between two peers in the same autonomous system (AS), it is referred to as Internal BGP (iBGP or Interior Border Gateway Protocol).When it runs between different autonomous systems, it is called External BGP (EBGP or Exterior Border Gateway Protocol).Routers on the boundary of one AS exchanging information with another AS are called border or edge routers
150BGP Messages Lecture #13: 02-24-04 Open Announces AS ID Determines hold timer – interval between keep_alive or update messages, zero interval implies no keep_aliveKeep_aliveSent periodically to peers to ensure connectivity.NotificationUsed for error notificationTCP connection is closed immediately after notificationLecture #13:
151(a) A set of BGP routers. (b) Information sent to F. BGP – Example(a) A set of BGP routers (b) Information sent to F.
152Path Attributes TCP/IP Protocol Suite ORIGIN The source of the routing information (RIP, OSPF, etc)AS_PATHThe list of ASs through which the destination can be reachedNEXT-HOPThe next router to which the data packet should be sentTCP/IP Protocol Suite
153BGP uses the services of TCP on port 179. NoteBGP uses the services of TCP on port 179.TCP/IP Protocol Suite