1 tcp/ip introduction ผศ. ดร. อนันต์ ผลเพิ่ม anan phonphoem, ph.d....
TRANSCRIPT
1
TCP/IP introduction
ผศ.ดร. อนั�นัต์ ผลเพิ่ �มAnan Phonphoem, Ph.D.
http://www.cpe.ku.ac.th/~anan
Computer Engineering Department
Kasetsart University, Bangkok, Thailand
2
Outline TCP/IP Overview IP Address Subnet Design
3
An Internet according to TCP/IP
4
OSI Model and TCP/IP7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
Applications
TCP/ UDP
IP
Physical
Data Link (Network)
(Transport)
(Internet)
5
TCP/IP Layering Concept
Transmission
Network Interface
NetworkApplication
Applications
End-to-endServices
Transport
RoutingInternet
Physical
Network
6
TCP/IP Encapsulation
Applications
TCP/ UDP
IP
Physical
Data Link
Message
User Datagram (segment)
Datagram
Frame
Bits
7
Data Flow
Hello
1001101001011101011
H Hello
Applications
TCP/ UDP
IP
Physical
Data Link
H HelloH
2 TH HelloH
8
UDP Datagram format
9
TCP segment format
10
IP Datagram
11
Ethernet Frame
Destination
Physical Address
(First 6-byte)
Type
2 Bytes
Ethernet Header
00 A0 24 A6 F6 44 00 A0 24 A6 F6 59 08 00
Source
Physical Address
(Second 6-byte)
DataIP
Header
TCP
Header
CRC4 bytes
12
Internet
13
Data Flow over the Internet
Source DestinationRouter Router
Application
TCP/IP
IP
Data Link
Physical
Application
TCP/IP
IP
Data Link
Physical
IP
Data Link
Physical
IP
Data Link
Physical
14
IP Datagram
15
Internet Address
16
Internet Classes
Classful Addressing
17
Internet Classes
Class AClass C
DE
Class B
18
IP address in decimal notation
19
Class ranges of Internet Address
20
Class A example
21
Class C example
22
Network Address
23
Sample internet
Network and Host addresses
24
A Network with Two Levels of Hierarchy
25
A Network with Three Levels of Hierarchy
26
Addresses with and without Subnetting
27
Masking
28
Default Mask
Class
In BinaryIn Dotted-Decimal
Using Slash
A 11111111 00000000 00000000 00000000 255.0.0.0 /8
B 11111111 11111111 00000000 00000000 255.255.0.0 /16
C 11111111 111111111 11111111 00000000255.255.255
.0/24
29
Subnet Design Given a network 194.30.12.0 with
16 hosts in each subnetwork Find the following:
The number of subnetworks Sub-network ID / Broadcast Address Sub-netmask First/Last address that can be used
for each subnet
30
Subnet Design
Last Byte(Host ID)
192.30.12.0Class C IP address
16 Hosts 24 =16 is not enough (subnetID and broadcast) 25 = 32 total of 30 hosts 5 bits for Host and 3 bits for subnet
HostSubnet
31
Subnet Design
255 255 255. . .1 1 1 0 0 0 0 0
Subnet Mask
00000000 = 000100000 = 3201000000 = 6401100000 = 9610000000 = 12810100000 = 16011000000 = 19211100000 = 224
Subnet Host
255 255 255. . . 224
Subnet ID 194 30 12. . .194 30 12. . .194 30 12. . .194 30 12. . .194 30 12. . .194 30 12. . .194 30 12. . .194 30 12. . .
32
Subnet DesignSubne
tSubnet ID 1st Add Last Add Broadcast
0 192.30.12.0 192.30.12.1 192.30.12.30
192.30.12.31
1 192.30.12.32
192.30.12.33
192.30.12.62
192.30.12.63
2 192.30.12.64
192.30.12.65
192.30.12.94
192.30.12.95
3 192.30.12.96
192.30.12.97
192.30.12.126
192.30.12.127
4 192.30.12.128
192.30.12.129
192.30.12.158
192.30.12.159
5 192.30.12.160
192.30.12.161
192.30.12.190
192.30.12.191
6 192.30.12.192
192.30.12.193
192.30.12.222
192.30.12.223
7 192.30.12.224
192.30.12.225
192.30.12.254
192.30.12.255