Top Banner
Information Technology III – EE3104 Lecture 03 – Addressing in a Network
55

Lecture 03 networking

Apr 15, 2017

Download

Engineering

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 03 networking

Information Technology III – EE3104

Lecture 03 – Addressing in a Network

Page 2: Lecture 03 networking

Addressing with TCP/IPAddress

PortAddress

LogicalAddress

PhysicalAddress

MAC Address

IP Address

Port Address

Identify a Computer

Identify a Process

Page 3: Lecture 03 networking

Physical Address Stored in the Network Interface Card (NIC)

A hardware setting set by the manufacturer of NIC .

UnchangeableEx :- MAC address 

For Ethernet, the MAC address is a 48 bit or 12 Hex number Ex : 5A:B3:87:F1:93:7C5A-B3-87-F1-93-7C

MAC address operates in the Data Link Layer (Layer 2)

CRC/FCS DATA DA SA SOF PreambleEthernet Frame

Page 4: Lecture 03 networking

Logical Address Address scheme depends on the used protocol

Widely used protocol is TCP/IP Ex :- IP Address

192.168.16.5310.39.40.3

Logical address operates at the Network Layer (Layer 3)

Page 5: Lecture 03 networking

IP Address The worldwide IP Address (high level) is decided by Internet

Assigned Numbers Authority (IANA)

Within Sri Lanka Internet Address authority is Asia Pacific Network Information Center (APNIC )

IP Addresses

IP Version 6 (IPV6) (IPng) 128 bit scheme

IP Version 4 (IPV4) 32 bit scheme

Page 6: Lecture 03 networking

IP Version 4 (IPV4) The 32 bits are represented in following manner.

Byte 1. Byte 2. Byte 3. Byte 4( 1 byte = 8 bits)

Page 7: Lecture 03 networking

IP Version 4 (IPV4) cont.

Page 8: Lecture 03 networking

IP Version 4 (IPV4) cont. The minimum value of a byte

00000000 = 0

The maximum value of a byte 11111111 = 255

The minimum IP Address0.0.0.0

The maximum IP Address 255.255.255.255

Page 9: Lecture 03 networking

Example Change the following IPV4 addresses from binary to dotted decimal notation

10000001 00001011 00001011 11101111 11000001 10000011 00011011 11111111 11100111 11011011 10001011 01101111 11111001 10011011 11111011 00001111

Change the following IPV4 addresses from dotted decimal notation to binary format 111.56.45.78 221.34.7.82 241.8.56.12 75.45.34.78

Page 10: Lecture 03 networking

Network ID and Host ID

IP Addresses - Network ID + Host ID

Part of the IP Address is allocated to Network ID

Remaining part is allocated to Host ID (Computer ID)

Page 11: Lecture 03 networking

Classes of IP addresses

Class Net ID Host IDA 1 Byte 3 BytesB 2 Bytes 2 BytesC 3 Bytes 1 Byte

Page 12: Lecture 03 networking

Five IP Address ClassesIP Address Class

Format Purpose Higher Order Bit(s)

Address range No Bits Network/

Host

Max. Host

A N.H.H.H Large organizations 0 1.0.0.0 to 126.0.0.0

7/24 16777214

B N.N.H.H Medium size organizations

1,0 128.1.0.0 to 191.254.0.0

14/16 65634

C N.N.N.H Small organizations 1,1,0 192.0.1.0 to 223.255.254.0

21/8 254

D N/A Multicast groups 1,1,1,0 224.0.0.0 to 239.255.255.255

N/A N/A

E N/A Experimental 1,1,1,1 240.0.0.0 to 254.255.255.255

N/A N/A

Page 13: Lecture 03 networking

Classes of IP addresses cont. Class D is introduced for Multicasting

Class E is reserved

Page 14: Lecture 03 networking

Class A 10 . 0 . 0 . 0

0000 1010 . 0000 0000 . 0000 0000 . 0000 0000

1 byte (8 bits) allocated for Network ID and remaining 3 bytes (24 bits) allocated to Host ID

The maximum number of Networks 28 = 256

The maximum number of Hosts per each network 224

Both in Network ID and Host ID all 0s and all 1s are reserved for special purposes.

