Top Banner
٣/١١/١٤٣٠ ١ 1 IP Addressing Lecture 2 2 IP address “A unique identifier for a host on an internet” (Tannenbaum - “Computer networks”) “An identifier for a computer or device on a TCP/IP network” (webopedia.com)
17

L2 IP SubNetting.ppt

Apr 13, 2022

Download

Documents

dariahiddleston
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: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١

1

IP Addressing

Lecture 2

2

IP address

“A unique identifier for a host on an internet” (Tannenbaum - “Computer networks”)

“An identifier for a computer or device on a TCP/IP network” (webopedia.com)

Page 2: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٢

3

Dotted Decimal Notation IP addresses consist of 4 decimals written in a

so-called dotted decimal notation. In binary it is a 32-bit number (in IPv4):

1000111110000000 10001001 10010000

1st Byte

= 128

2nd Byte

= 143

3rd Byte

= 137

4th Byte

= 144

128.143.137.144

4

IP address - what for?

Each Packet has two IP addresses

Source: Who sent this packet?

Destination: Who is supposed to receive the packet?

Page 3: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٣

5

IP Address Classes

The 5 IP classes are split up based on the value in the 1st octet:

Class A From 1 To 126 Class B From 128 To 191 Class C From 192 To 223 Class D From 224 To 239 Class E From 240 To 255

6

IP Address Classes

IP addresses are divided into 5 classes, each of which is designated with the alphabetic letters A to E.

Class D addresses are used for multicasting. Used on LANs Ranges from 224.0.0.0 to 239.255.255.255

Class E addresses are reserved for testing & future use.

Page 4: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٤

Multicasting Multicast is communication between a single sender and multiple

receivers on a network.

The nodes in the network take care of replicating the packet toreach multiple receivers only when necessary.

Multicast uses network infrastructure efficiently by requiring thesource to send a packet only once, even if it needs to be deliveredto a large number of receivers.

The nodes in the network take care of replicating the packet to reach multiple receivers only where necessary.

7

8

The NetID and the HostIDThe NetID and the HostID

Page 5: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٥

9

Address Classes & Ranges

Class A 126 networks A total of 16 million hosts

Class B 16,000 networks A total of 65,000 hosts

Class C 2 million networks A total of 254 hosts

10

In class A 127 is reserved for loop back

Determining Address Classes

Page 6: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٦

11

Determining Address Classes

12

Find the class of each address:

a. 227.12.14.87

b. 252.5.15.111

c. 134.11.78.56

SolutionSolutiona. The first byte is 227 (between 224 and 239); the class is D.b. The first byte is 252 (between 240 and 255); the class is E.c. The first byte is 134 (between 128 and 191); the class is B.

Address Classes

Page 7: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٧

13

Find the class of each address:

a. 000000001 00001011 00001011 11101111

b. 111111110011 10011011 11111011 00001111

SolutionSolution

a. The first bit is 0; this is a class A address.b. The first 4 bits are 1s; this is a class E address.

Address ClassesAddress Classes

14

Subnets & Subnetting

Page 8: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٨

15

Basic Idea of Subnetting Split the host number portion of an IP address into a

subnet number and a (smaller) host number. Result is a 3-layer hierarchy

Then: Internally, subnets are treated as separate networks Subnet structure is not visible outside the organization

network prefix

subnet numbernetwork prefix host number

extended network prefix

host number

16

Subnetting

Is the division of a single class A, B, or C network into smaller pieces.

Each subnetwork functions as if it were an independent network.

All subnets of a given network number use the same network-prefix but different subnet numbers.

Page 9: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

٩

17

Subnets

Machines in a subnet can communicate with each other without the need for routing.

Sub nets are used to add security measures to a specific subnetwork, such as Internet banking systems.

If a computer on a subnet tries to send a message to an address it doesn’t understand, it sends it to the default router (gateway).

18

Subnet Masks

The subnet mask is a 32-bit number just like the IP address.

A subnet mask identifies which portion of the 4 octets is used to identify the subnet-number and host number

When subnet masks are used, an IP address is interpreted as: [IP address] = [network address] [subnetwork address]

[host address]

Page 10: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١٠

19

Default Subnet Masks

Class A 255.0.0.0

Class B255.255.0.0

Class C255.255.255.0

