Chapter 4 Network Layer 3: The Internet Protocol (IP) PowerPoint PPT Presentation

presentation player overlay
About This Presentation
Transcript and Presenter's Notes

Title: Chapter 4 Network Layer 3: The Internet Protocol (IP)


1
Chapter 4Network Layer 3The Internet Protocol
(IP)
  • Professor Rick Han
  • University of Colorado at Boulder
  • rhan_at_cs.colorado.edu

2
Announcements
  • Reminder Programming assignment 1 is due Feb.
    19
  • Part of Homework 2 available later today on Web
    site, the traceroute part will be available
    Monday
  • Homework 1 solutions when we hand back graded
    Homework 1
  • Reading Chapter 4
  • 4.1 today added material
  • 4.2, 4.3, 4.4 in same order
  • Next, IP network, packets, ARP, RARP,

3
Recap of Previous Lecture
  • Interconnecting Ethernet LANs
  • Ethernet Bridges/Switches Layer 2
  • Loops can form, causing
  • Packet multiplication
  • Endless Looping
  • Solution Create Spanning Trees
  • Eliminates Loops and Spanning Trees
  • Interconnecting Hosts and Switches via
    Point-to-Point Links
  • Asynchronous Transfer Mode (ATM)
  • Virtual circuits to route packets

4
ATM Network
  • Switch packets via virtual circuit routing
  • Lost to Ethernet in LAN, Losing to Gig. Eth./
    SONET in MAN, SONET/MPLS in WAN
  • Cost and complexity
  • But, some customers (DSL) want AALs guaranteed
    QOS for voice/video

Switch C
Host A
Switch B
Host F
Switch E
Switch D
5
Frame Relay and X.25
  • Frame Relay
  • Like ATM, uses permanent virtual circuits (PVCs
    more common) and SVCs
  • Widely deployed in 1990s
  • No error recovery per link not necessary over
    optical fiber
  • X.25 is an old 1970s public packet switching
    technology
  • Like ATM, uses virtual circuits to interconnect
    dumb terminals
  • Error recovery on each link, due to noisy copper
    phone lines

6
Bridging to Connect Remote LANs?
  • Network Cloud could be one giant bridge
  • Switch B keeps Ethernet MAC header, encapsulates
    Ethernet frame with network header, Switch E
    strips away network header
  • spanning tree and a bridge table within cloud

ATM or Frame Relay Network
Ethernet 1
Ethernet 2
Switch C
Switch B
Switch E
Switch D
7
Bridging to Connect Remote LANs? (2)
  • Problems
  • Many different types of LANs, e.g. Token Ring
    and FDDI, with completely different addressing
    schemes
  • Spanning tree doesnt scale well

ATM or Frame Relay Network
Undecipherable?
Ethernet 1
Switch C
Switch B
Token Ring
Switch E
Switch D
8
Routing to Connect Remote LANs
  • Internet Protocol (IP) addressing is the glue
    that spans heterogeneous LANs and WANs
  • IP hosts send IP packets via IP routers (shown in
    yellow)

ATM/Frame Relay
Switch C
Router X
Switch B
Router Y
Host 1
Switch E
Switch D
Host 2
9
Routing to Connect Remote LANs (2)
Host 1
Router X
Host 2
Router Y
IP
IP
IP
IP
Tok R MAC
Eth. MAC
Eth. MAC
Tok R MAC
Phys.
Phys.
Phys.
Phys.
ATM Net.
10
Routing to Connect Remote LANs (3)
  • Alternatively, IP directly over SONET (MANs)
  • Link-layer framing over fiber
  • Less overhead (IP over SONET) vs. (IP over ATM
    over link layer (could be SONET))

IP over SONET
Router C
SONET
Router X
Router B
SONET
Router Y
SONET
SONET
SONET
SONET
Host 1
Router E
SONET
Router D
Host 2
11
Routing to Connect Remote LANs (4)
Host 1
Router X
Host 2
Router Y
IP
IP
IP
IP
Tok R MAC
Eth. MAC
SONET framing
Eth. MAC
Tok R MAC
SONET framing
IP Net.
Opt Fbr OC-?
Opt Fbr OC-?
Phys.
Phys.
Phys.
Phys.
  • OC3155 Mbps, OC12622 Mbps, OC482.488 Gbps,
    OC19210 Gbps
  • Competitors to SONET in MAN Gigabit Ethernet

12
Internet Backbone
Take this with a grain of salt can be a
highly political prediction of what someone wants
to happen
13
  • UUNet/WorldCom
  • Backbone Provider
  • To ISPs
  • Leader at 28
  • market share
  • Claim theres a
  • bandwidth glut on
  • the backbone
  • 1 bandwidth
  • utilization

14
ATT SONET Backbone
15
Internet Topology
Internet Service Provider
ISP
ISP
Host 2
POP
Host 1
POP
Point of Presence
Network Access Point
Backbone Provider
Backbone Provider
NAP
Also called NSP Network Service Provider
16
Internet Routing
  • For simplicity, assume an Internet with a
    homogeneous IP backbone. IP provides
  • Unreliable out-of-order datagram delivery, also
    called best-effort service - no QOS guarantees,
    just First-Come-First-Serve (FCFS) routing

IP backbone
Router C
Router X
Router B
Router Y
Host 1
Router E
Router D
Host 2
17
Internet Protocol Packet Format
IP Datagram
IP Header
Data (variable length)
18
IP Packet Header
  • Big endian/network byte order send lower order
    bytes first
  • Send bits 0-7, then 8-15, then
  • Version current version is 4, I.e. IPv4
  • proposal for IPv6, which will have a different
    header

