Structure of Network Flashcards
What is protocol?
Set of rules for data transmission which are agreed upon by both sender and receiver (data format, type, size etc.)
Reasons for layering
- Simplifies network model
- Provides design modularity
- Enables programmers to specialise in a particular layer of the model
- Allows for standardised interfaces to be produced by networking vendors
TCP/IP Model Layers
- Application
- Transport
- Network
- Data Link
- Physical
- Each layer only communicates with adjacent layers
- At each layer, as required by the protocol, headers with relevant information are added to the data unit in the sender’s process, while removed from the data unit in the receiver’s process
Application Layer
- High-level functionality to end users
- Data unit: message
Application Layer - Protocols
- File transfer: FTP, SSH
- Email: SMTP, POP3, IMAP4
- Webpage: HTTP, HTTPS
Transport Layer
- Functionality to transmit messages between any two programs
- Data unit: segment
Transport Layer - Port Number
- Number representing a process running on a network
- In every data segment, both source and destination port are embedded in the header
- Commonly used ports: port 80 - HTTP; port 143 - IMAP; port 53 - DNS
Transport Layer - Socket
- Identifier for an application process on a network
- Combination of IP address and port number
Transport Layer - Protocols
- Transmission Control Protocol (TCP)
- Universal Datagram Protocol (UDP)
Transport Layer - TCP
- Uses three-way-handshake to establish a connection before data transmission
- Break up data into segments with sequential numbers for reassembly at the receiver
- This ensures security and validation of the data
- Data can be sent only after handshake completes
- Preferred over UDP as it establishes connection between applications of two hosts
Transport Layer - Handshake (TCP)
- A sends B a packet with the SYN bit set
- B responds to A with its own SYN packet; ACK bit is now set
- A responds to B’s SYN with its own ACK
Transport Layer - Sequencing (TCP)
- Data is transmitted in many segments at this layer; they may not arrive in the same order they were sent
- TCP places a sequential number on each segment when they were sent for receiver to reorder
Transport Layer - UDP
- No waiting time for connection (connectionless)
- Stability and reliability may be missing
- Applicable when performance is more important than the ability to receive all data
- Example: streaming media
Network Layer
- Functionality to determine a route between any two devices
- Data unit: packet
Network Layer - Switching
- Method used to transmit data over a network to destination network devices
Network Layer - Circuit Switching
- Two nodes establish a dedicated communication channel before transmitting data
Network Layer - Packet Switching
- Data is broken into small units (packets)
- Each packet takes the best route available and travels independently to reach destination device
- Preferred over circuit switching as it determines the best routes between two hosts
Network Layer - Packet Switching Advantages
- Efficient as each packet finds the fasteset route
- More secured since it is harder to attack multiple routes
Network Layer - Packet Switching Disadvantages
- Sequence of packets are altered and requires assembly at destination device