0% found this document useful (0 votes)
28 views13 pages

TCP_IP Protocol and Networking - CDACC Study Notes

The document provides a comprehensive overview of TCP/IP protocols and networking concepts essential for the CDACC exam. It covers key topics such as the OSI and TCP/IP models, various protocols (TCP, UDP, HTTP, FTP, etc.), IP addressing, subnetting, routing protocols, and network security measures. Additionally, it includes practice questions and important commands to aid in understanding and application of networking principles.

Uploaded by

josphat mbatha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views13 pages

TCP_IP Protocol and Networking - CDACC Study Notes

The document provides a comprehensive overview of TCP/IP protocols and networking concepts essential for the CDACC exam. It covers key topics such as the OSI and TCP/IP models, various protocols (TCP, UDP, HTTP, FTP, etc.), IP addressing, subnetting, routing protocols, and network security measures. Additionally, it includes practice questions and important commands to aid in understanding and application of networking principles.

Uploaded by

josphat mbatha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

TCP/IP Protocol and Networking - CDACC Study Notes

Table of Contents
1. Introduction to Networking
2. OSI Model vs TCP/IP Model

3. TCP/IP Protocol Suite


4. Internet Protocol (IP)

5. Transmission Control Protocol (TCP)


6. User Datagram Protocol (UDP)

7. Application Layer Protocols

8. IP Addressing and Subnetting

9. Routing Protocols

10. Network Security

Introduction to Networking

What is Computer Networking?


Computer networking is the practice of connecting multiple computing devices to share resources, data,
and services. Networks enable communication between devices across various distances, from local area
networks (LANs) to wide area networks (WANs) and the global Internet.

Key Networking Concepts


Node: Any device connected to a network (computer, printer, router, etc.)

Host: A computer that provides services to other computers


Server: A computer that provides services to client computers

Client: A computer that requests services from servers


Protocol: A set of rules governing communication between devices
Bandwidth: The maximum rate of data transfer across a network path

Latency: The delay in data transmission from source to destination

Types of Networks
1. Personal Area Network (PAN): Very short range (1-10 meters)

2. Local Area Network (LAN): Limited geographical area (building, campus)


3. Metropolitan Area Network (MAN): City-wide coverage
4. Wide Area Network (WAN): Large geographical areas, countries
5. Internet: Global network of interconnected networks

OSI Model vs TCP/IP Model

OSI Model (7 Layers)


The Open Systems Interconnection model provides a conceptual framework for network communication:

1. Physical Layer
Transmission of raw bits over physical medium
Defines electrical, mechanical, and procedural specifications

Examples: Ethernet cables, fiber optics, wireless signals

2. Data Link Layer


Node-to-node delivery within the same network
Error detection and correction

MAC (Media Access Control) addressing

Examples: Ethernet, Wi-Fi (802.11)

3. Network Layer
Routing and logical addressing

Path determination across multiple networks


Examples: IP, ICMP, ARP

4. Transport Layer
End-to-end communication and reliability

Flow control and error recovery


Examples: TCP, UDP

5. Session Layer
Managing sessions between applications

Establishing, maintaining, and terminating connections

Examples: NetBIOS, RPC

6. Presentation Layer
Data translation, encryption, compression
Format conversion

Examples: SSL/TLS, JPEG, MPEG

7. Application Layer
Network services to applications

User interface
Examples: HTTP, FTP, SMTP, DNS

TCP/IP Model (4 Layers)


The TCP/IP model is the practical implementation used on the Internet:

1. Network Access Layer


Combines OSI Physical and Data Link layers

Hardware addressing and physical transmission

2. Internet Layer
Corresponds to OSI Network layer

Logical addressing and routing


Primary protocol: IP

3. Transport Layer
Same as OSI Transport layer

End-to-end communication

Primary protocols: TCP, UDP

4. Application Layer
Combines OSI Session, Presentation, and Application layers

All application services and protocols

TCP/IP Protocol Suite

Protocol Stack Overview


The TCP/IP protocol suite is a collection of protocols organized in layers. Each layer provides services to the
layer above and uses services from the layer below.

Key Characteristics
Open Standard: Not proprietary to any vendor

Scalable: Works from small LANs to the global Internet


Robust: Can route around failures

Platform Independent: Works on different operating systems

Protocol Examples by Layer


Application: HTTP, HTTPS, FTP, SMTP, DNS, DHCP, SNMP
Transport: TCP, UDP

Internet: IP, ICMP, ARP, RARP


Network Access: Ethernet, Wi-Fi, PPP

Internet Protocol (IP)

IPv4 (Internet Protocol Version 4)

IPv4 Header Structure

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragment Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time to Live | Protocol | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Key IPv4 Header Fields