19
IP Packet Header (2)
  • IHL header length in 32-bit words
  • Normally 5, i.e. 20 byte IP headers
  • Max 60 bytes
  • Header can be variable length

20
IP Packet Header (3)
  • Type of Service 3-bit precedence field (unused),
    4 TOS bits, 1 unused bit set to 0
  • TOS bit 1 (min delay), 2 (max throughput), 3 (max
    reliability), 4 (min cost) only one can be set
  • typically all are zero, for best-effort service
  • DiffServ proposes to use TOS for IP QOS

21
IP Packet Header (4)
  • Total Length of datagram, in bytes
  • Max size is 65535 bytes
  • Identification uniquely identifies each datagram
    sent by a host
  • Used for fragmentation and reassembly

22
IP Packet Header (5)
  • Flags Fragment Offset for fragmentation
  • Time To Live upper limit on routers that a
    datagram may pass through
  • Initialized by sender, and decremented by each
    router. When zero, discard datagram. Stops
    looping

23
IP Packet Header (6)
  • Protocol IP needs to know to what protocol it
    should hand the received IP datagram
  • demultiplexes incoming IP datagrams into either
    UDP, TCP, ARP,

24
IP Packet Header (7)
  • Header Checksum calculated only over header
  • At sender, set to 0. Compute ones complement
    16-bit sum. Insert 16-bit ones complement of
    this sum.
  • At receiver, compute 16-bit ones complement sum
    of header should be all 1s. If not, discard

25
IP Packet Header (8)
  • Source and Destination IP address 32 bits long
    each
  • Often see written like, 12.244.92.161
  • 127.0.0.1 is localhost loopback address, i.e.
    yourself
  • Various classes of IP addresses

26
IP Addressing
  • Destination address is the key to packet routing
  • IP routers only look at where the packet is
    headed, rather than where it came from
  • Source address is useful
  • At receiver, to decide whether to accept incoming
    packet
  • At receiver, to send acknowledgement back to
    sender, e.g. TCP sends its acknowledgements
  • IP address is per interface, so a given router
    with N interfaces can have N IP addresses

27
IP Addressing (2)
  • IP addresses are hierarchical 12.244.92.161
  • Class A
  • Class B
  • Class C
  • Hierarchy to handle WANs, MANs, and LANs
  • Class C allows for only 256 local hosts, but 221
    Class C networks for small office nets
  • Class A allows many 224 local hosts, few 27
    networks

7
24
0
Network
Host
14
16
1
Network
Host
0
21
8
1
1
0
Network
Host
28
IP Addressing (3)
  • Classes impose fixed-size network sub-fields that
    may not suit an organizations needs gt waste
    much address space
  • Phase out fixed classes A, B, C
  • Solution classless routing, or Classless
    Interdomain Routing (CIDR), 1993
  • Network sub-field can have any number of bits
  • a.b.c.d/x is CIDR notion for an IP address
    a.b.c.d with first x bits as network address

29
IP Addressing (4)
  • Assigning IP addresses
  • Automatically via Dynamic Host Configuration
    Protocol (DHCP) well study it later
  • Manually
  • Contact your ISP
  • an organization contacts its ISP for a block of
    allocated IP addresses
  • An ISP contacts one of several well-known global
    registries (originally managed by IANA alone)
  • 4 billion possible addresses
  • Running out?
  • NAT (Network Address Translation) ease the
    pressure well study it later
  • IPv6

30
IP Fragmentation and Reassembly
  • Fragmentation occurs when datagram exceeds MTU of
    underlying network
  • Ethernet MTU is 1500 bytes, FDDI MTU is 4500
    bytes
  • Identifier field uniquely identifies a datagram
    sent from a source
  • Set M bit in Flags field to one to indicate more
    fragments to follow
  • Set Offset to 0 for first fragment
  • For second fragment, set Offset length of data
    in first fragment
  • For Nth fragment, set Offset sum of lengths of
    data in N-1 fragments

31
IP Fragmentation and Reassembly (2)
  • For last fragment, set M in Flags field to 0, to
    indicate no more fragments
  • Each IP fragment is a full-fledged datagram
  • Reassembly
  • Fragments can be lost
  • After waiting a reasonable amount of time, an
    IP end host will stop reassembly
  • To avoid this waiting delay due to lost
    fragments, the sending host should perform path
    MTU discovery prior to sending IP packets, and
    then send at the MTU of the path

32
Address Resolution Protocol (ARP)
  • How does IP sends its packet over Ethernet?
  • Ethernet doesnt understand 32-bit addresses
  • Need to map 32-bit to Ethernets physical
    48-bit addresses
  • Each host builds a cache that maps IP addresses
    to Ethernet addresses distributed, not
    centralized
  • If sending to a host on the same Ethernet,
  • First, check cache if address already present
  • If not, send an Ethernets broadcast query (all
    1s in 48-bit address), frames Type field set to
    ARP
  • Query contains target IP address, and link
    layer address of sending host

33
Address Resolution Protocol (2)
  • Each host receives broadcast query and checks to
    see if target IP address matches its own
  • If match, sends a response to link-layer address
    of originator, containing its own link-layer
    address
  • When another host hears an ARP request
  • If requester is in cache, then refresh its own
    cache
  • Entries in ARP cache time out every 15 min
  • If requester is not in cache
  • If host is target, then add to cache
  • Otherwise dont add to cache, to keep ARP table
    clean
Write a Comment
User Comments (0)
About PowerShow.com