Types of networks Not intended as a reliable source for
all information or as something to be
PAN: Personal Area Network depended upon.
LAN: Local Area Network
CAN: Campus Area Network
MAN: Metropolitan Area Network
WAN: Wide Area Network
ISPs: Internet service providers -> end systems access the internet through it.
DSL: Digital Subscriber Line
DSLAM: Digital Subscriber Line Access Multiplexer
FDM: Frequency Division Multiplexing -> different channels transmitted in
different frequency bands
TDM: Time Division Multiplexing
GSM: Global System for Mobile communication
DDoS: Distributed Denial of Service
URL: Uniform Resource Locator
URI: Uniform Resource Identifier
P2P: Peer to peer
IP: Internet protocol
CDN: Content Distribution Network
FSM: Finite State Machine
RDT: Reliable Data Transfer
RTT: Round Trip Time -> time for a small packet to travel from a client to server
and back
Application layer protocols
HTTP: Hypertext Transfer Protocol >> stateless
FTP: File Transfer Protocol
SMTP: Simple Mail Transfer Protocol >> use persistent connection
POP: Post Office Protocol
IMAP: Internet Mail Access Protocol
SSL: Secure Socket Layer > to secure transferred data packets at the application
layer.
Transport layer protocols
TCP: Transmission Control Protocol
UDP: User Datagram Protocol
DNS: Domain Name System -> performs at application layer
Types (hierarchies) of DNS servers
HOL: Head of the line
CIDR: Classless Inter Domain Routing
PPP: point to point protocol
LLC: Logical Link Control
MAC: Media Access Control
CRC: Cyclic Redundancy Check
CRLF: Carriage Return/Line Feed (SMTP uses it)
DASH: Dynamic, Adaptive Streaming over HTTP (consuming bandwidth efficiently)
Port numbers
80: HTTP server
25: mail server
HTTP response codes
200 > OK
301 > moved permanently
400 > bad request
404 > not found
505 > HTTP version not supported
HTTP request message methods
GET
Open web page
POST
Web page often includes form input
Input is uploaded to server in entity body.
HEAD
Asks server to leave requested object out of response
DELETE
Delete files specified in URL field.
Both TCP and UDP doesn’t
support data encryption
Transport layer protocols
Computing devices:
o Traditional
o Non-traditional
Switches -> used to transfer packets between the one network
Routers -> used for forwarding packets between different network.
Access network: communication network that connect end user devices to
the internet
o Types of access network:
Digital Subscriber Line (DSL)
Institutional or Enterprise Access Networks (Ethernet)
Mobile Access Networks
Mobile Access Network
o Different devices are connected wireless to the base-station that
transmit digital data (electro-magnetic radio waves) to the router.
Physical media could be guided or un-guided:
o Guided -> signals propagate in solid media such as: twisted pair
copper, fiber optic.
o Un-guided -> signals propagate freely, such as: electro-magnetic
radio waves
Electro-magnetic radio waves: signal carried in electromagnetic spectrum
without wires. Used in wireless LAN (e.g., WiFi) and wide-area (e.g.,
cellular)
o Disadvantages:
obstruction by objects
interference
In packet switching:
o Store and forward: entire packet must arrive at router before it can
be transmitted on next link
o Queue and loss: if arrival rate to link exceeds transmission rate of
link for a period of time:
packets will queue, wait to be transmitted on link
packets can be dropped (lost) if memory (buffer) fills up
network congestion (overloading) leads to network delay and packet loss
o network delay: when size of queue is large, and each packet has to
wait until its delivery
o packet loss: when network discard some packets cuz the queue
reached its max capacity
Internet Protocol Stack:
ISO/OSI model:
Which layers needed in each component?
o Source + destination -> has all 5 layers.
o Switch -> only physical and link
o Router -> physical, link and network
Application layer programs run on end systems BUT network-core devices
(routers and switches) do not run user applications
Process communication:
o In Client-server model:
client process: process that initiates communication.
server process: process that waits to be contacted.
o In Peer-to-peer model:
applications with P2P architectures have client processes &
server processes.
Process sends/receives messages over different hosts to/from its socket.
Sending process relies on transport layer to deliver message to socket at
receiving process
Application requirements:
Data integrity Timing Throughput
security
(data loss) (transmission rate) (data transfer rate)
Secure Socket Layer [SSL] at application layer >> to secure transferred data
packets
o SSL protocol supports:
Provide encrypted TCP connection
Data integrity
End-point authentication
Host name is translated to IP address using Domain Name System (DNS)
Each object in the web page is addressable by a Unified Resource Locator
(URL)
Cookie -> small piece of data that a server sends to user’s web browser
Cookie is a way to solve the HTTP stateless feature.
Proxy server > server application that provides a gateway between users
and the internet > satisfy client request without involving origin server
HTTP > [application layer protocol]
HTTP is stateless >> server has no information about past client requests.
TCP 3-way handshake:
o Client initiate TCP connection (create socket) to server at port 80.
o Server accepts TCP connection from client.
o HTTP messages exchanged between HTTP client and server.
Round Trip Time (RTT) > time for small packet to travel from client to
server and back
RTT = 2 * propagation time
Total Time = initial request time + web page objects time (persistent or
non)
Initial request transmission time = 2RTT -> one for TCP connection request
and on for HTML base file
HTTP connections:
To get web page objects time:
o Non-Persistent:
Without parallel connection:
Each object takes 2RTT
With parallel connection:
Sending multiple objects in parallel connection each
connection takes 2RTT
o Persistent:
Non-Pipelined:
1RTT for each object
Pipelined:
1RTT for all objects
Components of electronic mails:
User agents
Mail servers
Simple Mail Transfer Protocol (SMTP) (application layer protocol
Direct transfer > sending and receiving emails on the same mail server.
SMTP:
Uses persistent connections
It messages is written in 7-bit ASCII
Uses Carriage Return/Line Feed (CRLF) > to determine end of
message.
Used for sending and storing to receiver’s mail server.
Email Access protocols > used for retrieving emails from server
Examples of email access prot.
Post Office Protocol. (POP)
Internet Mail Access Protocol (IMAP)
HTTP: gmail, Hotmail
How to consume bandwidth efficiently? >> DASH
o DASH: Dynamic, Adaptive Streaming over HTTP
o CDN: stores copies of content at CDN nodes
Transport layer
Provides logical communication between application processes running on
different hosts.
Responsible for data transfer between processes.
Runs in end systems
o Client side:
Breaks app messages into segments then passes them to
network layer.
o Server side:
Reassembles the received segments into messages then passes
them to the application layer
Transport layer functionalities:
Multiplexing and de-multiplexing
Reliable data transfer
Flow control
Congestion control
Transport layer protocols:
UDP: connectionless/unreliable
TCP: connection-oriented/reliable
Network layer: logical communication between hosts.
Transport layer: logical communication between processes.
Connectionless multiplexing >> server receives all data segments with
same destination port number even from multiple hosts/clients (different
source IP addresses) on the same server socket.
- No need to open socket connection to each client, one server socket for
all clients.
Connection oriented de-multiplexing >> server receives data segments on
different server sockets from multiple hosts/clients.
TCP socket identified by 4-tuples:
IP address + port number for source.
IP address + port number for destination.
UDP: User Datagram Protocol:
Is connectionless which means:
o No handshaking between UDP sender and receiver.
o Each UDP segment handled independently of others (no order in
delivery)
o Unreliable data transfer protocol.
How to ensure reliable data transfer? -> checksum
UDP checksum > detecting errors in transmitted segment.
o Algo:
[Link]
AtVWnyDDaDI&t=63s
Network layer:
Transport segments from sender to receiving host.
On sending side, encapsulates segments into datagram
On receiving side, delivers segments to transfer layer.
Network layer protocols in every host and router
Forwarding: move packets from router’s input to appropriate router using
data plan
Routing: determine route taken by packets from source to destination
using control plan
Per router individual plane > individual routing algorithm components in
each and every router interact in the control plane.
Logically centralized control plane > a distinct controller (typically remote)
interacts with local control agents (CAs)
Interface -> connection between host/router and physical link.
Subnet -> device interfaces with same subnet part of IP
o These interfaces can reach each other without interleaving router.
data-link layer -> has responsibility of transferring datagram from one
node to physically adjacent node over a link
o node -> hosts and routers
data link layer functions:
o Farming:
Takes packets from network layer and encapsulates it into
frames, then sends each frame bit-by-bit on the hardware.
At receiver’s side data link layer picks up signals from hardware
and assembles them into frames.
o Addressing:
provides hardware addressing mechanism. Hardware address
is assumed to be unique on the link
o Error Control:
Sometimes signals may have encountered problem in
transition and the bits are flipped. These errors are detected
and attempted to recover actual data bits:
Error detection: errors caused by signal attenuation,
noise.
Error correction: receiver identifies and corrects bit
error(s) without resorting to retransmission
o Flow Control:
Stations on same link may have different speed or capacity.
Data-link layer ensures flow control that enables both
machine to exchange data on same speed.
Data link layer is divided into two sub layers:
o Logical link control – LLC:
Deals with multiplexing, the flow of data among, and providing
error messages and acknowledgments as well.
o Media access control – MAC:
Responsible for hardware addressing mechanism (addressing
frames) and also controls physical media access.
Types of error:
o Single-bit Error:
when one bit of given data unit is changed from 1 to 0 or vice-
versa
o Burst Error:
When two or more bits in the data unit have changed from 0
to 1 or vice-versa.
Error detection methods:
o Check sum.
o Simple parity check/one-dimension parity check:
Drawback:
can only detect single-bit errors which are very rare.
o Two-dimensions parity check:
Also used error correction.
o Cyclic redundancy check – CRC.
a: average packet arrival rate