2 Tcpip
2 Tcpip
TCP/IP
Impotance of Communication
• Where is communication is most important?
– Military
TCP/IP
• TCP - Transmission Control Protocol
• IP - Internet Protocol
• Developed by U.S. Army D.o.D
– D.o.D – Department of Defense
Morse Code
ASCII
D.o.D Model
• Reference Model
• Layered Approach
– 4 Layers
• Application Layer
• Transport Layer
• Internet Layer
• Network Access Layer
D.o.D Model vs OSI Model
D.o.D Model OSI Model
7. Application
4. Application 6. Presentation
5. Session
3. Transport 4. Transport
2. Internet 3. Network
2. Data Link
1. Network Access
1. Physical
D.o.D Model
• Protocol Stack
– Protocol → Set of rules
• Ex: HTTP, FTP, SMTP, POP, DHCP, DNS, IP,
ICMP, …
Application Layer
1. Telnet 8. POP
2. SSH 9. DNS
3. HTTP 10.DHCP
4. HTTPS
5. FTP
6. TFTP
7. SMTP
Telnet
• Teletype Network
• Used for remote access
• No Security (Plain Text Communication)
• Port Number: 23
SSH
• Security Shell
• Used for Remote Access
• Uses Encrypted Communication
• Port Number: 22
HTTP
• HyperText Transfer Protocol
• Used for Web Access
• Less Security
• Uses plain text communication
• Port Number: 80
HTTPS
• Secure HyperText Transfer Protocol
• Used for Web Access
• Encrypted Communication
• Port Number: 443
FTP
• File Transfer Protocol
• Used for File Sharing (Upload and Download)
• Authentication
• Port Number: 21
TFTP
• Trivial File Transfer Protocol
• Used for File Sharing (Upload and Download)
• No Security
• Port Number: 69
SMTP
• Simple Mail Transfer Protocol
• Used for sending mails
• Port Number: 25
POP
• Post Office Protocol
• Used for receiving mails
• Port Number: 110
DNS
• Domain Name System
• Provides name for IP address
– Example: google.com
• Port Number: 53
DHCP
• Dynamic Host Configuration Protocol
• Lease IP Address to hosts
• Port Number:
– Server : 67
– Client : 68
3. Transport Layer
1. TCP – Transmission Control Protocol
2. UDP – User Datagram Protocol
TCP vs. UDP
TCP UDP
Reliable Unreliable
Have Acknowledgement No Acknowledgement
Slow Fast
netstat -A
TCP and UDP Applications
TCP UDP
TELNET (23) TFTP (69)
SSH (22) DNS (53)
HTTP (80) DHCP (67, 68)
HTTPS (443)
FTP (21)
SMTP (25)
POP (110)
DNS (53)
DNS – UDP for Name Resolution
DNS – TCP for Zone Transfer
2. Internet Layer
1. IP
2. ICMP
3. ARP
IP
• IP – Internet Protocol
– Versions
• IPv4 Internet Protocol version 4
• IPv6 Internet Protocol version 6
– IPv4 – 32 bit Address (used on LAN)
– IPv6 – 128 bit Address (used on Internet)
ICMP
• Internet Control Messaging Protocol
– The primary purpose of ICMP is for error
reporting.
– A secondary use of ICMP protocol is to
perform network diagnostics; the
commonly used terminal utilities traceroute
and ping both operate using ICMP.
PING
• Packet InterNet Groper
– Check availability of the destination
PING
PING Arguments
Argument Definition Parameter
Size Size of the ICMP -l <size in bytes>
Echo Message
Time Time used to send -
ICMP Echo Message
TTL (Time To Live) Used to avoid -
Routing Loops
Windows – 128
Linux – 64
Cisco – 255
PING Arguments
Argument Definition Parameter
n PING Specify the number -n <no of packets>
of ping packets
Unlimited Ping Ping doesn’t stop -t
until pressing Ctrl +
C
TRACERT
• Trace Route
– Find the path to the destination
TRACERT
TRACERT
ARP
• Address Resolution Protocol
– Find MAC address for known IP address
• To list the ARP Cache, Open Command Prompt and enter
– arp /a
• To clear the ARP cache, Open Command Prompt using
Administrator Mode and enter
– arp /d
ARP
ARP
1. Network Access Layer
1. MAC Address
2. Cable Categories
MAC Address
• unique identifier assigned to a network
interface controller (NIC) for use as a network
address in communications within a network
segment.
– 48 bit Address (12 digit Hex Decimal)
HEX-DEC-BIN Table
Hex Dec Bin Hex Dec Bin
0 0 0000 8 8 1000
1 1 0001 9 9 1001
2 2 0010 A 10 1010
3 3 0011 B 11 1011
4 4 0100 C 12 1100
5 5 0101 D 13 1101
6 6 0110 E 14 1110
7 7 0111 F 15 1111
Cable Categories
Category Type Speed Max. Length
CAT1 Voice only (2 pins)
CAT2 Voice + Data 4mbps -
CAT3 UTP 10 mbps 100 meters
CAT5 UTP 100 mbps 100 meters
CAT5e UTP 1 gbps 100 meters
CAT6 UTP & STP 1 gbps 100 meters
CAT6a STP 10 gbps 100 meters
CAT7 STP 10 gbps 100 meters
CAT7a STP 10 gbps 100 meters