Notes: OSI Model | Pre Security | THM
- solbergtonje
- 22 dec. 2024
- 3 min läsning
What is the OSI Model
OSI Model = Open Systems Interconnection Model
- fundamental model
- networking
- framework: how all networked devices send, receive and interpret data
- Benefits: devices different functions/design - communicate with other devices - data sent across network that follow OSI model = understood by other devices
- 7 layers (7-1): each layer different set of responsibilities
- Each layer: data travel through - specific process happens, pieces of info added to data = encapsulation
The OSI Model (Open Systems Interconnection Model)
7. Application
6. Presentation
5. Session
4. Transport
3. Network
2. Data link
1. Physical
Layer 1 - Physical
- physical components of hardware used in networking
- lowest layer
- devices use electrical signals to transfer data - binary numbering system (1's and 0's)
- Ex.: ethernet cables connecting devices
Layer 2 - Data Link
- physical addressing of the transmission
- receives a packet from layer 3 network (incl IP adr for remote computer) and adds physical MAC adr of receiving endpoint
- present data in a format suitable for transmission
Layer 3 - Network
- routing and re-assembly of data (from small chunks to larger chunk)
- routing: determine most optimal path
- OSPF (Open Shortest Path First)
- RIP (Routing Information Protocol)
- delivering packets using IP adr
- Layer 3 devices: routers
- Factors to device which route:
- shortest path: least amount of devices the packet needed to travel across
- most reliable path: have packets been lost on path before
- faster physical connection: path using copper connection (=slower) or fibre (=faster)
Layer 4 - Transport
- vital part in transmitting data across network
TCP (= Transmission Control Protocol)
- constant connection for the time it takes for the data to be sent and received
- error checking: guarantee data sent from small chunks in layer 5 session has been received and reassembled in the same order
- used for file sharing, internet browsing, sending email <- require data to be accurate and complete
- small pieces of data = packets
Advantages:
- guarantee accuracy of data
- prevent flooding by synchronising 2 devices
- performs processes for reliability
Disadvantages:
- require reliable connected between 2 devices. If a small chunk of data is not received - entire chunk of data can't be used
- slow connection can cause bottleneck on another device as connection is constant with the receiving computer
- slower than UDP because more work needs to be done on the devices using TCP
UDP (= User Datagram Protocol)
- data is sent to computer whether is gets there or not
- no synchronization
- useful: for small pieces of data being sent, f.ex.: protocols used for discovering devices (ARP, DHCP), larger fles like video streaming (ok if parts of video is pixelated - pixels = lost pieces of data)
Advantages:
- faster than TCP
- leave application layer (user software) - decide if any control over how quickly packets are sent
- don't reserve a continuous connection on a device as TCP does
Disadvantages:
- doesn't care if data is received
- flexible to software developers
- unstable connections = terrible user experience
Layer 5 - Session
- receive correctly translated/formatted data from layer 6 presentation
- create and maintain connection with destination computer - when connection established = session
- responsible for closing the connection when unused or lost
- can contain checkpoints = if data is lost, only newest pieces of data are required to be sent = saving bandwitdh
- sessions are unique - data can't travel over different sessions - only across each session
Layer 6 - Presentation
- standardisation starts to take place
- translator for data to/from layer 7 application
- receiving computer will understand data sent to a computer in a format destined for another format (f.ex.: different email programs need to display emails the same)
- data encryption occur at this layer (f.ex.: HTTPS)
Layer 7 - Application
- protocols and rules in place to determine how user should interact with data sent/received
- applications like email clients, browsers, file server browsing software provide a friendly Graphical User Interface (GUI) for users to interact with data sent or received - or protocols like Domain Name System (DNS) (= how websites addresses are translated into IP adr)




