Remember kbps is kilo bits, kBps is kilobytes
Billions of connected computing devices
- hosts = end systems
- running network apps at internet's "edge"
Packet switches: forward packets (chunks of data) (moves packets)
- routers, switches
Communication links
- fiber, copper, radio, satellite
- Transimission rate is called the bandwidth
Networks
- Collections of devices, routers, links managed by an organization.
Internet: "network of networks"
- Interconnected internet service providers (ISP)
Protocols are everywhere
- which control sending, receiving of messages
- Example: HTTP(Web), streaming video, Skype, TCP, IP, Ethernet, WiFi, 4G
Internet standards (who define the protocols)
- RFC: Request for Comments
- IETF: Internet Engineering Task Force
Infrastructure that provides services to applications:
- Web, streaming video, email, games, e-commerce ...
Provides programming interface to distributed applications:
- hooks allowing sending/receiving apps to connect to, use the internet transport service
- provides service options, analogous to postal service
Frequency division multiplexing used in cables as well to send data on different frequenies.
- Hosts break application layer messages into packets.
- The network forwards packet from one router to the next, across links on path from source to destination.
Forwarding is a local action in the router, which looks up where the pack is going through a table.
Routing is a global action that routes the packet to the destination.
-
store and forward approach.
-
Queueing, when packets come faster than it can send. if the buffer is filled then packets can be lost.
-
Great for bursty data
- Reseverd end to end resources.
- Great for continuous data.
- FDM AND TDM
- Rate at awhich bits are being sent from sender to receiver. Can be instantaneous or average.
- Bottleneck link is the link on the end to end path that constrains the end to end throughput
- Always consider the bottleneck or the smallest bit rate for the throughput value.
- Time = filesize/throughput

- Transport layer encapsulates the application layer message M with a transport layer-layer header H_t to create a transport layer segment.
- Network layer encapsulates the transport layer segment [H_t | M] with a network layer-layer header H_n to create a network layer datagram.
- Link layer encapsulates the Link layer segment [H_n | H_t | M] with a link layer-layer header H_l to create a link layer frame.
- Packet sniffing: shared network, can access everything once they are on the network.
- IP spoofing: injection of packet with false source address.
- Denial of Service (DoS): overwhelming the host by sending loads of packets.
- Authentication
- confidentiality
- integrtity checks
- access restrictions
- firewalls
Server
- always on host
- permanent IP address
- In data centers for scaling
Client
- Communicates with the server
- May be intermittenly connected
- can have dynamic ip address
- do not communicate with directly with each other(client)
- examples: HTTP, IMAP, FTP
- doesnt have always on servers
- peers request and provide services from other peers
- Adds to self scalability
- Peers are intermittenly connected and change IP addresses
- Hard to manage
- Example: P2P file sharing
Process are programs running within a hosst
- In the same host, two processess communicaate using inter-process communication
- processes in differnet hosts communicate by exchaning messages
Process that initiates the communication is called the client process
Process that waits to be contacted is the server process
- Process sends/receives messages to/from its socket
- Sockets can be thought of as doors
- Sending process sends messages outdoor
- sending process relies on the transport infrastructure
- Two sockets involved: one on each side
- This is basically the address of the processes (door)
- To receive messages, the process must have an identifier
- Host device has unique 32-bit IP address
- Identifier includes both IP addresses and port numbers
RFC: Request for comments
- defines the type of messages exchanged
- Request, response etc
- message syntax
- what fields in the message and how fields are delineated
- message semantics
- meaning of information in fields
- Rules for when and how processes send and respond to messages
Two types of protocols
- Open protocols
- Defined in RFCs, everyone can access the definition
- allows interoperability
- example HTTP. SMTP
- Proprietary protocols
- example: skype, zoom
- Data Integrity
- some apps require 100% reliable data transfer
- example: file transfer, web transactions
- Other apps like audio can tolerate some loss
- Timing
- Some apps require low delay to be effective
- Throughput
- Some apps require minimum amount of throughput to be effective
- other apps can make use of whatever they get (elastic)
- Security
- encryption, data integrity
HTTP
- Hypertext transfer protocol.
- client server model

- uses tcp
- is stateless: doesnt maintain information about past
Caching servers reduces totoal time ti takes to get the object
Using conditional get to check the object is up to date
- Three components: users, email servers, smtp protocol
- uses TCP to send email message from cleient to server
- Three phases
- smtp handshaking
- smtp transfer of messages
- smtg closure
- command/response interaction like http
- commands: ascii text
- response: status code and phrase
- As smtp is used to push data, there needs to be a protocl to receive this data called the IMAP
- distributed database
- decentralized approach
- makes it easy to scale
- decentralized approach
- application layer protocol
- DNS services
Iteration used a lot more than recursive
- Similar to HTTP
- uses TCP
- main difference is that ftp uses two parallel tcp connection to transfer a file, a control connection and data connection
- control connection: used to send control information between the two hosts, like passpord, file directorand commands like put and get files.
- data connection actaully sends the file.
- FTP is out band as it uses separate control conenctions
- HTTP is in band as it uses the control connections in the same tcp connection
Basic working of ftp is it opens the control connection, sends and gets the relevant stuff, once its allowed to send or get the file, it opens another data connection to get/send the file and hten close the data channel. If wants to send another channel then another data channel will be opened.
-
FTP must maintiain the state of the user. THe server must associate the control connection wit ha specific user account. HTTP is stateless
-
commands to send like: USER, PASS (Passoword), LIST (list of all files), RETR (retureive the file, this causes a data channel conenection to open and send file), STOR (stroed the file)
-
replies: 331 username ok , passowrd reuqired
-
....
UDP and TCP have differet ways of doing it
- UDP only cares about hte senders and destination ports
- TCP is made up a 4 tuple of the ip and the port for sender and destination
- bare bones
- best effort service
- some segments may be lost, delevierd out of order
- connectionless
- no handshaking
- each segmemnt is handled independently
Checksum
- add the two 16 bit numbers
- do 1's complement of the sum and attach that as the checksum
- works for 1 bit error flip
- But not always for two bit error flip
rdt 3.0: adds more sequence numbers and can send more packets at once which leads to pipelining
Link for a simple example on CRC
Key points:
- XOR used for subtraction in the division
- watch the video to know when to use 1 or 0 to get the remainder stuff.





