The actual maximum no. Networks = 28 - 2 = 254The actual maximum no. of Hosts per Network =224 - 2

Network ID Host ID

Page 15: Lecture 03 networking

Class Theoretical Maximum number of Networks

Theoretical Maximum number of Hosts per

Networks

A 28 =256 224=16777216

B 216= 65536 216= 65536

C 224=16777216 28 =256

Page 16: Lecture 03 networking

0

1 0

1 1 0

Class A byte 1

Class B byte 1

Class C byte 1

Class Minimum Network ID Maximum Networks ID

A00000000

001111111

127

B10000000.00000000

128.010111111.11111111

191.255

C11000000.00000000.00000000

192.0.011011111.11111111.11111111

223.255.255

Page 17: Lecture 03 networking

Network Address and Broadcast Address For the Network Address,

the Host ID part of the IP Address will be considered as All 0s

For the Broadcast Address, the Host ID part of the IP Address will be considered as All 1s

Ex : 103.58.35.1This is a Class A address

Net ID is = 103Host ID is = 58.35.1

Network Address 103.0.0.0 Broadcast Address 103.255.255.255 

Page 18: Lecture 03 networking

198 . 8 . 0 . 11100 0110 . 0000 1000 . 0000 0000 . 0000 0001

The actual maximum no. Networks = 224 - 2

The actual maximum no. of Hosts per Network =28 - 2 = 254

Network Address : 1100 0110 . 0000 1000 . 0000 0000 . 0000 0000 (198.8.0.0)

Broadcast Address : 1100 0110 . 0000 1000 . 0000 0000 . 1111 1111 (198.8.0.255)

Network ID : 3 bytes (24 bits) Host ID : 1 byte (8 bits)

Class C

Page 19: Lecture 03 networking

Example Find the class of each address

00000001 00001011 00001011 11101111 11000001 10000011 00011011 11111111 10100111 11011011 10000101 01101111 11110011 10011011 11111011 00001111

Find the class of each address 227.12.14.87 193.14.56.22 14.23.120.8 252.5.15.111

Page 20: Lecture 03 networking

Example Find the number of addresses in the block, the first address and the last

address for following addresses 73.22.17.25 180.8.17.9 200.11.8.45

Page 21: Lecture 03 networking

Classful Addressing

Page 22: Lecture 03 networking

Classful Addressing - Subnet Mask

Net ID part : All 1’sHost ID part : All 0’s

• A network mask or a default mask in classful addressing is a 32-bit number with n leftmost bits all set to 1s and (32 − n) rightmost bits all set to 0s.

• Since n is different for each class in classful addressing, we have three default masks in classful addressing as shown in Figure

Page 23: Lecture 03 networking

Masking Concept

Page 24: Lecture 03 networking

AND Operation

Page 25: Lecture 03 networking

Example

Find the beginning address (network address) for following network addresses. 23.56.7.91 132.6.17.85 201.180.56.5

Page 26: Lecture 03 networking

Subnetting/Supernettingand

Classless Addressing

Page 27: Lecture 03 networking

A network with two levels of hierarchy (not subnetted)

Page 28: Lecture 03 networking

A network with three levels of hierarchy (subnetted)

Page 29: Lecture 03 networking

Addresses in a network with and without subnetting

Page 30: Lecture 03 networking

Default mask and subnet mask

Page 31: Lecture 03 networking

Example 1

What is the subnetwork address if the destination address is 200.45.34.56 and the subnet mask is 255.255.240.0?

Page 32: Lecture 03 networking

Solution

11001000 00101101 00100010 00111000

11111111 11111111 11110000 00000000

11001000 00101101 00100000 00000000

The subnetwork address is 200.45.32.0.

Page 33: Lecture 03 networking

Example 2

What is the subnetwork address if the destination address is 19.30.80.5 and the mask is 255.255.192.0?

Solution

See Figure 5.6

Page 34: Lecture 03 networking

Comparison of a default mask and a subnet mask

Page 35: Lecture 03 networking

Example 3

A company is granted the site address 201.70.64.0 (class C). The company needs six subnets. Design the subnets.

Page 36: Lecture 03 networking

