Distributed Systems & Networks Flashcards
What 5 layers are in the Open Systems Interconnection model highest to lowest?
Application
Transport
Internet/Network
Link
Physical
What are data frames?
A structured way of packaging & sending data between devices
Contain a header, payload, and trailer contained in a packet
What is framing?
The transmission of frames over physical media
What are FLAG bytes and Escape bytes?
A FLAG byte value marks the start and end of a frame
If data contains a byte sequence that could be misinterpreted as a FLAG byte sequence, use an Escape byte to signal different treatment
If data contains a byte sequence that could be misinterpreted as an Escape byte sequence, use another escape byte
What is flow control?
Regulates flow of data
Receiver sends messages to sender saying if more data can be sent
What are the 3 link layer models?
Connectionless, no acknowledgements
Connectionless, acknowledged
Connection-oriented services, acknowledged
What is an ARQ?
Automatic Repeat reQuest
What 3 ways can link layers handle ACKs?
Stop-and-wait ARQ: send frame(s), wait for ACK, send next frame(s)
Go-back-N ARQ: frames labelled with sequence numbers, send frames, if ACK missed retransmit from that frame
Selective-repeat ARQ: same as GBN ARQ but only retransmit lost frames
What 2 ways are errors handled in the link layer?
Parity bit: used to check if number of 1’s is even or odd
Cyclic redundancy check: checksum (based on data) appended to data, checksum re-calculated by receiver, compared with sender’s checksum
What 3 ways is link layer media contention handled?
Frequency channels
CSMA/CD (carrier sense multiple access w/ collision detection), for ethernet networks: listens whilst sending on a channel; if collision detected, stops and retransmits
CSMA/CA (CSMA w/ collision avoidance), for wireless networks: instead of listening, waits for frame ACK
What is CSMA?
Carrier Sense Multiple Access
What are the 3 functions of the Internet layer?
Internetworks: hiding routing from transport layer
Transmits packets: packetises data stream into datagrams (small, distinct units) and fragments them
Receives packets: reassembles fragments
What does each router do in store-and-forward packet switching?
Stores the packet, checks & processes it, forwards it to the next hop
What is fragmentation?
When a Protocol Data Unit (PDU), which has a header and data, is split into smaller packets, which have the header and a fraction of the data
When does fragmentation occur?
When Protocol Data Units (PDUs) are larger than the Maximum Transmission Unit (MTU)
What are the address sizes of IPv4 and IPv6?
32-bit and 128-bit
What are the header sizes of IPv4 and IPv6?
IPv4: variable, at least 20 bytes
IPv6: fixed, 40 bytes
How are IPv6 addresses shortened?
Leading 0s in blocks are omitted
0 blocks (:0000:) are replaced by ::
When is IP fragmentation performed in IPv4 and IPv6?
IPv4: can be at any routing hop, re-assembled at receiving host
IPv6: at sending host
What IPv4 address portions are there?
Network portion: first 16 bits e.g. 192.168.123.45 –> 192.168 network portion
Host portion: last 16 bits e.g. 192.168.123.45 –> 123.45 host portion
Why can’t all addresses in a subnet be used?
First address is reserved
Last address is broadcast address
Another address is required for the router (first or last usable address)
IPv4 subnet notation
For 152.78.70.0/23
The subnet /23 leaves 2^(32-23) = 512 addresses to work with
Leaves address range 152.78.70.1 to 152.78.70.254
IPv6 server portion notation
Server portion can be from 64 bits to 127 (leaves 2 usable addresses): /64 to /127
What is NAT (Network Address and Port Translation) and CGNAT (Carrier-Grade NAT)?
NAT: manages IP address allocation. for IPv4 networks using private addresses but need Internet access
CGNAT: extension of NAT that handles the running out of IP addresses
What are the 4 benefits of IPv6?
Removes need for NAT
More plug-and-play than IPv4
Streamlined header
Fragmentation only occurs at sender
What is routing in the Internet layer?
A function for moving packets between different subnets
What is prefix aggregation?
e.g. 192.168.10.0/24 and 192.168.11.0/24 aggregated to 192.168.10.0/23
What problems might a default router’s routing table have?
Table could very large and be subject to frequent changes
What is an autonomous sytem (Internet)?
A group of networks with a unified routing policy
What gateway protocols are used in autonomous systems?
Exterior gateway protocols for exchanging routing information between AS’s
Interior gateway protocols for exchanging routing information within an AS
What are the 2 types of interior gateway protocols?
Distance vector: exchanges “best route” information to neighbouring routers
Link state: exchange messages describing connected neighbours to all routers in site. Better convergence and loop avoidance
What do routers do in the Routing Information Protocol
Lets them share information with other routers about the “best route” by sending whole routing table periodically to connected routers
What 2 limitations does the Routing Information Protocol have?
Only updates every 30 seconds
Updates not acknowledged
What is link cost and link state packets?
Link cost: cost between routers determined by bandwidth and/or delay
Link state packets: A list of known routers and their link cost
How is the shortest path between routers found?
Using Dijkstra’s algorithm (from starting node, expand nodes by considering cheapest neighbour and update costs)
What are the 4 steps of Border Gateway Protocol?
[ASN - Autonomous System Number]
1) Configuration: specify neighbour’s IP address and ASN
2) Peering session: routers exchange entire routing tables, followed by incremental updates
3) Route advertisement: routers advertise routes they know of to their neighbours
4) Route selection: neighbours choose whether to use that route based on own knowledge of ASNs. Will reject if own ASN is on path as would loop
What are the 3 downsides of Border Gateway Protocol?
Relies on trust
Slow
Routers have limited routing table sizes
What is ICMP (Internet Control Message Protocol)?
Used in IPv4 networks for information & error messages
Used in IPv6 networks for router advertisement & neighbour discovery
What is ARP (Address Resolution Protocol)?
Used in local networks to map IP addresses to MAC addresses
1) Broadcasts a message containing sender’s MAC address and IP address
2) Host with target IP address responds with MAC address
What is DHCP (Dynamic Host Configuration Protocol)?
A protocol that automatically assigns IP addresses to devices on a network
Client | Server
Discover –>
<– Offer
Request –>
<– ACK
What is NDP?
Neighbourhood Discovery Protocol
What is SLAAC (StateLess Address AutoConfiguration)?
Authomatically assign IPv6 addresses to devices without need for central server
UDP vs TCP (4 attributes)
UDP: faster, less reliable, connectionless (send-and-forget), no flow control
TCP: slower, more reliable, connection-oriented, has flow control
UDP vs TCP headers
TCP headers are more complex but guarantee data delivery and order of data
What 2 ways can TCP facilitate multiple packet transmission without waiting for individual ACKs?
Sliding window protocol (flow control):
1) Sender slides forward a window for multiple unACK packets to be sent
2) Window is slid back
3) Once ACKs received, window slides forward again
Congestion control:
If congestion detected, TCP reduces transmission and vice versa
Transmission rate is doubled until thresh met, then gradually increases until timeouts start occuring
What is an octet?
octet == byte == 8 bits
What are switches, ports, and hosts?
Switch: forwards packets between devices on same LAN
Port: a connection point on a switch where hosts can connect
Host: devices connected to a network
How do ethernet switches improve network performance?
Switches learn the MAC addresses of hosts on their ports and build a MAC address table
This improves efficiency as data is only forwarded to intended recipients
What are the 4 cast message types?
Unicast: one sender to one receiver
Broadcast: one sender to all potential receivers
Multicast: one sender to any interested receivers
Anycast: one sender to nearest instance of receiver
What do IP routers do?
They forward IP packets between LANs but do not forward Ethernet broadcasts
They advertise the reachability of their IP address range
What is subnet comparison?
A way of knowing if an address is local or not
Even if destination is local but LAN is complex, sender may use default router
What is SMTP (Simple Mail Transfer Protocol)?
Handles transfer of email messages but not receiving or storing
What does QUIC (Quick UDP Internet Connections) do?
Improves performance of web applications
What is RTSP (Real-Time Streaming Protocol) and RTP (Real-Time Transport Protocol)?
RTSP: for controlling delivery of streaming media content over the Internet
RTP: the actual transmission audio/video data over IP networks
What is SMB (Server Message Block)?
Provides shared access to files over a LAN or the Internet (via HTTP)
What is NFS (Network File System)?
For accessing files over a network (via HTTP) as if they were local
What is NTP (Network Time Protocol)?
For synchronising the time of devices on a network
What is LDAP (Lightweight Directory Access Protocol)?
For accessing directory services over an IP network
What is P2P (Peer-to-Peer)?
Where devices communicate directly with each other without the need for a central server
What is HTTP (Hypertext Transfer Protocol)?
1) TCP connect to server
2) Send request (GET, HEAD, POST, PUT, DELETE)
3) Receive response message with data
What is CoAP (Constrained Application Protocol)?
Like HTTP but for simpler devices and on UDP
More modern and lightweight than MQTT
What is MQTT (Message Queuing Telemetry Transport)?
Like HTTP but with smaller packets and less overhead
Messages are published to a broker entity and clients subscribe to data streams
How can CoAP-based devices and HTTP web services communicate?
By using CoAP-to-HTTP gateways
Proxy gateway stores cached values to speed up subsequent access
What is DNS (Domain Name System)?
Translates hostnames (example.com) into IP addresses
What is DNS domain delegation?
TLD (top level domain) registrars control domain names like .uk
They can delegate names like .ac.uk to JISC
They in turn can delegate names like soton.ac.uk to the University and so on
This can be viewed as a hierarchy
What is a DNS zone?
A continous chunk of name space with an associated set of name servers
Subzones can be delegated