Introduction To TCP/IP
Introduction To TCP/IP
Host Host
Internet
TCP/IP
7 Application
6 Presentation 5
Application
5 Session
4 Transport Transport 4
3 Network Internet 3
1 Physical Physical 1
Application layer Overview
File Transfer
-TFTP*
-FTP*
-NFS
E-mail
-SMTP
Remote login
Application -Telnet*
-rlogin*
Network Management
-SNMP*
Transport Name Management
-DNS*
Internet
* Used by the router
Data Link
Physical
Transport Layer Overview
Application
Transmission Control Connection
Protocol (TCP) Orionted
Transport
User Datagram
Internet Protocol (UDP) Connectionless
Data Link
Physical
TCP Segment Format
Bit 0 Bit 31
Options (0 or 32 if any)
Data (Varies)
Port Numbers
T
E S T
Transport Layer F D S
L M F R
T N N
N T T I
P S M
E P P P
P
T
1) Send SYS
(SEQ=100
ctl=SYS)
SYS received
Sender
Send 1
Receive 1
Send ACK2
Receive ACK2
Send 2
Receive 2
Send ACK3
Receive ACK3
Send 3
Receive 3
Send ACK4
Receive ACK4
Window size = 1
kTCP Sequence and Acknowledgment Number
Window size = 3
send 2
Window size = 3
send 3 ACK 3 Packet 3 is
Window size = 2 Droppend
Window size = 3
send 3
Window size = 3 ACK 5
send 4 Window size = 2
UDP Segment Format
Options (0 or 32 if any)
TCP UPP
Transport
Layer
6 17 Protocol
Number
Internet
Layer
IP
Application
Destination
1
Unreachable
Transport
Echo (ping)
Internet Other
Data Link
Physical
Address Resolution Protocol
I heard that
I need the broadcast the
Ethernet message is for
address of me. Here is my
176.16.3.2 Ethernet Address.
172.16.3.1 172.16.3.2
IP: 172.16.3.2
Ethernet: 0800.0020.1111
Map IP MAC
Local ARP
Reverse ARP
I heard that
broadcast. Your
What is the my
IP address is
IP address?
192.16.3.25
Ethernet: 0800.0020.1111IP
= ???
IP: 172.16.3.25
Ethernet: 0800.0020.1111
Map MAC IP
Introduction to TCP/IP
Address
172.16.0.1
172.18.0.1
172.18.0.2 172.16.0.2
HDR SA DA DATA
192.168.1.0
10.13.0.0
Dotted
Network Host
Decimal
Maximum 255 255 255 255
1
1
2
2
2
32
128
32
128
32
128
32
128
16
8
4
16
8
4
16
8
4
16
8
4
64
64
64
64
Example
172 16 122 204
Decimal
Example 10101100 00010000 01111010 11001100
Binary
IP Address Classes
1 8 9 16 17 24 25 32
Bits:
0NNNNNNN Host Host Host
Class A: Range (1-126)
Bits: 1 8 9 16 17 24 25 32
10NNNNNN Network Host Host
Class B:
Range (128-191)
Bits: 1 8 9 16 17 24 25 32
Class C: 110NNNNNN Network Network Host
Range (192-223)
Bits: 1 8 9 16 17 24 25 32
1110NNNNN Multicast group Multicast group Multicast group
Class D:
Range (224-239)
Host Addresses
10.6.24.2 10.1.1.1
172.16.2.2
10.180.30.118
172.16.12.12
Routing Table
Network Interface
172.16 12 . 12 172.16.0.0 E0
10.0.0.0 E1
Network Host
Determining Available Host
Addresses
Network Host
172 16 0 0
15
16
14
13
12
11
10
8
7
6
5
4
3
2
1
9
00000000 00000000
00000000 00000001
00000000 00000011 1
…
2
11111111 11111101 3
…
11111111 11111110
11111111 11111111
65534
65535
65536
- 2
65534
2N-2 = 216-2 =65534
IP Address Classes Exercise
10.2.1.1
128.63.2.100
201.222.5.64
192.6.141.2.
130.113.64.16
256.241.201.10
Addressing Without Subnets
……
172.16.0.0
Network 172.16.0.0
Addressing with Subnet
172.16.0.3
172.16.0.4
172.16.0.1 172.16.0.2
Network 172.16.0.0
Subnet Addressing
172.16.3.1 172.16.3.5
172.16.2.200
E1
172.16.2.2 EO 172.16.3.100
172.16.2.1
172.16.3.150
172.16.2.160
Routing Table
Network Interface
Network Host
IP
Address 172 16 0 0
0
Default Network Host
Subnet 255 255 0 Host
Mask Also Written as “/16” where 16 represent the number of 1 s in the
mask. 0
8-bit Network Subnet
Subnet 255 255 255
Mask Also Written as”/24” where 24 represent the number of 1 s
in the mask,
Decimal Equivalents of bit patterns
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0 = 0
1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255
Subnet Mask Without Subnets
Network Host
Network 172 16 0 0
Number
Subnets not in use-the default
Subnet Mask With Subnets
128
248
252
254
192
224
240
255
0
Network
Number 172 16 2
Network Subnet
128
248
252
254
224
240
248
192
224
240
255
128
192
252
254
255
Network
Number 172 16 2 128
172.16.2.10 255.255.255.0
10.6.24.20 255.255.240.0
10.30.36.12 255.255.255.0
Broadcast addresses
172.16.0.3
172.16.0.4
172.16.0.1 172.16.0.2
172.16.1.0
(Directed broadcast)
255.255.255.255
(Local network broadcast)
172.16.255.255
(All Subnet broadcast)
Addressing Summary
Example
172 16 2 160
3
172.16.2.160 10101100 00010000 00000010 10100000 Host
255.255.255.192 Mask
11111111 11111111 11111111 11000000
9 8
172.16.2.128 10101100 00010000 00000010 10000000 Subnet
Host
Address = 172.16.2.1 – 172 16.2.254
Broadcast Address = 172.16.2.255
No. Bits Subnet mask No.Subnets No.Hosts
1 255.255.192.0 2 16,382
2 255.255.224.0 6 8190
3 255.255.240.0 14 4049
4 255.255.248.0 30 2046
5 255.255.252.0 62 1022
Other
192.168.5.16
Subnets
192.168.5.32 192.168.5.48
Class C Subnet Planning
Example
Host
Address = 192.168.5.121 – 192.168.5.126
Broadcast Address = 192.168.5.127
Eight bits of subnetting
No. Bits Subnet mask No.Subnets No.Hosts
1 255.255.255.192 2 62
2 255.255.255.224 6 30
3 255.255.255.240 14 14
4 255.255.255.248 30 6
5 255.255.255.252 62 2
Broadcast Addresses Exercise
201.222.10.60 255.255.255.248
15.16.193.6 255.255.248.0
128.16.32.13 255.255.255.252
153.50.6.27 255.255.255.128
Router Name Sever
Configuration
DNS SERVER
VLAN to VLAN
Overview
Fao/0 Router on
a stick
ISL
VLAN 1 VLAN 2
Application
TCP
IP
10.1.1.2 10.2.2.2
ISL
Network layer device combine multiple
Ethernet
broadcast domains