1/213
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Protocol (definition)
A set of conventions governing the treatment and especially the formatting of data in an electronic communication system
Why split networking into layers?
Each layer handles one specific part of the problem and possibly the connection with the other layers
The 4 families of networking problems
Physical, topological/organisational, software, reliability
Examples of physical constraints
Attenuation, noise, bandwidth
Reliability problems in networking
Coping with data loss (detection and correction) and security
Number of layers in the OSI model
7
Number of layers in the TCP/IP model
4 (Network Access, Internet, Transport, Application)
Number of layers in the course model
5 (Physical, Data-Link, Network, Transport, Application)
OSI layers from 1 to 7
1 Physical, 2 Data Link, 3 Network, 4 Transport, 5 Session, 6 Presentation, 7 Application
Course model layers from 1 to 5
1 Physical, 2 Data-Link, 3 Network, 4 Transport, 5 Application
How are layers numbered?
From the bottom: layer 1 = Physical
Which OSI layers merge into the course Application layer?
Application, Presentation and Session (OSI 7, 6, 5)
TCP/IP layer that groups Data-Link and Physical
Network Access
TCP/IP name of the Network layer
Internet
Application layer: protocol or program?
The protocol (HTTP), not the program (Firefox)
Protocols at the Application layer
HTTP, DNS, DHCP, FTP, SMTP, POP, IMAP, SSH
Protocols at the Transport layer
TCP and UDP
Protocols at the Network layer
IPv4, IPv6, ICMPv4, ICMPv6
Protocols at the Data-Link layer
Ethernet, WLAN, SONET, SDH
Encapsulation
Moving down the stack, each layer adds its header to the data of the layer above
De-encapsulation
Moving up the stack, each layer removes its header and passes the payload to the right protocol above
Payload
The data a layer carries for the layer above (charge utile)
PDU at the Application layer
Data
PDU at the Transport layer
Segment (called a datagram in UDP)
PDU at the Network layer
Packet
PDU at the Data-Link layer
Frame (medium dependent, has a header and a trailer)
PDU at the Physical layer
Bits
Encapsulation chain for HTTP
HTTP > TCP > IP > Ethernet > bits
Encapsulation chain for DNS
DNS > UDP > IP > Ethernet > bits
1 byte = ? bits
8 bits
Client-server model: the 3 steps
Client sends a request; server processes it and sends an answer or an error; either side can end the connection
Who can end a client-server connection?
Either the client or the server
Common web server software
Apache and NGINX
Mail server equivalent of Apache
Postfix
Wireshark
A network analyser that captures traffic and shows every header
Port of HTTP
80
Port of HTTPS
443
Port of DNS
53
Port of SMTP / SMTPS
25 / 465
Port of POP / POPS
110 / 995
Port of IMAP / IMAPS
143 / 993
Port of SSH
22
FTP stands for
File Transfer Protocol
Secure alternative to telnet
SSH
DNS record A
Maps a name to an IPv4 address
DNS record AAAA
Maps a name to an IPv6 address
Domain name
A name associated with an IP address; it is rented, not really bought
Role of the Transport layer
Defines how data is transported to and from the application layer over the network
UDP stands for
User Datagram Protocol
TCP stands for
Transmission Control Protocol
Who chooses UDP or TCP?
Usually the application developer
What identifies the listening application?
The port number
Destination port
Standard: identifies the service (80, 443, 53…)
Source port
Ephemeral: random, chosen by the client OS at runtime, greater than 1023, different for each connection
Course example: browser to web server ports
Source 1240, destination 80; the answer is source 80, destination 1240
How does the server's answer use the ports?
It swaps source and destination ports
How does one PC run Firefox and Outlook at the same time?
Each connection has a different ephemeral source port (e.g. a' to 80 and a'' to 25)
http://IP_B:8080
Forces destination port 8080 instead of the default 80
UDP main characteristics
No connection, datagrams only sent and received, loss possible, wrong order possible
Size of the UDP header
8 bytes
Fields of the UDP header
Source port, destination port, length, checksum (16 bits each)
Checksum
Detects transmission errors; does not correct them
TCP main characteristics
Connection established; handles lost segments, re-ordering and acknowledgments
Size of the TCP header (no options)
20 bytes
TCP fields that UDP doesn't have
Sequence number, acknowledgement number, control bits, window, urgent
TCP three-way handshake
SYN, then SYN-ACK, then ACK
Closing a TCP connection
FIN and ACK from each side: 4 messages (FIN, ACK, FIN, ACK) or 3 (FIN, FIN+ACK, ACK)
Windowing
Number of segments sent before waiting for an ACK, adjusted dynamically to limit ACKs and boost performance
UDP vs TCP: which is faster?
UDP, because it is lighter
UDP: who handles connected behaviour if needed?
The application layer
Advantage of TCP for developers
Connected behaviour is fully handled by the protocol, so application code is simplified
Is TCP more secure than UDP?
No. TCP is more reliable, not more secure; neither encrypts
When is UDP still preferred?
Some loss is acceptable, the app handles loss/disorder, or the data fits in few datagrams
Transport used by web, mail, FTP, SSH
TCP
Transport used by video conferencing, VoIP, multicast, TFTP
UDP
Transport used by DNS and online gaming
UDP and TCP
Transport used by a VPN
UDP or TCP
Router
Device that interconnects networks; its job is to find a route
The two addresses of a device
A hardware address (MAC, layer 2) and a logical address (IP, layer 3)
MAC stands for
Media Access Control
Who sets the MAC address?
The network card manufacturer
Who sets the IP address?
The network administrator (or DHCP); it depends on the network and on the location
Scope of a MAC address
Unique on a given local (layer 2) network
Size of a MAC address
48 bits, shown as 12 hexadecimal digits
1 hexadecimal digit = ? bits
4 bits
First 6 hex digits of a MAC address
Usually identify the manufacturer
Can a MAC address be changed?
Not physically, but it can be reassigned through software
MAC address of a virtual machine
Set in a configuration file
One network card = ?
One MAC address
Basic security using MAC addresses
MAC address filtering
Broadcast MAC address
FF:FF:FF:FF:FF:FF
Multicast MAC prefixes
01:00:5E and 01:00:0A for IPv4, 33:33 for IPv6
Hex F = ? in decimal and binary
15 = 1111
Unicast
1 to 1 traffic (web browsing, mail)
Broadcast
1 to all traffic (printer service sharing)
Multicast
1 to many: devices interested in the content (IP TV streaming)
Anycast
A single IP shared by several devices in different locations
Routing decision
Is the target in my network or in another network? Decided with the routing table
A to B in the same network: destination MAC?
MAC B; the router is not involved
A to C in another network: destination MAC?
MAC of the router