Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
1
Internet Protocol (IP) Address
รศ. ดร. อนันต์ ผลเพิ.มAsso. Prof. Anan Phonphoem, Ph.D.
[email protected]://www.cpe.ku.ac.th/~anan
Computer Engineering DepartmentKasetsart University, Bangkok, Thailand
2
Outlinen IP Addressn CIDR
3
Address for Virtual Internetn Internet protocol must hide physical
network detailsn Application does NOT care about physicaln Need address to communicate without
knowing underlying network of each other n Address should be
n Uniquen Uniform addressing schemen Independent to physical networks
4
IP Addressing Schemen IPv4n Unique 32-bit binary numbern Assigned to each network interfacen Used for identify host and communicaten Two-level hierarchical address
n prefix (network ID) – assign globaln suffix (Node/host ID) – assigned local
n Address must be coordinated globally
5
Internet Protocol Address (IPv4)
prefix suffix
6
Internet Classes
Classfull Addressing
7
IP Address Class
8
IP Address Class
A50%
B25%
C12.5%D
E
9
No. of Network / Host
10
IP address in decimal notation
27 26 25 24 23 22 21 20
0 0 0 0 1 0 1 1
8 + 2 + 1 = 11
x x x x x x x x
11
IP address practice10011110 01101100 00100000 00010010 158.108.32.18
00001100 00011001 00000001 00010111 12.25.1.23
11001001 01111101 10001001 11010101 201.125.137.213
#1
#2
#3
12
Class ranges of Internet Address
13
IP address in decimal notation
www.ku.ac.th
14
Class A example
15
Class C example
16
Network Address
17
Sample internet
Network and Host addresses
18
A Network with Two Levels of Hierarchy
19
A Network with Three Levels of Hierarchy
20
Addresses with and without Subnetting
21
Masking
22
Default Mask
Class In Binary In 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 00000000 255.255.255.0 /24
Example
23
A router receives a packet with the destinationaddress 201.24.67.32. Show how the router finds thenetwork address of the packet.SolutionClass Cè default mask = 255.255.255.0
67
24
Subnet Designn Given a network 194.30.12.0 with 16
hosts in each subnetwork n Find the following:
n The number of subnetworksn Sub-network ID / Broadcast Addressn Sub-netmaskn First/Last address that can be used for
each subnet
25
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
26
Subnet Design
255 255 255. . .1 1 1 0 0 0 0 0Subnet 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. . .
27
Subnet DesignSubnet Subnet 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
28
Outlinen IP Addressn CIDR
29
CIDRn Classless Inter-Domain Routingn Not use binary representation
n CIDR Notationn Ex. 158.106.0.0/16
30
CIDR Host Address
31
Special IP Addressesn Network Address
n all hosts = 0; e.g. 158.108.0.0/16n Directed Broadcast Address
n all hosts = 1; e.g. 158.108.255.255/16n Limited Broadcast Address
n all 1; e.g. 255.255.255.255n This computer Address
n all 0; e.g. 0.0.0.0n Loopback Address
n 127.0.0.0/8è 127.0.0.1
32
Loopback Address
โปรเซส Aโปรเซส A
/
Physical
127.0.0.1
โปรเซส AProcess A
TCP/UDP
IP
Data Link
Loopback Interface
127.0.0.1
Other Addresses
Process B
Incoming packetto Loopback Interface
Outgoing packet from Loopback to Process
33
Directed Broadcast Addressn Ending with 255n Use for sending to all nodes in class rangen Class A broadcast:
n 10.255.255.255n Class B broadcast:
n 158.108.255.255n Class C broadcast:
n 202.100.15.255
34
Special IP Address
Project assignmentn Group of 3 peoplen Create a “Computer Network Tool”n Submit code/applicationn Presentation: in class
(5 min. per group)
35
Scoren 10 Pts (10%) of the total Scoren Score criterion
n Creativity (30%)n Difficulty (10%)n Correctness (20%)n Completeness (20%)n Usability (10%)n Artistry (10%)
n Average score by 3-4 Judges36
Project Examples n Find your NIC’s Vendorn IP subnet calculatorn Network Statistical Analysisn DNS Lookup tooln Traceroute GUIn IP Scannern Wiresharkn Network security toolsn Network log analysisn Plot graph of network trafficn Cacti, Nagios, Icinga … 37
Simple
Complicate