Network Layer: Address Mapping, Error Reporting, And Multicasting

Published in: Networking
1,978 views
  • M

    Muhammad R

    • Dubai
    • 4 Years of Experience
    • Qualification: Bachelor of Science, CCNA Certified, Nebosh Certified, Flash...
    • Teaches: Computer, Maths, Science, Computer science, Mathem...
  • Contact this tutor

In this PPT students will learn Error Reporting and Multicasting.

  • 1
    21.1 Data Communications Forouzan and Networking Fourth Edition Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright O The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
  • 2
    21-1 ADDRESS MAPPING 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. This can be done by using either static or dynamic mapping. Topics discussed in this section: Mapping Logical to Physical Address Mapping Physical to Logical Address 21.2
  • 3
    Figure 21.1 ARP operation Looking for physical address of a node with IP address 141.23.56.23 Request System A a. ARP request is broadcast System A b. ARP reply is unicast 21.3 The node physical address Reply System B System B
  • 4
    Figure 21.2 ARP packet 8 bits Ha rdware Type 32 bits 8 bits Protocol length 16 bits Protocol Type Operation Request 1, Reply 2 Hardware length 21.4 Sender hardware address (For example, 6 bytes for Ethernet) Sender protocol address (For example, 4 bytes for IP) Target hardware address (For example, 6 bytes for Ethernet) (It is not filled in a request) Target protocol address (For example, 4 bytes for IP)
  • 5
    Figure 21.3 Encapsulation of ARP packet ARP request or reply packet Preamble and SFD 8 bytes 21.5 Type: Destination address 6 bytes ox0806 Sou rce address 6 bytes Type 2 bytes Data CRC 4 bytes
  • 6
    Figure 21.4 Four cases using ARP Sender Host LAN Host Receiver Sender Host LAN Router Receiver Case 1. A host has a packet to send to another host on the same network. Target IP address: IP address of the appropriate router found in the routing table Sender Receiver Case 3. A router receives a packet to be sent to a host on another network. It must first be delivered to the appropriate router. 21.6 Case 2. A host wants to send a packet to another host on another network. It must first be delivered to a router. Sender Receiver Case 4. A router receives a packet to be sent to a host on the same network.
  • 7
    Note An ARP request is broadcast; an ARP reply is unicast. 21.7
  • 8
    Example 21.1 A host with IP address 130.23.43,20 and physical address B2:34:55:10:22:10 has a packet to send to another host with IP address 130.23.43.25 and physical address The two hosts are on the same Ethernet network. Show the ARP request and reply packets encapsulated in Ethernet frames. Solution Figure 21,5 shows the ARP request and reply packets. Note that the ARP data field in this case is 28 bytes, and that the individual addresses do not fit in the 4-byte boundary. That is why we do not show the regular 4-byte boundaries for these addresses. 21.8
  • 9
    Figure 21.5 Example 21.1, an ARP request and reply A 130.2343.20 ARP Request OxOOOl ox06 ox04 OxOOOl OxB23455102210 130.23.43.20 oxoooooooooooo 130.23.43.25 130.23.43.25 ARP Reply OxOOOl ox06 ox04 OxA46EF45983AB 130.23.43.25 OxB23455102210 130.23.43.20 Time 21.9 Time
  • 10
    Figure 21.6 Proxy ARP The proxy ARP router replies to any ARP request received for destinations 141.23.56.21, 141.23.56.22, and 141.23.56.23. Request Router or host 21.10 1 41.23.56.21 1 41.23.56.22 Added subnetwork 1 41.23.56.23 Proxy ARP router
  • 11
    Figure 21.7 BOOTP client and server on the same and different networks 21.11 BOOTP Client Request 68 67 0'S IIS a. Client and server on the same network S I's 68 67 BOOTP Client Broadcast request Relay agent Unicast request I nte rnet b. Client and server on different networks BOOTP Server Reply BOOTP server Unicast request
  • 12
    Note DHCP provides static and dynamic address allocation that can be manual or automatic. 21.12
  • 13
    21-2 ICMP The IP protocol has no error-reporting or error- correcting mechanism. The IP protocol also lacks a mechanism for host and management queries. The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two deficiencies. It is a companion to the IPprotocol. Topics discussed in this section: Types of Messages Message Format Error Reporting and Query Debugging Tools 21.13
  • 14
    Figure 21.8 General format of ICMP messages 8 bits Type 21.14 8 bits Code 8 bits 8 bits Checksum Rest of the header Data section
  • 15
    Note ICMP always reports error messages to the original source. 21.15
  • 16
    Figure 21.9 Error-reporting messages Destination unreachable Type: 3 21.16 Source quench Type: 4 Error reporting Time exceeded Type: 1 1 Parameter problems Type: 12 Redirection Type: 5
  • 17
    Note Important points about ICMP error messages: No ICMP error message will be generated in a response to a datagram carrying an ICMP error message. No ICMP error message will be generated for a a fragmented datagram that is not the first fragment. No ICMP error message will be generated for a a datagram having a multicast address. No ICMP error message will be generated for a a datagram having a special address such as 127.0-0.0 or 0.0-0.0. 21.17
  • 18
    Figure 21.10 header 21.18 Contents of data field for the error messages Received datagram ICMP header ICMP header header header header Rest of 8 bytes IP data I 8 ICMP packet bytes 8 bytes nt IP datagram
  • 19
    Figure 21.11 Redirection concept Redirection message IP packet RI 21.19 LAN IP packet LAN IP packet
  • 20
    Figure 21.12 Query messages Query messages Echo request and reply Types: 8 and 0 21.20 Timestamp request and reply Types: 13 and 14 Address-mask request and reply Types: 17 and 18 Router solicitation and advertisement Types: 10 and 9
  • 21
    Figure 21.13 Encapsulation ofICMP query messages ICMP Packet Data header 21.21
  • 22
    Example 21.2 Figure 21.14 shows an example of checksum calculation for a simple echo-request message. We randomly chose the identifier to be 1 and the sequence number to be 9. The message is divided into 16-bit (2-byte) words. The words are added and the sum is complemented, Now the sender can put this value in the checksum field. 21.22
  • 23
    Figure 21.14 Example of checksum calculation 8 1 9 Sum Checksum 21.23 TEST 00001000 00000000 -----+- 00000000 00000000 01010100 01010011 01 010000 9 00000000 00000000 00000001 00001001 01000101 010101 oo 1 0100011 0101 1100
  • 24
    Example 21.3 We use the ping program to test the server fhda.edu, The result is shown on the next slide. The ping program sends messages with sequence numbers starting from 0, For each probe it gives us the RTT time. The TTL (time to live) field in the IP datagram that encapsulates an ICMP message has been set to 62. At the beginning, ping defines the number of data bytes as 56 and the total number of bytes as 84. It is obvious that if we add 8 bytes of ICMP header and 20 bytes of IP header to 56, the result is 84. However, note that in each probe ping defines the number of bytes as 64. This is the total number of bytes in the ICMPpacket (56 + 8). 21.24
  • 25
    Example 21.3 (continued) $ ping fhda.edu PING fhda.edu (153.18.8.1) 56 (84) bytes of data. =O ttl=62 ttl=62 ttl=62 =3 ttl=62 =4 'ttl=62 =5 ttl=62 =6 ttl=62 ttl=62 ttl=62 ttl=62 'ttl=62 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp_seq 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp seq 64 bytes from "tiptoe.fhda.edu (153.18.8. l): icmp_seq 64 bytes from 'tiptoe.fhda.edu (153.18.8. l): icmp_seq 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp seq 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp seq 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp_seq 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp seq 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp seq 64 bytes from 'tiptoe.fhda.edu (153.18.8. l): icmp_seq 64 bytes from tiptoe.fhda.edu (153.18.8. l): icmp seq fhda.edu ping statistics =10 time=l.91 ms time= 2.04 ms time=l .90 ms time= 1.97 ms time=l.93 ms time=2.00 ms time=l .94 ms time=l .94 ms time— -1.97 ms time=l .89 ms time=l.98 ms Il packets transmitted, Il received, 0% packet loss, time 10103ms rtt min/avg/max = 1.899/1.955/2.041 ms 21.25
  • 26
    Figure 21.15 The traceroute program operation Host A Network Network 21.26 Host B Network Network Network Host C
  • 27
    Example 21.4 We use the traceroute program to find the route from the computer voyager.deanza.edu to the serverfhda.edu. The following shows the result: $ traceroute fhda.edu traceroute to fhda.edu (153.18.8.1), 30 hops max, 38 byte packets I Dcore.fhda.edu 2 Dbackup.fhda.edu 3 tiptoe.thda.edu (153018.31254) 0.995 ms 0.899 ms (153.18.251.4) (153.18.8.1) I *039 ms 1.064 ms 1.797 ms 1.642 ms 0.878 ms 1.083 ms 1.757 ms The unnumbered line after the command shows that the destination is 153.18,8.1. The packet contains 38 bytes: 20 bytes of IP header, 8 bytes of UDP header, and 10 bytes of application data. The application data are used by traceroute to keep track of the packets. 21.27
  • 28
    Example 21.4 (continued) The first line shows the first router visited. The router is named Dcore.fhda.edu with IP address 153.18,31.254. The first round-trip time was 0.995 ms, the second was 0.899 ms, and the third was 0.878 ms. The second line shows the second router visited. The router is named Dbackup.fhda.edu with IP address The three round-trip times are also shown, The third line shows the destination host. We know that this is the destination host because there are no more lines. The destination host is the server fhda.edu, but it is named tiptoe.fhda.edu with the IP address The three round-trip times are also shown. 21.28
  • 29
    Example 21.5 In this example, we trace a longer route, the route to xerox.com (see next slide). Here there are 17 hops between source and destination. Note that some round- trip times look unusual. It could be that a router was too busy to process the packet immediately. 21.29
  • 30
    Example 21.5 (continued) $ traceroute xerox.com traceroute to xerox.com (13.1.64.93), 30 hops max, 38 byte packets I Dcore.fhda.edu 2 Ddmz.fhda.edu 3 Cinic.fhda.edu 4 cenic.net 5 cenic.net 14 snfc21 .pbi.net 15 sbcglobal.net 16 pacbell.net 17 209233.48223 18 alpha.Xerox.COM 21.30 (153.18.31.254) (153.18.251.40) (153.18.253.126) (137.164.32.140) (137.164.22.31) (151.164.191.49) (151.164.243.58) (209.232.138.114) (209233.48223) (13.1.64.93) 0.622 ms 2.132 ms 2.110 ms 3.069 ms 4.205 ms 7.656 ms 7.844 ms 9.857 ms 10.634 ms 11.172 ms 0.891 ms 2266 ms 2.145 ms 2.875 ms 4.870 ms 7.129 ms 7.545 ms 9.535 ms 10.771 ms 11.048 ms 0.875 ms 2.094 ms 1.763 ms 2.930 ms 4.197 ms 6.866 ms 7.353 ms 9.603 ms 10.592 ms 10.922 ms
  • 31
    21-3 IGMP The IP protocol can be involved in two types of' communication: unicasting and multicasting. The Internet Group Management Protocol (IGMP) is one of the necessary, but not sufficient, protocols that is involved in multicasting. IGMP is a companion to the IPprotoc01. Topics discussed in this section: Group Management IGMP Messages and IGMP Operation Encapsulation Netstat Utility 21.31
  • 32
    Figure 21.16 IGMP message types IGMP messages Membership Special Query report General Query 21.32 Leave report
  • 33
    Figure 21.17 IGMP message format 8 bits Type 8 bits Maximum response time 8 bits 8 bits Checksum Group address in membership and leave reports and special query; all Os in general query 21.33
  • 34
    Table 21.1 IGMPtypefie1d Type General or special query Membership report Leave report 21.34 Oxl I Ox 16 ox17 Value 00010001 00010110 00010111
  • 35
    Figure 21.18 IGMP operation Network To other networks 21.35 z List of groups having loyal members 225.70.8.20 231.24.60.9 229.60.12.8 To another network To another network
  • 36
    Note In IGMP, a membership report is sent twice, one after the other. 21.36
  • 37
    Note The general query message does not define a particular group. 21.37
  • 38
    Example 21.6 Imagine there are three hosts in a network, as shown in Figure 21.19. A query message was received at time O; the random delay time (in tenths of seconds) for each group is shown next to the group address. Show the sequence of report messages. Solution The events occur in this sequence: The timer for 228.42.0.0 in host A expires, a, Time 12: and a membership report is sent, which is received by the router and every host including host B which cancels its timer for 228.42.0.0. 21.38
  • 39
    Example 21.6 (continued) The timer for 225.14.0.0 in host A expires, and b. Time 30: a membership report is sent which is received by the router and every host including host C which cancels its timer for 225.14, 0, 0, c. Time 50: The timer for 238,71.O.O in host B expires, and a membership report is sent, which is received by the router and every host. d, Time 70: The timer for 230,43.0.0 in host C expires, and a membership report is sent, which is received by the router and every host including host A which cancels its timer for 230.43.0.0. 21.39
  • 40
    Figure 21.19 Example 21.6 Group Timer 225.14.0.o 228.42.o.o 230.43.o.o 21.40 30 12 80 Group Timer 228.42.o.0 48 238.71.0.0 50 Group Timer 225.14.0.0 62 230.43.o.0 70 c To other networks
  • 41
    Figure 21.20 Encapsulation ofIGMPpacket header 8 bytes IGMP message data Frame data Frame header 21.41 Trailer (if any)
  • 42
    Note The IP packet that carries an IGMP packet has a value of 1 in its TTL field. 21.42
  • 43
    Table 21.2 Destination IP addresses Type Query Membership report Leave report 21.43 IP Destination Address 224.0.0.1 All systems on this subnet The multicast address of the group 224.0.0.2 All routers on this subnet
  • 44
    Figure 21.21 Mapping class D to Ethernet physical address 32-bit class D address 1110 5 bits unused 23 bits of multicast address 23 bits of physical address 48-bit Ethernet address 21.44
  • 45
    Note An Ethernet multicast physical address is in the range 01 to 01 21.45
  • 46
    Example 21.7 Change the multicast IP address 230,43.14.7 to an Ethernet multicast physical address. Solution We can do this in two steps: We write the rightmost 23 bits of the IP address in a. hexadecimal. This can be done by changing the rightmost 3 bytes to hexadecimal and then subtracting 8 from the leftmost digit if it is greater than or equal to 8. In our example, the result is 21.46
  • 47
    Example 21, 7 (continued) b. We add the result of part a to the starting Ethernet multicast address, which is The result is 01 21.47
  • 48
    Example 21.8 Change the multicast IP address 238,212, 24.9 to an Ethernet multicast address. Solution The rightmost 3 bytes in hexadecimal is D4:18:09. We a. need to subtract 8 from the leftmost digit, resulting in b. We add the result of part a to the Ethernet multicast starting address. The result is 01 18:09 21.48
  • 49
    Figure 21.22 Tunneling Header Header Multicast IP datagram Data Data Unicast IP datagram 21.49
  • 50
    Example 21.9 We use netstat (see next slide) with three options: -n, -r, and -a, The -n option gives the numeric versions of IP addresses, the -r option gives the routing table, and the -a option gives all addresses (unicast and multicast). Note that we show only the fields relative to our discussion. "Gateway" defines the router, "Iface" defines the interface. Note that the multicast address is shown in color. Any packet with a multicast address from 224.0.0.0 to is masked and delivered to the Ethernet interface. 21.50
  • 51
    Example 21.9 (continued) $ netstat -nra Kernel IP routing table Destination 169.254.0.0 127.o.o.o 224.o.o.o o.o.o.o 21.51 Gateway o.o.o.o o.o.o.o o.o.o.o o.o.o.o 153.18.31.254 Mask 255.255.240.0 255.255.0.0 255.o.o.o 224.o.o.o o.o.o.o Flags UG Iface eth0 eth0 10 eth0 eth0
  • 52
    21-4 ICMPv6 We discussed IPv6 in Chapter 20. Another protocol that has been modified in version 6 of the TCP/IP protocol suite is ICMP (ICMPv6). This new version follows the same strategy and purposes of version 4. Topics discussed in this section: Error Reporting Query 21.52
  • 53
    Figure 21.23 Comparison of network layers in version 4 and version 6 I pv4 Network layer in version 4 21.53 ICMPv6 IPv6 Network layer in version 6
  • 54
    Table 21.3 Comparison of error-reporting messages in ICMPv4 and ICMPv6 Type ofMessage Destination unreachable Source quench Packet too big Time exceeded Parameter problem Redirection 21.54 Version 4 Yes Yes Yes Yes Yes Version 6 Yes No Yes Yes Yes Yes
  • 55
    Table 21.4 Comparison of query messages in ICMPv4 and ICMPv6 Type of Message Echo request and reply Timestamp request and reply Address-mask request and reply Router solicitation and advertisement Neighbor solicitation and advertisement Group membership 21.55 Version 4 Version 6 Yes Yes Yes Yes ARP ICJMP Yes Yes Yes Yes

Need a Tutor or Coaching Class?

Post an enquiry and get instant responses from qualified and experienced tutors.

Post Requirement

Related PPTs