TCP/IP Layered Model Flashcards
Layers
+ 5: Application Layer + 4: Transport Layer + 3: Network Layer + 2: Data Link Layer + 1: Physical Layer
Layer 1 Encoding Schemes
Manchester (clock XOR data = code) 8b/10b -> Block encoding. 80% efficient 64b/66b -> 10 Gigabit Ethernet. 97% efficient.
Layer 1: Shannon’s theorem
Taking into account signal to noise ratio: Max Data rate = Hlog2 where H = bandwidth. S = Signal Power. N = Noise power.
Layer 2:
Link Layer
Layer 2 Functions:
Receive datagrams from Network Layer Transmission of frames over physical media. Synchronisation Detection of Transmission errors
Data Link Layer
Transforms raw transmission facility into a line ‘free of errors’ to the network layer. Lets sender break transmission into frames. May regulate flow of data - Stops slow receiver being overwhelmed by fast sender.
Link Layer Acknowledgements
Three models for acknowledging: + Connectionless (no ack’s) -> Low error rate networks eg. Ethernet + Acknowledge, connectionless service. -> e.g. 802.11 + Acknowledged connection-oriented services -> For long, unreliable links e.g. satellite.
Handling Acknowledgements & Errors using Automatic Repeat and reQuest (ARQ).
+ Stop and Wait. Send frame, wait for ACK. Send next frame. Fails error check if no ACK. + Improved by pipelining. Send multiple frames before receiving ACK. 1. Go-back-N ARQ. Re-Send window of transmitted frames. 2. Selective-Reject ARQ: Transmit only lost frames. Difficult to implement.
Framing
Each sequence of bits needs to be framed. Use channel bandwidth to indicate start and end of frame. + Use FLAG to mark start and end: If FLAG - Use ESC byte When received: Strip first ESC byte. If ESC occurs in data -> ESC it. Used by Point-to-Point protocol (PPP)
Detecting Errors
Parity Bit - Simplest -> Not efficient. Cyclic Redundancy Check (CRC) - Used by Ethernet
Ethernet.
Originally shared media. Later became switched to handle media contention. No contention if fully duplex
CSMA/CD
Carrier Sense Multiple Access with Collision Detection. Detects collisions in Ethernet. +Sender listens to channel to see if it is busy. If so, wait. + When the channel is free, start talking. Listen whilst sending. + Stop if collision occurs. +Back off before retransmitting after time delay t (where t is increasing time value)
Ethernet Frame
+48 bit source and destination address. + Preamble: 7 bytes plus 1 byte SFD to sync Tx and Rx. +Min Data Size: 46 bytes -> To detect collisions.
Ethernet Networks: Link layer elements
+ Logical Link Control (LLC): Provides interface to Layer 3. Supports error detection, ARQ pipelining. May use ACKs. + Medium Access Control protocol (MAC): Controls accessto broadcast media. Handles multiple host access to same collision domain.
MAC Addresses.
Need to be unique. 24bit allocated to vendor. 24bit allocated by vendor.
Ethernet Reliability
Uses CRC checksum to detect errors. On error, bad frame is dropped. Recovery handled by higher layer. Wired Ethernet is reliable.
Address Resolution Protocol (ARP)
Determines receiving hosts MAC address. Uses link layer broadcast message. Seen by all hosts in same layer network..
ARP disadvantages:
+ Open to spoofing. + Host can change MAC address. + Sleeping nodes + Change of IP or MAC address. + ARP probe to detect IP clashes.
Data link network classes:
Broadcast: + Multiple hosts in one Layer 2 broadcast domain. Hosts in same broadcast domain fall into same LAN. + Layer 2 broadcast domain controls where. Point to Point: + Typically router to router.
Ethernet Switching.
+ Now 1Gbit/s switches + One switch port connects hosts + Run Cat5 1GBit/s for 100m
Ethernet Switching: MAC Learning
Allows bridge or switch to only forward frames to ports which serve devices they are addressed to. Uses Ethernet (MAC) table per port. Observes incoming source MAC address. Then forward frames for that address to that port and that port only. Purge MAC tables periodically
Ethernet Switching: Spanning Tree
Let’s you create physical loops. Refers to bridges (switched) Algorithm elects root bridge Determines lowest cost paths to root. Enables root ports on each switch Other ports with a path to root are blocked. Alternative paths may be enabled if topology changes.
Virtual LANs
+ Used to create virtual switched networks. + Ethernet frame may include a VLAN identifier. + Avoids need to physically re-cable a network
Layer 3: Network Later
+ Receives services from the link layer + Offers services to the transport layer + In TCP/IP model, IP is the network layer.