# The OSI Model

```Chapter 4
Mi-Jung Choi
Dept. of Computer Science and Engineering
mjchoi@postech.ac.kr
1
4.1 Introduction
 For a host to communicate with any other host
Need a universal identification system
Need to name each host
defines a host or a router on the internet
 The IP addresses are unique in the sense that two devices can
never have the same address. However, a device can have more
2
Notation
 Binary notation
01110101
10010101
00011101
11101010
 Decimal point notation
3
In classful addressing, the address space is divided into five classes: A, B, C, D,
and E.
Finding the class in binary notation
4
5
 Finding the class in decimal notation
6
Netid and Hostid
 Each IP address is made of two parts; netid and hostid.
 Netid defines a network; hostid identifies a host on that network.
7
Netid and Hostid (cont’d)
 IP addresses are divided into five different classes: A, B, C, D, and E
8
Classes and Blocks
 Blocks in class A
Class A is divided into 128 blocks with each block having a different netid.
Millions of class A
9
Classes and Blocks (cont’d)
 Class B is divided into 16,384 blocks with each block having a different
netid
are wasted.
10
Classes and Blocks (cont’d)
 Class C is divided into 2,097,152 blocks with each block having a different
netid.
a class C block
is smaller than
the needs of most
organizations
11
Classes and Blocks (cont’d)
 Class D addresses are used for multicasting;
there is only one block in this class.
 Class E addresses are reserved for special purposes;
most of the block is wasted.
12
 The network address defines the network to the rest of the Internet.
 Given the network address, we can find the class of the address,
the block, and the range of the addresses in the block
(the first address in the block) is the one that is assigned to the
organization.
13
 A mask is a 32-bit binary number that gives the first address in the block
(the network address) when bitwise ANDed with an address in the block.
14
 AND Operation
 The network address is the beginning address of each block. It can be
found by applying the default mask to any of the addresses in the block
(including itself). It retains the netid of the block and sets the hostid to
zero. (refer table 4.2)
15
 Some parts of the address space in class A, B, C for special addresses
16
 Network address : an address with the hostid all set to 0s
17
 Direct Broadcast Address : Used by a router to send a packet to all hosts
in a specific network
18
 Limited Broadcast Address : all 1s for the netid and hostid (32bits)
19
 This Host on This Network : used by a host at bootstrap time when it does
20
 Specific Host on This Network : used by a host to send a message to
another on the same network
21
IP address of the first byte : 127
Used to test the software on a machine
Used by a client process to send a message to a server process on the same machine
“Ping”
22
 A number of blocks in each class are assigned for private use.
They are not recognized globally.
Class
Netid
Total
Class A
10.0.0
1
Class B
172.16 to 172.31
16
Class C
192.68.0 to 192.68.255
256
23
 Unicast communication is one-to-one.
 Multicast communication is one-to-many.
24
 Assigned Multicast addresses : starting with a 224.0.0 prefix
25
26
 Multicast address for conferencing : starting with a 224.0.1 prefix
27
Allowed only at the local level


No broadcasting is allowed at the global level
28
A Sample Internet with Classful Address
 Token Ring LAN (Class C), Ethernet LAN (Class B), Ethernet LAN (Class A), Point-topoint WAN, A Switched WAN
29
4.4 Subnetting and Supernetting
 Subnetting
A network is divided into several smaller networks with each
subnetwork (or subnet) having its subnetwork address
 Supernetting
Combining several class C addresses to create a larger range of
 IP Addresses are designed with two levels of hierarchy
30
Subnetting
 Classes A, B, C in IP addressing are designed with two levels of hierarchy (not
subnetted)
Netid and Hostid
31
Subnetting (cont’d)
 Further division of a network into smaller networks called subnetworks
 R1 differentiating subnets
32
Subnetting (cont’d)
 Three levels of hierarchy : netid, subnetid, and hostid
33
Subnetting (cont’d)
 Three steps of the routing for an IP datagram
Delivery to the site, delivery to the subnetwork, and delivery to the
host
 Hierarchy concept in a telephone number
031
34
 A process that extracts the address of the physical network (network/subnetwork
35
 Given an IP address, we can find the subnet address the same
way we found the network address in the previous chapter. We
we use binary notation for both the address and the mask and then apply
the AND operation to find the subnet address.
 Example 15
200.45.34.56 and the subnet mask is 255.255.240.0?
36
 Solution
11001000 00101101 00100010 00111000
11111111 11111111 11110000 00000000
11001000 00101101 00100000 00000000
37

38
Supernetting
 A block of class x addresses
 For example,
An organization that needs 1,000 addresses can be granted four class
39
Supernetting (cont’d)
 4 class C addresses combine to make one supernetwork
40