Transmission
Protocol
(4.9.4)
TCP/IP
Stack
Communicate?
Devices connected via WiFi, Ethernet, ADSL, F-O, UHF, Satellite etc; LAN traffic handled by switches, Internet traffic
handled by routers; network devices work together to find optimal path; need to cope w/ 'lost' data, cope w/ congestion
or broken link redirection, encryption/decryption, new technology integration, range of different media sent
Protocols - rule set, designed for particular task, allows new technology working alongside existing protocols (2G, 3G...)
Protocol Stack
Appropriate protocols transform application data into
bits encoded into 'media' (optical, radio, electrical), w/
reverse happening the other end; Series of functional
layers: Application >>> Transport >>> Internet >>> Link
OSI seven layer model - US Gov, Department of Defence
split functionality to 7 layers; internet community chose to
merge, simplify operation standards; 2 most commonly used
protocols = TCP + IP >>> TCP/IP Stack
The 4 Layers
Application Layer - protocols for spec. applications
(HTTP - browser, SMTP + IMAP/POP3 - Email Client)
Transport Layer - breaks app data down to segments(TCP)/ datagrams(UDP), sequence no. given source, destination port no. added to header; ACK/Retrans.
Internet Layer - aka Network Layer, prepares packets for internet; source, destination IP addresses added
Link Layer - aka Data Link Layer, transport IP packets
across each individ. link for path between client & server
Networking protocols (Ethernet etc.) used
Encapsulation
Wha
Layers accepts data from layer above, adds some info to carry out task, may process data (encrypt etc.), data from above may trigger messages to receiver (init. setup messages for encrypt method); receiver does process in reverse - accept data from below, removes info added
by the corresponding layer; only final layer sends data,
data for each layer transmitted using layers bellow
This modular communication is encapsulation
Encapsulation/Decapsulation
Encap - Each layer adds new envelope to data
Decap - Each layer removes an envelope from data
Some protocols require trailer (extra info added to end)
Data encap'd in header, trailer = payload; data added:
Application >>> Application Data (HTTP, SMTP, FTP...)
Transport >>> Segments (TCP...), Datagram (UDP)
Internet >>> Packets (IP Packets...)
Link >>> Frames (Ethernet Frame...)
TCP/IP
Layers
Application Layer
Each type of application you use linked to diff.
protocol; browser comm. w/ web server - HTTP/S
Email client to send an email - SMTP; protocols implemented as procedures etc; multiple apps
comm' w/ corresponding App layer protocol(s)
Protocols specify control msg to app at other end,
to set up comm's, agree parameters; data formatted,
protocol then sends termination msg, cleanly end comm's
Setup >>> Ready <<< Passwords >>> OK <<<
Data >>> OK <<< Finished >>>
Internet/Network Layer
Receives segments/datagrams from transport layer,
only cares about encap'ing to be routed across internet
Originally IPX, IP, Apple Talk, XnS, IP dominated others,
became 'de facto', Transport Layer segment encap'd by
protocol for IP packets; 2 most important pieces of header
are source/destination IP, destination address link'd to DNS
Internet Protocol (IP) - connectionless service, no guarantee of delivery, 'end-to-end' ACK + retrans. is TCP responsibility
Link/Data Link Layer
Operating System chooses appropriate link (4G, WiFI etc.),
device can dictate which medium tho; then protocol created
Ethernet - most common protocol, Network layer encap'd
in E.net frames (packet) for transport; used on most LANs
Header contains source/destine, type field for payload,
MAC Address (Media Access Control) - unique to
spec. NIC, MAC Address physically tied to hardware
= hardware/physical address; encap/decap w/ each link,
(protocol can change w/ new link type) protocols encode
bits in signals
Transport
Layer
What?
Transmission Control Protocol + User Datagram Protocol
Segmentation - app data split into chunks/segments
MSS - Max Segment Size, TCP Segments = TCP Packets
Each segment has header + payload
Reliability
Provides reliable/unreliable delivery service,
Due to 'end-to-end' internet design principle, impossible
to guarantee no data loss; dealt w/ depending on if
reliable/unreliable service used
Transmission Control Protocol (TCP)
Many internet apps need complete data, no errors,
TCP ensures this - assigns sequence no. to packets (header)
receiver sends ACK of packets, no ACK = resend
Delays, extra process time means no use in real-time app.
User Datagram Protocol (UDP)
Speed of data trans. most important criteria, app can tolerate
data loss, 'unreliable' protocol used (e.g. FaceTime, Skype)
data loss results in missing frames etc.
Ports
Port Number - to make sure data delivered to correct
application - client/ephemeral port no. randomly allocated
from bank of numbers on client device; app server 'listens'
for requests on spec. port, using "well-known port numbers"
Source/Destine port no. added to header; when received
source + destination ports swapped; uniquely gen'd port
for each client request (multiple browser), swapping allows
for ID of exact process making original request
Sockets
TCP end point, combination of IP address + port no.
Socket persists thru duration of connection, like serial cable;
Server handles multiple concurrent sessions, up to 65,534 connections per host (for unique IP + 16-bit port number)
Facilitates Async comm' - only one device comm at a time,
each session (browser tab) allocated port number to comm
w/ relevant server; add IP address to port no. for corresponding sockets
Well-Known Port Numbers
20 >>> FTP (Control) - File Transfer
21 >>> FTP (Data) - File Transfer
22 >>> SSH - Secure Remote Access
25 >>> SMTP - Mail Transfer
80 >>> HTTP - Website Access
110 >>> POP - Mailbox Access
143 >>> IMAP - Mailbox Access
443 >>> HTTPS - Secure Website Access
Domain
Name
System
Uniform Resource Locators (URL)
Every internet host needs unique IP
Every resource internet-accessible needs URL
Specifies location + protocol, location = internet host,
file name, path to find file; Scheme - Protocol,
specifies syntax needed w/in remainder of URL
Fully Qualified Domain Name (FQDN) - indicate
position of host relative to root of internet
Domain Names - hierarchical system, top to bottom
= right to left; subdomain ID's authority providing resource
to the right of subdomain; subdomain can also be unique IP comp, or path to route web traffic for specific folder to another host; hi-vol requests = subdomains map onto
spec. hosts to ensure load balance across many servers
Longgg URL
Path - provides path that needs to be followed to access
resource, end of path has file name
ftp://ftp.funet.fi/pub/standards/RFC/rfc1738.txt
funet.fi >>> domain name
ftp.funet.fi >>> FQDN
pub/standards/RFC/rfc958.txt >> path
Domain Name Hierarchy
Root >>> Top-level domains (TLD) >>> etc.
Root - dot following domain name (implied, rarely written)
Root (.) >> uk >> ac >> cam >> www = www.cam.ac.uk. (FQDN)
TLD - appears in URL to RHS of Domain Name
Until 2015 - TLD given to countries, categories, large org's
2015 - many more top-lvl domains created, each managed
by internet registry, many have restrictions
Some TLD divided by admin (uk has ac, co, gov)
Internet Registries
Smooth-running internet requires high standards
ICANN (Internet Corporation for assigned names & numbers)
Coords assign of domain names, IPs, port no.; delegates management of each TLD to internet registry; 'wales', 'bbc',
'london', 'uk'; Internet registry maintains who owns spec. domain; UK domains registered for 1-10 yrs before renew
Each register can be queried thru WHOIS protocol
Registrars - commercial org's that help individ/org's to
secure, register domain name; work w/ +1 TLD registries;
Registrar directs query of Domain Name to WHOIS service
of associated registry\
Domain Name Servers
Official register includes details of domain's auth name server
Hyperlink, typed URL don't have IPs, provide means of getting
IPs; Registrar can provide hosting services - website must
be hosted on web server w/ IP associated w/ domain name,
finds auth name server to complete domain registration,
if IP changes, authoritative (auth.) name servers updated
Web cache - for web page recent vist, proxy server, http header has cache control directives, ISP copies; DNS lookup - find new web page copy (force clear cache updates web page), get IP address of host to be sent request for web page (some info may already be cached)
DNS Lookup
Recursive name server - location config in local network, ISP
-first lookup root servers, relevant TLD name server returned
-TLD server contacted for assoc. auth. server
-recursive name server contacts auth name server for IP
-recursive server returns IP to client
Thin Vs.
Thick Client
Thin Vs. Thick
Thin - device w/ ltd memory, 2nd storage, processing
More processing done server-side, cloud storage etc.
Cheaper, upadted software, secure, company support
Requires internet & Large bandwidth