router
transatlantic cable
JANET LAN
US backbone
Model Layers
open systems interconnection (international standards office) transmission control protocol/internet protocol
Physical layer
Think "wires in the ground". This is the physical hardware of the internet. Wires/optical cables/wireless links and other technologies provide a way for transmission of raw bits (0s and 1s). Routers and switches connect these cables and direct the traffic.
routing.
Deals with the question "where do I go next to get to my destination?" Ensures packets get from source A to destination B.
Transport Layer
Accepts data splits it into packets. Ensures a connection between source and destination. If necessary ensure that connection is lossless (resend missing data). Provides flow control if necessary (send data faster or slower depending on the network conditions).
Provides extra functions which are used quite often. E.g. exchange of character strings.
Application layer
The computer programs which actually do things with the network. For example, your email program which will talk to the email server at the other end. At this layer, we have many protocols (http, snmp, smtp, ftp, telnet) which different bits of software use. We often talk in terms of client and server architecture for the software.
IP Networks(1)
IP addresses use less significant bits first to indicate sub-networks. IP address: 123.45.67.89 Netmask:255.255.255.0 If two IP addresses are the same when bitwise ORd against the inverse (bitwise NOT) of the netmask then they are on the same subnet 123.45.67.?? is always on the same subnet in the above example.
IP Networks(2)
IP networks were originally subdivided into class A, B, C, D and E networks.
Start End
127.255.255.255
191.255.255.255 223.255.255.255 239.255.255.255 247.255.255.255
Networks
Hosts/network
A
B C D E
1.0.0.0
128.0.0.0 192.0.0.0 224.0.0.0 240.0.0.0
126
16,382 2 million Multicast Reserved
16 million
64K 254
The IP header
IP packets all have a header as shown
IPv6
IPv4 allows over 4 billion computers (but not really) inefficient subnetting is using these up. IPv6 allows 16 octet addresses (4 octets in IPv4). 3x1038 addresses (> Avogadros number). 7x1023 IP addresses per square meter of the earths surface. Why so many? Electrical devices may want IP addresses your house could be its own subnetwork. Why NOT have so many?
IPv6(2)
Better security than current IP(v4). Allow roaming hosts. Permits the old and new protocols to co-exist. Pay more attention to type of service (for real time data).
Answer
DNS(2)
net
generic/US national TLDs (Top Level Domains) com org gov mil jp uk
sun vnvnation www www york ac co ic
nl
org
musicnonstop doc www
eng
manor
src
DNS (3)
Routing Tables
How do packets know where to go? This problem is known as routing. The oldest (and easiest) solution is static routing. Each computer has a table saying where to go to get to each other computer. On a Local Area Network (LAN) list all machines on your subnet and the address of the external router for everything else. Most machines only need to know how to get to their nearest router.
Dynamic Routing
Distance Vector Routing (Bellman-Ford) Each router stores a distance metric to various network locations. Routers exchange routing packets periodically to update their route information (routing table). Each router measures how far their neighbours are away and learns how far the neighbours are from various destinations.
Routing problems
A 1 1 D
Iteration 1
1 1 C
The count to infinity problem. 1) All links cost 1. 2) Link C-D breaks. 3) What happens?
Assumed Cost to D
From B 2 (via C) From C 1 (direct)
From A 2 (via C)
2 (link breaks)
3 4 etc
3 (via B)
4 (via B) 5 (via B or C) etc
3 (via A)
4 (via A) 5 (via A or C) etc
Infinity *
4 (via B or A) 5 (via B or A) etc
User configured services (your Half-Life server?) will listen on high numbered ports which are usually left open to all users.
UDP data
User Datagram Protocol the header is shown below. Length and checksum are as for IP.
About UDP
Provides a lossy connection (data may vanish). Does not guarantee packets are delivered in order. Useful for real time applications. (It is no use having your Quake III information arriving correctly but ten seconds late). UDP applications can implement their own packet loss checking but it is best to use TCP for this.
About TCP
TCP provides a lossless connection (or flags an error when losses occur). Data packets are given an order and can be reassembled. TCP provides some limited congestion control. TCP is most useful for applications where data validity is important but real-time is not critical (email, www, ftp). TCP packets are part of a TCP session.
TCP connections
This diagram shows the start of a TCP connection.
A sends packet X with SYN. Hello I would like to talk. B sends a SYN, ACK pair I got your message. I would also like to talk A sends an ACK (and some data) I got your message, here is some data.
TCP mechanisms
The window size is the number of outstanding (unacknowledged) packets that that a TCP session can send. The window size provides a crude method for congestion control. The window size increases to allow more packets to be sent (it increases throughput). If a packet is lost then the window is reduced again.
Threshold
Threshold Transmission no
ICMP
Internet Control Message Protocol packets are used for various control purposes. Here are some common ones: Time exceeded: TTL hit 0. Echo request: Can you hear me out there? Echo reply: Yes I can hear you. Source Quench: Stop sending so much data. Timestamp request/reply (as echo but with times).
Ping is a first test if a computer is networked. We can even measure the speed of light using ping. http://xxx.lanl.gov/abs/physics/0201053 Hacking makes it increasingly unused.
Traceroute
Traceroute neatly combines ping and the TTL flag to get a route to a computer. If the TTL is one the the packet will die after one hop. ICMP will return a Time exceeded flag. This will tell us where the first hop of our journey is. Increase the TTL by one to find the next hop.
Dav eat
e, Gr to s
Dav
Get first Add IP hop from header to routing table front of that Send the first packet to its first hop And so on for further hops.
Destination gets packet and returns ACK Start sending rest of data