Solution (Continued)

The company needs six subnets. This number 6 is not a power of 2. The next number that is a power of 2 is 8 (23). We need 3 more 1s in the subnet mask. The total number of 1s in the subnet mask is 27 (24 + 3).

The total number of 0s is 5 (32 - 27). The mask is

Page 37: Lecture 03 networking

Solution (Continued)

11111111 11111111 11111111 11100000or

255.255.255.224

The number of subnets is 8.The number of addresses in each subnet is 25 (5 is the number of 0s) or 32.

Page 38: Lecture 03 networking

Example 3

Page 39: Lecture 03 networking

Example 4

A company is granted the site address 181.56.0.0 (class B). The company needs 1000 subnets. Design the subnets.

Page 40: Lecture 03 networking

Solution (Continued)

The mask is 11111111 11111111 11111111 11000000 or 255.255.255.192.The number of subnets is 1024.The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.

Page 41: Lecture 03 networking

Example 4

Page 42: Lecture 03 networking

SUPERNETTING

Page 43: Lecture 03 networking

The problem Most Class A or B network addresses have already

been assigned.

The problem is compounded by the fact that Class C networks are limited to a maximum of 254 hosts.

Page 44: Lecture 03 networking

Solution To create a supernetwork, or supernet, an

organization uses a block of IP addresses assigned to several Class C networks to create one large network.

With supernetting you can combine small networks into one larger network.

Page 45: Lecture 03 networking

A supernetwork

Page 46: Lecture 03 networking

Rules:** The number of blocks must be a power of 2 (1, 2, 4, 8, 16, . . .).

** The blocks must be contiguous in the address space (no gaps between the blocks).

** The third byte of the first address in the superblock must be evenly divisible by the number of blocks. In other words, if the number of blocks is N, the third byte must be divisible by N.

Page 47: Lecture 03 networking

Example 5 A company needs 600 addresses. Which of the following set of class C blocks can be used to form a supernet for this company?

198.47.32.0 198.47.33.0 198.47.34.0

198.47.32.0 198.47.42.0 198.47.52.0 198.47.62.0

198.47.31.0 198.47.32.0 198.47.33.0 198.47.52.0

198.47.32.0 198.47.33.0 198.47.34.0 198.47.35.0

Page 48: Lecture 03 networking

Solution

1: No, there are only three blocks. 2: No, the blocks are not contiguous.3: No, 31 in the first block is not divisible by 4. 4: Yes, all three requirements are fulfilled.

Page 49: Lecture 03 networking

In subnetting, we need the first address of the subnet and the subnet mask to define the range of addresses.

Page 50: Lecture 03 networking

In supernetting, we need the first address of

the supernet and the supernet mask to

define the range of addresses.

Page 51: Lecture 03 networking

Comparison of subnet, default, and supernet masks

Page 52: Lecture 03 networking

Example 6

We need to make a supernetwork out of 16 class C blocks. What is the supernet mask?

Solution

We need 16 blocks. For 16 blocks we need to change four 1s to 0s in the default mask. So the mask is

11111111 11111111 11110000 00000000or

255.255.240.0

Page 53: Lecture 03 networking

Example 7

A supernet has a first address of 205.16.32.0 and a supernet mask of 255.255.248.0. A router receives three packets with the following destination addresses:

205.16.37.44205.16.42.56205.17.33.76

Which packet belongs to the supernet?

Page 54: Lecture 03 networking

Solution

We apply the supernet mask to see if we can find the beginning address.205.16.37.44 AND 255.255.248.0 205.16.32.0205.16.42.56 AND 255.255.248.0 205.16.40.0205.17.33.76 AND 255.255.248.0 205.17.32.0Only the first address belongs to this supernet.

Page 55: Lecture 03 networking

Example 8

A supernet has a first address of 205.16.32.0 and a supernet mask of 255.255.248.0. How many blocks are in this supernet and what is the range of addresses?Solution

The supernet has 21 1s. The default mask has 24 1s. Since the difference is 3, there are 23 or 8 blocks in this supernet. The blocks are 205.16.32.0 to 205.16.39.0. The first address is 205.16.32.0. The last address is 205.16.39.255.