The Internet and IP
Network Applications
Dominant model: bidirectional, reliable byte stream connection
- HTTP client server
- BitTorrent peer to peer
- Skype
Abstracts away entire network -- just a pipe between two programs
The 4 Layer Internet Model
- Application: Bi-directional reliable byte stream between two applications, using application-specific semantics
- Transport: Guarantees correct, in-order delivery of data end-to-end. Controls congestion.
- Network: Delivers datagrams end-to-end. Best-effort delivery - no guarantees. Must use the Internet Protocol (IP)
- Link: Delivers data over a single link between an end host and router, or between routers.
Reuse is a big advantage of layering. Each layer provieds a service to above.
IP
Why is the IP service so simple?
- low cost to build and maintain.
- The end-to-end principle: Where possible, implement features in the end hosts.
- Allows a variety of reliable services to be built on
- Works over any link layer.
Time To Live (TTL)
- Ip doesn't guarantee loops won't happen, it just tries to limit the damage caused
- IP simply adds a hop-count field in the header of every datagram, called TTL.
- It starts at a number like 128 and then is decremented by every router it passes through.
- If it reaches zero, Ip concludes that it must be stuck in a loop.
The IP Service Model
- Datagram: Individually routed packets. Hop-by-hop routing.
- Urreliable: Packets might be dropped.
- Best Effort: but only if necessary
- Connectionless: No pre-flow state. Packets might be mis-sequenced.
Life of a Packet
Each router has a forwarding table, if there's no match for the destination address, it falls to the default link.
Packet Switching
Packet: A self-contained unit of data that carries information necessary for it to reach its destination.
Packet Switching: Independently for each arriving packet, pick its outgoing link. If the link is free, send it. Else hold the packet for later.
Packet switching has two really nice properties.
- The first is that a switch can make individual, local decisions for each packet. It just forwards packets. This greatly simplifies the switch.
- The second is that it lets a switch efficiently share a link between many parties.
Flow : A collection of datagrams belonging to the same end-to-end communication. e.g a TCP connection.
Packet switches don't need state for each flow - each packet is self-contained.
Efficient sharing of links Data traffic is bursty: rather than always sending and receiving data at a fixed rate, usage jumps and drops, goes up and down, over time.
This idea of taking a single resource and sharing it across multiple users in a probabilistic or statistical way is called statistical multiplexing.
Summary
Packet switches are simple: they forward packets independently, and don't need to know about flows.
Packet switching is efficient: It lets us efficiently share the capacity among many flows sharing a link.
Layering
- Each layer provides a welldefined service to the layer above
- using the services provided by layers below and its own private processing.
Reasons for layering
- Modularity
- Well defined service
- Reuse
- Separation of concerns
- Continuous improvement
- Peer-to-peer communications