Lecture Notes for Client-Server Interfaces

23 January 2002 - The IP Protocol Set


  1. purpose - a network that

    1. is robust in the presence of partial failures

    2. is scalable and autonomous

    3. supports interoperability and resource sharing

  2. history -

    1. paul baran at rand, 1964 - survivable communications

    2. donald davies at npl, 1965 - the packet

    3. robert kahn at bbn-mit, 1969 - successful response to arpa's rfp

  3. structure - the great cloud

    1. hosts connected to an internet

    2. addressing

      1. addresses are 32-bit unsigned integers - dotted quad

      2. an ip address has two parts - network id + host id

      3. five address classes - a through e

        1. a through c - network id size

        2. d - 28-bit group id

        3. e - unstructured

      4. an ip address references an interface, not a host - a host may have more than one ip address (routers, gateways); multi-homed hosts

      5. dotted-quad notation - a.b.c.d

    3. naming - from ip address to more convenient names

      1. www.monmouth.edu = 204.152.149.5

      2. a three-part hierarchy - domain (.edu), organization (monmouth), host (www); organizations may establish more levels

      3. fully-qualified domain names

      4. name resolution - translating between host names and ip addresses

      5. the ip protocols don't understand host names

  4. the internet protocol - ip

    1. a datagram protocol - message oriented

    2. unreliable service - best-effort delivery; packets may get lost, be corrupted, be delivered out of order

    3. connectionless

  5. the user datagram protocol - udp

    1. ip multiplexed in the host; unreliable, connectionless

    2. a 16-bit, unsigned port number

      1. ports 0 to 1023 - well-known ports; echo (7), telnet (23), www (80)

      2. ports 1024 to 49151 - registered; license managers (autodesk - 1422); database connects (sybase - 1498)

      3. ports 49151 to 65535 - dynamic

      4. see /etc/services

    3. an endpoint address - an (ip address, port number) pair; ip:pair

    4. full duplex - can communicate in both directions over the same connection

  6. the transmission control protocol - tcp

    1. a reliable byte stream protocol

      1. byte stream - not message oriented

      2. reliable - bytes put in one end come out the other end; the meaning of reliable is tricky

    2. connection-oriented

    3. tcp is multiplexed by port numbers too - the same port address space

    4. full duplex

  7. the internet control message protocol - icmp

    1. out-of-band, network oriented messages

      1. network errors - host unreachable, invalid port numbers

      2. congestion control - source quench

      3. trouble shooting - echo

      4. interrupted transport - expired ttl, no fragment failure

      5. see rfc 792

    2. uses ip

  8. implementation

    1. a network of networks - transport level networking

    2. a five-level protocol stack - physical, data-link, network (ip + icmp), transport (tcp + udp), application (mail, www)

    3. ip, udp - pretty much the same and easy; receive, demultiplex (for udp), deliver

    4. tcp - hard

      1. set-up

        1. establish a connection between two endpoints; agree to various parameters (sequence number, maximum segment size)

        2. the legendary three-way handshake - latency; the syn bit

      2. communication

        1. two main requirements - reliability and congestion control

        2. reliability - the proper bytes in the proper order; sequence numbers

          1. each byte is tagged with a sequence number - conceptually, anyway

          2. each receiver returns to the sender the largest sequential sequence number received - the acknowledgment or ack

            1. received at the receiver, not delivered to the application

          3. reliability comes from time-outs and retransmissions - so does wretched performance

          4. reliability must deal with out-of-order delivery, lost packets, greatly delayed packets

        3. congestion control - at the hosts (flow control) and in the network (congestion control)

          1. windows - advertised buffer space; window size; a surprisingly flexible approach

          2. flow control

            1. receiver window - how much willing to receive; part of the tcp packet header

            2. sender window - how much able to send

          3. congestion control - drive the network to the edge of performance, but not over

            1. two issues - ramping up and staying put

            2. staying put - additive increases, multiplicative back-offs

            3. ramping up - slow start, multiplicative increases

        4. the point here is that data-stream delivery is herkey-jerkey

      3. tear-down

        1. duplex communication makes this counter-intuitive

        2. four-way handshake, two on each side; the fin bit

        3. must wait for packets to drain out of the network


This page last modified on 7 February 2002.