Version: IP version (4 for IPv4)

IHL: Internet Header Length

Type of Service: Quality of Service marking


Total Length: Total packet size

Identification: Unique packet identifier


Flags: Control fragmentation

Fragment Offset: Position of fragment


Time to Live (TTL): Hop limit

Protocol: Next layer protocol (TCP=6, UDP=17)

Header Checksum: Error detection

Source/Destination Address: 32-bit IP addresses

IPv4 Addressing

Address Size: 32 bits (4 bytes)


Format: Dotted decimal notation (e.g., 192.168.1.1)

Address Space: Approximately 4.3 billion addresses


Classes: A, B, C, D (multicast), E (experimental)

IPv6 (Internet Protocol Version 6)

Key IPv6 Features

Address Size: 128 bits (16 bytes)

Address Space: 3.4 × 10^38 addresses

Format: Hexadecimal notation with colons

Built-in Security: IPSec integration

Simplified Header: More efficient processing


No Fragmentation: At intermediate routers

IPv6 Address Types

Unicast: One-to-one communication

Multicast: One-to-many communication

Anycast: One-to-nearest communication

Transmission Control Protocol (TCP)

TCP Characteristics
Connection-Oriented: Establishes connection before data transfer
Reliable: Guarantees delivery and order

Full-Duplex: Bidirectional communication


Flow Control: Manages data transmission rate

Error Detection and Correction: Ensures data integrity

TCP Header Structure


0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgment Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data | |U|A|P|R|S|F| |
| Offset| Reserved |R|C|S|S|Y|I| Window |
| | |G|K|H|T|N|N| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

TCP Control Flags


URG: Urgent pointer field significant

ACK: Acknowledgment field significant

PSH: Push function


RST: Reset connection

SYN: Synchronize sequence numbers


FIN: No more data from sender

TCP Three-Way Handshake


1. SYN: Client sends SYN packet to server

2. SYN-ACK: Server responds with SYN-ACK

3. ACK: Client sends ACK to complete connection

TCP Connection Termination


1. FIN: One side initiates closure
2. ACK: Other side acknowledges

3. FIN: Other side sends its FIN

4. ACK: First side acknowledges

TCP Flow Control


Sliding Window: Controls amount of unacknowledged data
Window Size: Advertised by receiver
Congestion Control: Prevents network overload

User Datagram Protocol (UDP)

UDP Characteristics
Connectionless: No connection establishment

Unreliable: No delivery guarantee


Fast: Lower overhead than TCP

Simple: Minimal header structure


No Flow Control: No rate limiting

UDP Header Structure

0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| Source | Destination |
| Port | Port |
+--------+--------+--------+--------+
| | |
| Length | Checksum |
+--------+--------+--------+--------+

UDP vs TCP Comparison


Feature TCP UDP

Connection Connection-oriented Connectionless

Reliability Reliable Unreliable

Ordering Guaranteed Not guaranteed

Speed Slower Faster

Overhead Higher Lower

Use Cases Web, email, file transfer DNS, streaming, gaming

Application Layer Protocols

Hypertext Transfer Protocol (HTTP)


Purpose: Web page transfer
Port: 80 (HTTP), 443 (HTTPS)

Methods: GET, POST, PUT, DELETE, HEAD, OPTIONS

Status Codes: 200 (OK), 404 (Not Found), 500 (Server Error)
File Transfer Protocol (FTP)
Purpose: File transfer between hosts

Ports: 21 (control), 20 (data)


Modes: Active and Passive

Commands: USER, PASS, LIST, RETR, STOR

Simple Mail Transfer Protocol (SMTP)


Purpose: Email transmission
Port: 25, 587, 465

Commands: HELO, MAIL FROM, RCPT TO, DATA


Works with: POP3, IMAP for email retrieval

Domain Name System (DNS)


Purpose: Domain name to IP address resolution

Port: 53
Record Types: A, AAAA, MX, CNAME, NS, PTR

Hierarchy: Root, TLD, Second-level domains

Dynamic Host Configuration Protocol (DHCP)


Purpose: Automatic IP address assignment
Ports: 67 (server), 68 (client)

Process: DISCOVER, OFFER, REQUEST, ACK


Lease Time: Duration of IP address assignment

Simple Network Management Protocol (SNMP)


Purpose: Network device management

Port: 161 (agent), 162 (manager)


Versions: SNMPv1, SNMPv2c, SNMPv3

Operations: GET, SET, TRAP

IP Addressing and Subnetting

IPv4 Address Classes


Class A: 1.0.0.0 to 126.255.255.255 (/8)

Class B: 128.0.0.0 to 191.255.255.255 (/16)


