Title: How the Internet works
1How theInternet works
- Peter Bagnall
- pete_at_surfaceeffect.com
- http//people.surfaceeffect.com/pete/
2Internet Definition
- Network
- A group of computers connected together to allow
data to be transferred between them. - Inter-network (aka internet)
- A group of networks connected together to allow
communications between machines on different
networks. - The Internet is the biggest example of an
internet.
3Circuit Switching
- Making a phone call via POTS (plain old telephone
system) - Once connected the whole conversation is
transmitted through the phone network using the
same route. - When the call ends the network can reuse that
route to provide service to someone else.
4Packet Switching
- Sending a message over the Internet.
- The message is broken into small pieces
(packets). - Each packet is then sent across the network on
its own. - Different packets may well go via different
routes.
5OSI Seven Layer Stack(Open Systems Interconnect)
Application
Defines the applications view onto the network
Provides translation between host formats, may
offer compression
Presentation
Provides sessions, and may offer some security,
typically encryption
Session
Provides virtual connections over a datagram
network
Transport
Defines network addressing of machines and
routing.
Network
Specifies communications between the machines
either end of a wire.
Data Link
Physical
Defines the cables, connectors, voltage levels
etc.
6OSI Seven Layer Stack(Open Systems Interconnect)
HTTP (HyperText Transfer Protocol), FTP (File
Transfer Protocol), SMTP (Simple Mail Transfer
Protocol), POP (Post Office Protocol)
Application
HTML (hypertext markup language), JPEG (joint
photographic experts group), GIF (graphics
interchange format), PNG (portable network
graphics)
Presentation
Session
SSL (secure socket layer)
Transport
TCP (transmission control protocol), UDP,
multicast UDP
Network
IP (internet protocol)
Data Link
Ethernet, RS423
Physical
Twisted Pair, RJ45
7Layer 1
Application
Presentation
Physical Layer
Session
Transport
Network
Data Link
Physical
8Cables!
Application
Presentation
Session
Transport
Network
Category 5 cable RJ45 connectors Used for
ethernet 10/100Mb
Data Link
Physical
9Layer 2
Application
Presentation
Data-Link Layer
Session
Transport
Network
Data Link
Physical
10Fundamentals of networking
- The trivial network, connecting two computers
together
Application
Presentation
Session
Transport
There needs to an understood coding scheme, or
protocol, for the two machines to be able to
understand each other. Part of the Ethernet
standard specifies a data-link protocol.
Network
Data Link
Physical
11Ethernet 10Base2 (cheapernet)
- Multiple machines all connected to a single bus.
Application
Presentation
Session
Transport
Network
MAC addresses - Media Access Control 0823F345E
D94
Data Link
Physical
12Ethernet 10/100BaseT (twisted pair)
- Multiple machines all connected to a single bus.
But a hub forms the bus.
Application
Presentation
Session
Transport
Network
Data Link
Physical
13Connecting Hubs
- Hubs can be connected to extend the bus still
further.
Application
Presentation
Session
Transport
Network
Data Link
But all this is still just Ethernet, and its
forming a single network.
Physical
14Layer 3
Application
Presentation
Network Layer
Session
Transport
Network
Data Link
Physical
15A simple internet - using the Internet Protocol
(IP)
- Each machine now needs an address unique in the
entire internet. These are IP addresses.
Application
Presentation
Session
Transport
Network
Any blue machine can see (but generally ignores)
all packets within the blue network. But it cant
see packets inside the yellow network
Data Link
Physical
16Aside Routers (in English)
- Pronounced Rooter (not Rowter)
17A simple internet
- The router is a member of each network. It has
two IP addresses, one for each interface
Application
Presentation
Session
Transport
Network
The router forms a gateway into the rest of the
internet. When you specify a gateway address,
this is what youre talking about.
Data Link
Physical
18A simple internet
- Routers may have many interfaces. They know which
way to send packets for every machine in the
network, by maintaining routing tables.
Application
Presentation
Router
Session
Transport
Network
Network
Data Link
Physical
19Subnets and Routing Tables
- IP addresses are not just simple numbers, they
have some structure. - They are 4 byte numbers, (ie 32bits), typically
written like 64.194.26.53 - Machines in the same subnet will have similar IP
addresses. - 64.194.26.54 and 64.194.26.53 are on the same
subnet.
Application
Presentation
Session
Transport
Network
Data Link
Physical
20Subnets and Routing Tables
- Routers maintain tables of subnet addresses, like
64.194.26.xxx and the interface to use to send
packets to that subnet.
Application
Presentation
Session
Transport
Network
Data Link
Physical
21Where does this get us?
- Now we have a way of sending packets from one
machine anywhere on the network to any other. - But there are problems still. Networks frequently
get congested. - Easily solved, routers just drop any packets they
cant cope with. - So IP is an unreliable datagram network.
Application
Presentation
Session
Transport
Network
Data Link
Physical
22Layer 4
Application
Presentation
Transport Layer
Session
Transport
Network
Data Link
Physical
23Virtual Connections
- Unlike the phone system packet networks do not
set up a connection through the network for the
duration of a communication. - Transmission Control Protocol (TCP) creates
virtual connections, manages recovery from lost
packets, and makes fair, efficient use of the
network. - Buzzwords
- Reliable communication, Flow-control,
- Multiplexing, Connection-oriented Communication,
- Full-duplex, Process-to-process connections.
Application
Presentation
Session
Transport
Network
Data Link
Physical
24TCP - the most important protocol
Application
Presentation
Session
Transport
T1 line 1.5Mb
Piece of wet string 45kb
High Bandwidth LAN connection 10Mb
Network
Data Link
Physical
25The iMac requests info from the cube
Application
Presentation
To establish a virtual connection the iMac opens
a port and sends packet 1 to the cube. The cube
receives the packet and sets up a connection at
its end. It then sends an acknowledgement of
packet 1.
Session
Transport
Network
Data Link
Physical
26Establishing a connection slow start
Application
Presentation
The congestion window defines how many packets
are on the fly at once. Each time the cube gets
an acknowledgement packet it increments the
congestion window. Upshot the congestion window
rises exponentially.
Session
Transport
Network
Data Link
Physical
27Establishing a connection slow start
Application
Presentation
Session
Transport
Network
Data Link
448 and so on...
Physical
28Saturated Network
Application
Presentation
8
Session
Transport
Network
And now TCP moves into steady state mode. If more
packets are lost TCP will reduce the congestion
window.
Data Link
Physical
29Steady state
Application
Presentation
The packets that were lost are retransmitted
after a timeout. From now on, every now and
again TCP tries to increase its congestion
window. So if the network becomes less congested
TCP will take advantage of it.
Session
Transport
Network
Data Link
Physical
30TCP and other protocols
Application
Presentation
TCP is vulnerable to UDP traffic. UDP does not
set up a connection. It has no flow control, and
therefore can flood a network. TCP backs off
when it detects congestion, UDP doesnt.
Session
Transport
Network
Data Link
Physical
31TCP and other protocols
Application
Presentation
UDP is commonly used by streaming video and
audio. The conflict between UDP and TCP has been
a hotly debated issue at the IETF over recent
years. Multicast also causes problems since it
behaves much like UDP. But here one machine can
flood entire networks on its own!
Session
Transport
Network
Data Link
Physical
32Layer 5
Application
Presentation
Session Layer
Session
Transport
Network
Data Link
Physical
33SSL - Secure Socket Layer
- What is security?
- Confidentiality
- Authentication
- Membership Criteria
- Permission
- Privacy (anonymity)
- Tamper Proofing
- Service availability
- Non Repudiation
- Retransmit prevention strength (eg CD copying)
- Collusion prevention
- Fairness
Application
Presentation
Session
Transport
Network
Data Link
Physical
34SSL - Secure Socket Layer
- Types of encryption
- Symmetric Key Cryptography
- shared secrets
- Public Key Cryptography
- public and private key pairs
Application
Presentation
Session
Transport
Network
Bob
Alice
Data Link
Eve
Physical
35SSL - Secure Socket Layer
- The trouble with symmetric key crypto
- How do you get the key shared between two
machines on the net. - You cant send it over the net, cause Eve will
see it too. - But if you ever did manage to get a shared secret
this would work just great. - Buzzwords One-time pads, park benches.
Application
Presentation
Session
Transport
Network
Data Link
Physical
36SSL - Secure Socket Layer
- The solution?
- Public key crypto!
- With this form of cryptography you make two keys.
Any message encrypted with one key can only be
decrypted with the other key. - So you keep one key private, and publish the
other. Now people can send you messages encrypted
with your public key, and only you can read them.
Application
Presentation
Session
Transport
Network
Data Link
Physical
37SSL - Secure Socket Layer
- The problem?
- Public key crypto is very compute intensive.
- Symmetric key crypto is much much cheaper in
terms of computing resources. - In practice public key crypto is just too slow to
use.
Application
Presentation
Session
Transport
Network
Data Link
Physical
38SSL - Secure Socket Layer
- So, Alice wants to give Bob a secret. Shes
worried that Eve is eavesdropping. - Alice creates a public/private key pair. She
sends Bob the public key.
Application
Presentation
Session
Transport
Network
Bob
Data Link
Alice
Physical
Eve
39SSL - Secure Socket Layer
- Now Bob can send Alice messages without Eve being
able to understand them. - So Bob makes a symmetric key, and sends it,
encrypted with Alices public key. Alice decrypts
it, and now they have a shared secret.
Application
Presentation
Session
Transport
Network
Bob
Data Link
Alice
Physical
Eve
40SSL - Secure Socket Layer
- The rest of the communication is encrypted using
the symmetric cipher using their shared secret
key. - And Eve cant read any of it!
Application
Presentation
Session
Transport
Network
Bob
Data Link
Alice
Physical
Eve
41Layer 6
Application
Presentation
Presentation Layer
Session
Transport
Network
Data Link
Physical
42Presentation Layer
- This defines the format of information being sent
back and forth. - Two classes of format exist, binary, and text.
- Binary formats, JPEG, GIF, MS Word, etc
- The issues are things like the data structure,
big or little endian (byte-sex) - Text formats, HTML, VRML, XML, UUencoded mail
- Issues - schemas, encoding
Application
Presentation
Session
Transport
Network
Data Link
Physical
43Layer 7
Application
Presentation
Application Layer
Session
Transport
Network
Data Link
Physical
44Application Layer
- Most prominent examples
- HTTP - hypertext transfer protocol
- FTP - file transfer protocol
- SMTP - simple mail transfer protocol
- POP - Post Office protocol
- NNTP - network news transfer protocol
- HTTP a demo!
Application
Presentation
Session
Transport
Network
Data Link
Physical
45Clients and Servers?
- In the normal course of events a server provides
a service, and a client uses that service. - The strict definition is a little more bizarre
though! - A server is a piece of software that waits to be
contacted by a client before doing something. - A client is always the one that starts the
conversation.
Application
Presentation
Session
Transport
Network
Data Link
Physical
46Port assignments
- Protocols may be defined at will at the
application layer. - Popular protocols like HTTP and SMTP are assigned
ports by ICANN (The Internet Corporation for
Assigned Names and Numbers) - HTTP servers (web servers) use port 80
- SMTP servers (mail servers) use port 25
- and so on
Application
Presentation
Session
Transport
Network
Data Link
Physical
47DNS - the domain name service
- DNS provides translation from human readable
machine names to IP addresses. - www.surfaceeffect.com 64.71.137.114
Application
Presentation
Session
Transport
Network
Data Link
Physical
48DNS - MX records
- DNS also provides mail exchange (MX) records.
These define which machine email should be sent
to for a domain. - anything_at_surfaceeffect.com ? walnut.he.net
- The DNS MX is used by mail systems to make sure
mail is sent to the right machine. There can be
several machines if you have a large number of
users in a domain.
Application
Presentation
Session
Transport
Network
Data Link
Physical
49Questions?
- Presentation will be
- online soon
- URL will be announced on the Yahoo! Group.
50References
- RFC 2729
- Taxonomy of Communication Requirements for
Large-scale Multicast Applications - http//www.ietf.org/rfc/rfc2729.txt
- FOLDOC
- Free online dictionary of computing
- http//www.foldoc.org/
51Physical Layer
Application
Presentation
IP Multicast
Session
Transport
Network
Data Link
Physical
52Advanced Networking - Multicast
- There is a specific range of IP addresses
reserved for IP multicast. 224.0.0.0 -
239.255.255.255 - Hosts may join a multicast group by sending a
request to their nearest router.
Application
Presentation
Session
Transport
Network
Data Link
Physical
53Advanced Networking - Multicast
- Once theyve joined they may send and receive
packets sent to that multicast address. - As packets go through routers the routers
replicate them sending them out off all relevant
interfaces.
Application
Presentation
Session
Transport
Network
Data Link
Physical
54Advanced Networking - Multicast
- IP Multicast is analogous to UDP, it offers no
reliability, and does not have any flow control
or connection. - Its good for streaming media.
Application
Presentation
Session
Transport
Network
Data Link
Physical
55Advanced Networking - Multicast
- Reliable Multicast schemes do exist. But theyre
not standardized yet, and still somewhat
experimental. - Even the MBONE is not deployed widely!
Application
Presentation
Session
Transport
Network
Data Link
Physical
56A brief history of the Net
- Parallel work at DARPA (1961-1967),RAND
(1962-1965), NPL (1964-1967) leads to a packet
networking concept, published by DARPA and NPL in
1967 - BSD Unix incorporated network code originally
developed at BBN (Bolt, Beranek and Newman) - US DoD mandated that suppliers implement TCP/IP
on their systems.
57Internet Related Organizations
- ISOC - The Internet Society
- IAB - Internet Architecture Board
- IETF - Internet Engineering Task Force
- IESG - Internet Engineering Steering Group
- IRTF - Internet Research Task Force
- IRSG - Internet Research Steering Group
- IETF and IRTF produce Internet-Drafts. These then
get approved and are published as RFCs (Request
For Comments).
58IETF Culture (quotes from www.ietf.org)
- Since attendees must wear their name tags, they
must also wear shirts or blouses. Pants or skirts
are also highly recommended There are those in
the IETF who refuse to wear anything other than
suits. Fortunately, they are well known (for
other reasons) so they are forgiven this
particular idiosyncrasy - The IETF is not a membership organization (no
cards, no dues, no secret handshakes -) - Welcome to the IETF
59Timeline of Internet Services
- Publication dates of key RFCs
- Telnet 1980 (telnet like services existed in
1970) - Mail 1973 (mail services existed in 1970)
- FTP 1971
- HTTP 1996 (the web first appeared in April 1994)