Transcript
Page 1: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Ch 20. Internet Protocol (IP)

Page 2: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

20.1 Internetworking

• PHY and data link layers operate “locally”

Page 3: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Need Routing

• Network layer is responsible for host-to-host delivery and packets routing

Page 4: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Internetworking in the Internet

• Functionality of network layer– Create a packet from data– Add logical addresses of the source and destination– Check routing table to find the interface that the

packet should go– If the packet is too large, it is fragmented

• Internet as a Connectionless Network– Connection-oriented service. Packets sent on the same path

in sequential order. Connection is terminated at the end of transmission.

– Connectionless service. Path can be different for each packet.

Page 5: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

20.2 IPv4

• The Internet– Is a packet-switched network, in particular, a

datagram network– Provides a connectionless service

• Best-effort service– No retransmission for error control – No flow control– No guarantee of packet delivery

Page 6: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

IPv4 Datagram Format

Length of data = total length – header length

Max total length is 65535, fragmentation might be need

Time to live is the maximum number of hops. Needed because routing table can become corrupted.

Value Protocol

1 ICMP

2 IGMP

6 TCP

7 UDP

89 OSPF

Page 7: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Examples

• In an IPv4 packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet?– The HLEN value is 8, which means the total number of bytes in

the header is 8 x 4, 32 byes. The first 20 bytes are the base header, the next 12 are the options.

• In an IPv4 packet, the value of HLEN is 5, and the value of the total length field is 0x0028. How many bytes of data are being carried by this packet?– The HLEN value is 5, which means the total number of bytes in

the header is 5 x 4, or 20 bytes (no options). The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 -20)

Page 8: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Fragmentation• IPv4 can have a datagram of

length up to 65,535 bytes– Each data link layer has its own

maximum frame length Maximum Transfer Unit (MTU)

• Fragmentation– To fit in MTU– Most of the IP header is copied– Use identification, flags, offset

fields in the header

Page 9: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

identification, flags, offset• Identification is a 16 bit field that identifies a datagram. To

guarantee uniqueness the IPv4 protocol uses a counter to label the datagrams. When a datagram is fragmented, the value in the identification field is copied to all fragments.

• Flags is a 3-bit field. The first bit is reserved. The second bit is called the do not fragment bit. The third bit is called the more fragment bit. If it values i1, it means the datagram is not the last fragment .

• Fragmentation offset. This 13-bit field shows the relative position of this fragment with respect to the whole datagram. It is the offset of the data in the original datagram measured in units of 8 bytes.

Page 10: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Example

Page 11: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Checksum • Cover only the

header

Page 12: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Options

Page 13: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

20.3 IPv6

• Main issues– Address depletion– Real-time traffic support– Security

• Advantages over IPv4– Larger address space from 128-bit address– Better header format– Support for resource allocation– Support for security– Potential extension and more options

Page 14: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

IPv6 Datagram Format

Page 15: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Changes from IPv4

Page 16: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Extension Header

Page 17: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Transition From IPv4 To IPv6

• Three main strategies– Dual stack, tunneling, header translation

• Dual stack (at host)

Page 18: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

• Tunneling

• Header translation

Page 19: Ch 20. Internet Protocol (IP). 20.1 Internetworking PHY and data link layers operate locally

Homework

• Exercises– 11– 12– 13– 24