Class C: 192.0.0.0 to 223.255.255.255 (/24)
Class D: 224.0.0.0 to 239.255.255.255 (Multicast)

Class E: 240.0.0.0 to 255.255.255.255 (Experimental)

Private IP Address Ranges


Class A: 10.0.0.0/8

Class B: 172.16.0.0/12

Class C: 192.168.0.0/16

Subnetting
Subnetting divides a network into smaller subnetworks.

Subnet Mask

Purpose: Identifies network and host portions

Format: Dotted decimal (255.255.255.0) or CIDR (/24)

Calculation: Network bits = 1, Host bits = 0

CIDR (Classless Inter-Domain Routing)

Notation: IP address followed by slash and prefix length


Example: 192.168.1.0/24

Benefits: Efficient address allocation, route aggregation

Subnetting Example

Network: 192.168.1.0/24

Hosts per subnet: 2^(32-24) - 2 = 254


Subnet 1: 192.168.1.0/25 (192.168.1.1-126)

Subnet 2: 192.168.1.128/25 (192.168.1.129-254)

Variable Length Subnet Masking (VLSM)


Allows different subnet sizes within the same network to optimize address usage.

Routing Protocols

Routing Fundamentals
Static Routing: Manually configured routes

Dynamic Routing: Automatic route discovery and updates


Routing Table: Database of network destinations
Metric: Cost of reaching a destination

Interior Gateway Protocols (IGP)

Routing Information Protocol (RIP)

Type: Distance Vector

Metric: Hop count (max 15)

Updates: Every 30 seconds

Versions: RIPv1, RIPv2, RIPng (IPv6)

Open Shortest Path First (OSPF)

Type: Link State

Metric: Cost based on bandwidth


Algorithm: Dijkstra's shortest path

Features: Fast convergence, hierarchical design

Enhanced Interior Gateway Routing Protocol (EIGRP)

Type: Hybrid (Distance Vector + Link State)

Metric: Composite (bandwidth, delay, reliability, load)

Features: Fast convergence, loop-free

Exterior Gateway Protocols (EGP)

Border Gateway Protocol (BGP)

Purpose: Inter-AS (Autonomous System) routing

Type: Path Vector


Versions: BGP-4 (current)

Features: Policy-based routing, loop prevention

Network Security

Security Threats
Eavesdropping: Unauthorized interception of data

Man-in-the-Middle: Intercepting and modifying communications

Denial of Service (DoS): Overwhelming system resources

IP Spoofing: Forging source IP addresses


Port Scanning: Probing for open network services

Security Measures

Firewalls

Purpose: Control network traffic based on rules

Types: Packet filtering, stateful, application-level

Placement: Network perimeter, host-based

Virtual Private Networks (VPN)

Purpose: Secure communication over public networks


Protocols: IPSec, SSL/TLS, PPTP, L2TP
Benefits: Confidentiality, integrity, authentication

Encryption

Symmetric: Same key for encryption/decryption (AES, DES)


Asymmetric: Different keys (RSA, ECC)

Hash Functions: One-way functions (SHA, MD5)

Authentication

Something you know: Passwords, PINs


Something you have: Tokens, certificates

Something you are: Biometrics

Network Access Control


802.1X: Port-based network access control

RADIUS: Remote authentication service

NAC: Network Access Control systems

Key Exam Topics Summary

Critical Concepts for CDACC


1. TCP/IP Model layers and their functions
2. TCP vs UDP comparison and use cases
3. IP addressing, subnetting, and CIDR

4. Common application protocols (HTTP, FTP, DNS, DHCP)


5. Routing protocols classification and characteristics
6. Network security fundamentals
7. IPv4 vs IPv6 differences

8. TCP connection establishment and termination


9. OSI model correlation with TCP/IP

10. Private vs public IP addresses

Practice Questions Focus Areas


Calculate subnet masks and network ranges
Identify protocol functions and port numbers
Analyze packet headers and fields

Compare routing protocol characteristics

Understand security protocol implementations

TCP/UDP header field purposes


Network troubleshooting scenarios

Additional Resources

Important Port Numbers to Remember


HTTP: 80

HTTPS: 443
FTP: 20, 21

SSH: 22
Telnet: 23
SMTP: 25

DNS: 53
DHCP: 67, 68

POP3: 110
IMAP: 143

SNMP: 161, 162

Common Network Commands


ping: Test connectivity
traceroute/tracert: Trace packet path

nslookup/dig: DNS queries


netstat: Network statistics
arp: Address Resolution Protocol table

ipconfig/ifconfig: Interface configuration

This comprehensive guide covers all essential TCP/IP and networking concepts required for the CDACC
syllabus. Focus on understanding the relationships between protocols and their practical applications in real
networks.

You might also like