Docsity

Internet Protocol - Network Technologies - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download Internet Protocol - Network Technologies - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Layer 3 and the Internet Protocol (IP)

Outline

  • Layer 3 (The Network Layer)
  • IP: The Internet Protocol
    • Service characteristics
    • IP addresses
    • Fragmentation
    • The IP Datagram format
    • Classless Interdomain Routing (CIDR)
    • An aside: Turning names into addresses (DNS)
    • Forwarding IP Datagrams

Key Network-Layer functions

  • Forwarding
    • Move packets from router’s input to appropriate router output
  • Routing
    • Determine path taken by packets to go from sender to receiver
    • “Routing algorithms”: run at routers to determine paths
    • Routers have “forwarding tables”
      • Based on destination address in datagram networks

The Internet Protocol (IP)

App Transport Network Link

TCP / UDP IP

Data Hdr

Data Hdr

TCP Segment

IP Datagram

Protocol Stack

Fragmentation

A Ethernet MTU=1500 bytes^ MTU=1500 bytes

B

Source Destination

MTU<1500 bytes

Problem: A router may receive a packet larger than the maximum transmission unit (MTU) of the outgoing link.

R1 R

Solution: R1 fragments the IP datagram into mutiple, self-contained datagrams.

Data HDR (ID=x)

Data HDR (ID=x) Data HDR (ID=x) Data HDR (ID=x)

Offset> More Frag=

Offset= More Frag=

Fragmentation

  • Fragments are re-assembled by the destination host; not by intermediate routers.
  • To avoid fragmentation, hosts commonly use path MTU discovery to find the smallest MTU along the path.
  • Path MTU discovery involves sending various size datagrams until they do not require fragmentation along the path.
  • Most links use MTU>=1500bytes today.
  • Try: traceroute –f berkeley.edu 1500 and traceroute –f berkeley.edu 1501
  • (DF=1 set in IP header; routers send “ICMP” error message, which is shown as “!F”).
  • Bonus: Can you find a destination for which the path MTU < 1500 bytes?

IP Addresses

  • IP (Version 4) addresses are 32 bits long
  • Every interface has a unique IP address:
    • A computer might have two or more IP addresses
    • A router has many IP addresses
  • IP addresses are hierarchical
    • They contain a network ID and a host ID
    • E.g. Stanford addresses start with: 171.64…
  • IP addresses are assigned statically or

dynamically (e.g. DHCP)

  • IP (Version 6) addresses are 128 bits long

The IP Datagram

Flags

vers

TTL

TOS

checksum

HLen Total Length ID FRAG Offset Protocol SRC IP Address DST IP Address (OPTIONS) (PAD)

<=64 KBytes

Offset within original packet

Hop count

http://tools.ietf.org/html/rfc http://www.networksorcery.com/enp/default0904.htm

IP Addresses

Examples

Class “A” address: www.mit.edu 18.181.0. (18<128 => Class A)

Class “B” address: mekong.stanford.edu 171.64.74. (128<171<128+64 => Class B)

IP Addressing

Problem:

 Address classes were too “rigid”. For most organizations, Class C were too small and Class B too big. Led to inefficient use of address space, and a shortage of addresses.  Organizations with internal routers needed to have a separate (Class C) network ID for each link.  And then every other router in the Internet had to know about every network ID in every organization, which led to large address tables.  Small organizations wanted Class B in case they grew to more than 255 hosts. But there were only about 16,000 Class B network IDs.