20

IP Subnet Masks

By using subnet masking, you can break the host ID portion of the address into a subnet ID and host ID.

For example, the subnet mask 255.255.255.0 applied to a class B address will break the host ID (normally 16 bits) into an 8-bit subnet ID and an 8-bit host ID.

Page 11: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١١

21

Sub-netting scenario

Once a packet is passed by an Internet router to its destination network, it is: Either on the LAN segment of the destination computer Or the LAN has been subdivided by the LAN

administrators.

22

Sub-netting scenario cont. If it is on the destination computer's LAN segment,

the destination computer uses it and it goes no further.

If a network administrator has divided the LAN, and the destination computer is not on the current LAN segment: the corporate routers (not Internet routers) must now

determine how to forward the packet to the correct LAN segment.

Page 12: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١٢

23

Sub-netting scenario cont. The "network" portion of the IP address doesn't help

the corporate router, because every IP address in the subdivided LAN has the same network ID.

Consider the following: Class C IP address In a class C first 3 octets (w.x.y in the w.x.y.z format, or

the left-most 24 binary digits) are the network ID portion A subnet mask of 255.255.255.0 would be used to indicate

that there was only one undivided LAN segment

24

Sub-netting scenario cont.

In this case, The client ID portion of the IP address (the z in

the w.x.y.z format) is not divided. All 8 binary digits are used to identify a specific

computer on the LAN segment. In binary, a mask of 255.255.255.0 is

11111111.11111111.11111111.00000000

Page 13: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١٣

25

Sub-netting scenario cont. Consider the case where the IP was divided into

further sub networks, consider the following: A class C IP address, and a subnet mask of

255.255.255.192 192 tells the corporate routers that of the eight binary

digits making up the client ID in a class C IP address, the 2 on the left are to identify the LAN segment, and the remaining 6 identify the specific computer on that LAN segment.

In binary, a mask of 255.255.255.192 is11111111.11111111.11111111.11000000

26

Another example

Consider a class B address The host ID of a class B IP address is the 16 binary

digits on the right. (y.z in the w.x.y.z format) Suppose that the mask is 255.255.248.0 This means that the first 5 of those 16 are used to

identify the LAN segment 11111111.11111111.11111000.00000000

A mask of 255.255.255.192 tells the corporate routers that the first 10 of those 16 is to identify the LAN segment 11111111.11111111.111111111.11000000

Page 14: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١٤

27

How to Specifying a SubNet?

We ask our ISP for a Class C license.

They give us the Class C range of 206.15.143.0

This gives us 1 Network (206.15.143.0) with the potential for 254 host addresses (206.15.143.1 to 206.15.143.254).

But we have a LAN made up of 5 Networks with the largest one serving 25 hosts.

28

So How Does This Work?

To calculate the number of subnets (networks) and/or hosts, we need to do some calculations:

Use the formula 2n-2 where the n can represent either how many bits needed to represent the subnets (networks) OR how many hosts per subnet needed.

Page 15: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١٥

29

So How Does This Work? We know we need at least 5 subnets. So 23-2

will give us 6 subnet addresses (Network Addresses).

We know we need at least 25 hosts per network. 25-2 will give us 30 hosts per subnet (network).

This will work, because we can take the first 3 bits from the host’s portion of the address to give them to the network portion and still have 5 (8-3) left for the host portion:

30

Break it down:

NNNNNNNN.NNNNNNNN.NNNNNNNN.NNNHHHHH

This will change our subnet mask to the following:11111111.11111111.11111111.11100000

Above is how the computer will see our new subnet mask, but we need to express it in decimal form as well:

255.255.255.224 128+64+32=224

Page 16: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١٦

31

A Trade-off Between Hosts and Subnets

Depending on the network class (A, B or C), some number of bits are reserved for hosts and subnets, and these bits become a trade off.

The more hosts, the fewer the subnets can be created; the more subnets, the fewer the hosts can be individually addressed.

32

Summary

An IP address consists of 4 bytes It can be divided between Network ID &

Host IDs A subnet mask guides the router to check

an address and know the Network ID and the host ID.

Page 17: L2 IP SubNetting.ppt

٣/١١/١٤٣٠

١٧

Assignment

What is the difference between internal and external IP addresses. (Reading only)

33