+ All Categories
Home > Technology > Computer Networking: Subnetting and IP Addressing

Computer Networking: Subnetting and IP Addressing

Date post: 10-Feb-2017
Category:
Upload: bisrat-girma
View: 155 times
Download: 20 times
Share this document with a friend
55
IP Addressing & IP Addressing & Subnetting Subnetting Prepared By Adugna A.
Transcript
Page 1: Computer Networking: Subnetting and IP Addressing

IP Addressing & IP Addressing & SubnettingSubnetting

Prepared By Adugna A.

Page 2: Computer Networking: Subnetting and IP Addressing

Summary of classful addressing Summary of classful addressing scheme scheme

When Internet addresses were standardized (early 1980s), the Internet address space was divided up into classes:

Prepared By Adugna A.

Page 3: Computer Networking: Subnetting and IP Addressing

Special Addresses Special Addresses (Cont.)(Cont.)

Prepared By Adugna A.

Page 4: Computer Networking: Subnetting and IP Addressing

Special Addresses Special Addresses (Cont.)(Cont.)

Within each address class is a set of addresses that are set aside for use in local networks setting(private).

Prepared By Adugna A.

Page 5: Computer Networking: Subnetting and IP Addressing

Private Addresses Private Addresses (Cont.)(Cont.)

A range of addresses from each class:

Prepared By Adugna A.

Page 6: Computer Networking: Subnetting and IP Addressing

Example Example

SolutionSolution

Find the class of the following IP addresses 00000001 00001011 00001011 1110111111000001 00001011 00001011 11101111

•00000001 00001011 00001011 111011111st is 0, hence it is Class A

•11000001 00001011 00001011 111011111st and 2nd bits are 1, and 3rd bit is 0 hence, Class C

How to identify which class the IP address belongs to

Method #1

Prepared By Adugna A.

Page 7: Computer Networking: Subnetting and IP Addressing

Method #1 simplified

Prepared By Adugna A.

Page 8: Computer Networking: Subnetting and IP Addressing

Finding the class in decimal notation

Method #2

Prepared By Adugna A.

Page 9: Computer Networking: Subnetting and IP Addressing

Example Example

SolutionSolution

Find the class of the following addresses158.223.1.108227.13.14.88

158.223.1.1081st byte = 158 (128<158<191) class B

227.13.14.881st byte = 227 (224<227<239) class D

Prepared By Adugna A.

Page 10: Computer Networking: Subnetting and IP Addressing

Method #3Method #3

Class A default mask is 255.0.0.0 Class B default mask is 255.255.0.0 Class C Default mask 255.255.255.0

If default subnet mask is given

Prepared By Adugna A.

Page 11: Computer Networking: Subnetting and IP Addressing

How do we know how long the How do we know how long the network prefix is?network prefix is?

The network prefix used to be implicitly defined (class-based addressing, A,B,C,D…)

The network prefix now is flexible and is indicated by a prefix/netmask (classless).

Prepared By Adugna A.

Page 12: Computer Networking: Subnetting and IP Addressing

Network AddressesNetwork Addresses

The network address is the first address.

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

Prepared By Adugna A.

Page 13: Computer Networking: Subnetting and IP Addressing

Example Example

SolutionSolution

Given the network address 132.21.0.0, find the class, the block( netid), and the range of the

addresses

The 1st byte is between 128 and 191. Hence, Class B

The block has a netid of 132.21. The addresses range from

132.21.0.0 to 132.21.255.255.Prepared By Adugna A.

Page 14: Computer Networking: Subnetting and IP Addressing

Subnet MaskSubnet Mask Frequently, the Network & Host portions of

the address need to be separately extracted. In most cases, if you know the address class,

it’s easy to separate the 2 portions.

Prepared By Adugna A.

Page 15: Computer Networking: Subnetting and IP Addressing

Subnet Mask Subnet Mask (Cont.)(Cont.)

Under the addressing scheme, called Subnetting, separating the Network & Host requires a special process called Subnet Masking.

Prepared By Adugna A.

Page 16: Computer Networking: Subnetting and IP Addressing

Function of Subnet MaskFunction of Subnet Mask To determine whether an IP address exists

on the local network or outside the local network.

It is applied to a message’s destination address to extract the network address.

If the extracted network address matches the local network ID, the destination is located on the local network. Otherwise the message will be forwarded outside to other network.

Prepared By Adugna A.

Page 17: Computer Networking: Subnetting and IP Addressing

Subnet Mask Subnet Mask (Cont.)(Cont.)

We can subnet masking process in two ways: straight or short-cut

1. Straight we use binary notation for both the

address and the mask and then apply the AND operation to get block address (Network address)

• Mask AND IP address =Network Address

Prepared By Adugna A.

Page 18: Computer Networking: Subnetting and IP Addressing

2. Short-Cut Method

i. If the byte in the mask is 255, copy the byte in the destination address.

ii. If the byte in the mask is 0, replace the byte in the address with 0.

iii. If the byte in the mask is neither 255 nor 0, we write the mask and the address in binary and apply the AND operation.

Prepared By Adugna A.

Page 19: Computer Networking: Subnetting and IP Addressing

Simplified Short-Cut Method AND operation

If the mask is neither 255(1’s) nor 0(0’s), we write the mask and the address in binary and apply the AND operation.

Prepared By Adugna A.

Page 20: Computer Networking: Subnetting and IP Addressing

Boolean Algebra(AND)Boolean Algebra(AND) Boolean Algebra is a process that applies

binary logic to yield binary results. 1 and 1 = 1 1 and 0 = 0 0 and 1 = 0 0 and 0 = 0

The process of combining binary values with Boolean Algebra is called Anding.

Prepared By Adugna A.

Page 21: Computer Networking: Subnetting and IP Addressing

Limitations and objectivesLimitations and objectives

Subnet masks apply only to Class A, B or C IP addresses.

The subnet mask is like a filter that is applied to a message’s destination IP address.

Its objective is to determine if the local network is the destination network.

Prepared By Adugna A.

Page 22: Computer Networking: Subnetting and IP Addressing

Examples …Examples …

1. If a destination IP address is 206.175.162.21, we know that it is a Class C address & that its binary equivalent is: 11001110.10101111.10100010.00010101

Prepared By Adugna A.

Page 23: Computer Networking: Subnetting and IP Addressing

Examples …Examples …(Cont’d…)(Cont’d…)

2. We also know that the default subnet mask for Class C is: 255.255.255.0 and that its binary equivalent is:

11111111.11111111.11111111.00000000

Prepared By Adugna A.

Page 24: Computer Networking: Subnetting and IP Addressing

Examples …Examples …(Cont’d…)(Cont’d…)

3. When these two binary numbers are combined using AND, the Network ID of the destination network is the result:

206.175.162.0 ->(NetID )Prepared By Adugna A.

Page 25: Computer Networking: Subnetting and IP Addressing

Examples …Examples …(Cont’d…)(Cont’d…)

4. The result is the IP address of the network which in this case is the same as the local network & it means, the message is for a node on the local network.

Prepared By Adugna A.

Page 26: Computer Networking: Subnetting and IP Addressing

CIDR cont’d…CIDR cont’d… Goals: Restructure IP address assignments

to increase efficiency Hierarchical routing aggregation to

minimize route table entries Key Concept: The length of the network id (prefix) in IP addresses is arbitrary/flexible and is defined by the network hierarchy.

Consequence: Routers use the IP address and the length of the prefix for

forwarding. All advertised IP addresses must include a prefix

Prepared By Adugna A.

Page 27: Computer Networking: Subnetting and IP Addressing

CIDR ExampleCIDR Example CIDR notation of a network address:

192.0.2.0/18 "18" says that the first 18 bits are the network part of

the address The network part is called the network prefix Example:

Assume that a site requires an IP network domain that can support 1000 IP host addresses

With CIDR, the network is assigned a continuous block of 1024 = 210 (>1000) addresses with a 32-10 = 22-bit long prefix

Prepared By Adugna A.

Page 28: Computer Networking: Subnetting and IP Addressing

CIDR: Prefix Size vs. Host CIDR: Prefix Size vs. Host SpaceSpace

CIDR Block Prefix # of Host Addresses /27 32 hosts /26 64 hosts /25 128 hosts /24 256 hosts /23 512 hosts /22 1,024 hosts /21 2,048 hosts /20 4,096 hosts /19 8,192 hosts /18 16,384 hosts /17 32,768 hosts /16 65,536 hosts /15 131,072 hosts /14 262,144 hosts /13 524,288 hosts

Prepared By Adugna A.

Page 29: Computer Networking: Subnetting and IP Addressing

CIDR and Address CIDR and Address assignmentsassignments

Backbone ISPs obtain large blocks of IP address space and then reallocate portions of their address blocks to their customers.

Example: Assume that an ISP owns the address block

206.0.64.0/18, which represents 16,384 (232-18=214) IP host addresses

No. Host 2N-n where N(total bit) and n netid prifix Suppose a client requires 800 host addresses

512=29<800<1024=210 -> 32-10 = 22, Assigning a /22 block, i.e., 206.0.68.0/22 -> gives a block of

1,024 (210) IP addresses to client.Prepared By Adugna A.

Page 30: Computer Networking: Subnetting and IP Addressing

Routing IP AddressesRouting IP Addresses When you build a network, you need to

figure out how many network Ids your network requires.

To do so, you must account for every WAN connection & subnet on the Network.

Every node & router interface requires a Host address, or ID.

Prepared By Adugna A.

Page 31: Computer Networking: Subnetting and IP Addressing

Subnetting, Subnet & Subnet Subnetting, Subnet & Subnet MaskMask

Subnetting, a subnet & a subnet mask are all different.

In fact, the 1st creates the 2nd & is identified by the 3rd.

Subnetting is the process of dividing a network & its IP addresses into segments, each of which is called a subnetwork or subnet.

Prepared By Adugna A.

Page 32: Computer Networking: Subnetting and IP Addressing

Subnetting Subnetting (Cont.)(Cont.)

Through the use of subnetting, the network from the previous slide can be logically divided into subnets with fewer hosts on each subnetwork.

Subnetting i. Improve the available shared bandwidth ii. Minimize the amount of broadcast

traffic generated over the entire network.

Prepared By Adugna A.

Page 33: Computer Networking: Subnetting and IP Addressing

Subnetting Subnetting (Cont.)(Cont.)

Example of subnetting: when the network administrator divides the 172.20.0.0 network into 5 smaller networks – 172.20.1.0, 172.20.2.0, 172.20.3.0, 172.20.4.0 & 172.20.5.0 – the outside world stills sees the network as 172.20.0.0, but the internal routers now break the network addressing into the 5 smaller subnetworks.

Prepared By Adugna A.

Page 34: Computer Networking: Subnetting and IP Addressing

Subnetting Subnetting (Cont.)(Cont.)

In the example, only a single IP address is used to reference the network & instead of 5 network addresses, only one network reference is included in the routing tables of routers on other networks.

Prepared By Adugna A.

Page 35: Computer Networking: Subnetting and IP Addressing

Borrowing Bits for SubnetBorrowing Bits for Subnet The key concept in subnetting is borrowing

bits from the host portion of the network to create a sub-network.

The 2 rules required: -There must always be at least 2 bits available for

the Host ID. From each class, only a certain number of bits can be

borrowed from the host portion. -All of the subnet bits cannot be all 1s or 0s at the

same time. Remember that the addresses with all ones (broadcast

address) & all zeroes (local network) cannot be used as they have special meanings.Prepared By Adugna A.

Page 36: Computer Networking: Subnetting and IP Addressing

Borrowing Bits for Subnet Borrowing Bits for Subnet (Cont.)(Cont.)

Bits Available for Creating Subnets

Address Class Host Bits Bits Available for Subnet

A 24 22

B 16 14

C 8 6

Prepared By Adugna A.

Page 37: Computer Networking: Subnetting and IP Addressing

Subnetting a Class A Subnetting a Class A NetworkNetwork

Example: To create subnets with more than 4 millions hosts per subnet, you must borrow 2 bits from the 2nd octet & use 10 masked bits for the subnet mask (11111111.11000000) or 255.192 in decimal.

Prepared By Adugna A.

Page 38: Computer Networking: Subnetting and IP Addressing

Class A Subnet Masks Class A Subnet Masks (Cont.)(Cont.)

A sample of subnet mask options available for Class A addresses.

Prepared By Adugna A.

Page 39: Computer Networking: Subnetting and IP Addressing

Class A Subnet Masks Class A Subnet Masks (Cont.)(Cont.)

The subnet mask with the highest value (255.255.255.252) has a binary representation of:

11111111.11111111.11111111.11111100 The 2 zeroes in this subnet mask

represent the 2 positions set aside for the Host address portion of the address.

Prepared By Adugna A.

Page 40: Computer Networking: Subnetting and IP Addressing

Subnetting Class B & Class CSubnetting Class B & Class C The same procedure will be applied for Class

B & Class C IP addresses & subnet masks as depicted in table on slide 44 “Class A Subnet Masks”

The only differences are that you have fewer options (due to a fewer number of bits available) & that you’re much more likely to work with Class B & Class C networks in real life.

Prepared By Adugna A.

Page 41: Computer Networking: Subnetting and IP Addressing

Subnetting Class B & Class C Subnetting Class B & Class C (Cont.)(Cont.)

A sample of the subnet masks available for Class B networks.

Prepared By Adugna A.

Page 42: Computer Networking: Subnetting and IP Addressing

Subnetting Class B & Class C Subnetting Class B & Class C (Cont.)(Cont.)A list of the subnet masks available for Class C networks.

Prepared By Adugna A.

Page 43: Computer Networking: Subnetting and IP Addressing

Knowing How to Calculate Knowing How to Calculate SubnetsSubnets

To determine the number of subnets & hosts per subnet for any of the available subnet masks, 2 simple formulas to calculate these numbers:

Prepared By Adugna A.

Page 44: Computer Networking: Subnetting and IP Addressing

Method of subnettingMethod of subnetting In subnetting we find the answer of following

questions.1. What is subnet mask for given address?2. How many subnets does given subnet mask provide?3. What is block size for given subnet mask?4. What are the valid subnets?5. What are the total hosts?6. How many valid hosts per subnet?7. What is network address of each subnet? 8. What is broadcast address of each subnet?

Prepared By Adugna A.

Page 45: Computer Networking: Subnetting and IP Addressing

1. What is subnet mask 1. What is subnet mask for given address?for given address?

Ex. find the subnet mask of address 188.25.45.48/20 ?

This address belong to class B (255.255.0.0) with /16 in CIDR . Let us borrowed 4 bits from hosts portion. So this subnet mask in binary would be 11111111.11111111.11110000.00000000.

Our answer subnet mask would be 255.255.240.0

Prepared By Adugna A.

Page 46: Computer Networking: Subnetting and IP Addressing

2. How many subnets does 2. How many subnets does given subnet mask provide?given subnet mask provide?

Ex. in 192.168.1.0/27, N(borrowed bit) is 3. By looking at address we can determined that this address is belong to class C and class C has default subnet mask 255.255.255.0 [/24 in CIDR]. In given address we borrowed 27 - 24 = 3 host bits to create subnets. Now 23 = 8, so our answer is 8.

Prepared By Adugna A.

Page 47: Computer Networking: Subnetting and IP Addressing

What is block size for What is block size for given subnet mask?given subnet mask?

It is used to calculate the valid subnets To figure out the block size, use this

formula 256 - Subnet mask = block size.

For example block size for subnet mask 255.255.255.240 is 256 - 240 = 16.

Prepared By Adugna A.

Page 48: Computer Networking: Subnetting and IP Addressing

What are the valid subnets?What are the valid subnets? 1st calculate total subnet by using formula 2N

2nd find the block size and count from zero in block until you reach the subnet mask value incrementing with block size. Ex. the valid subnets for 192.168.1.0/26.

N=2 [26-24],Total subnets are 22 = 4. Subnet mask would be 255.255.255.192. Block size would be 256-192 = 64. Start counting from zero at blocks of 64, so our valid

subnets would be 0,64,128,192.Prepared By Adugna A.

Page 49: Computer Networking: Subnetting and IP Addressing

What are the total hosts?What are the total hosts?

Total hosts per subnet =2H = Total hosts. H is the number of host bits. For example in address 192.168.1.0/26 we have 32 – 26 = 6. Total hosts per subnet would be 26 = 64.

Prepared By Adugna A.

Page 50: Computer Networking: Subnetting and IP Addressing

How many valid hosts are How many valid hosts are available per subnet?available per subnet?

As we know, we need to reduce two address per subnet, one for network ID and another for broadcast ID.

So our formula, to calculate valid hosts would be Total hosts -2 = Valid hosts. In above example we have 64 hosts per subnet, so valid hosts in each subnet would be 64 - 2 = 62.

Prepared By Adugna A.

Page 51: Computer Networking: Subnetting and IP Addressing

What is broadcast address of What is broadcast address of each subnet?each subnet?

Broadcast address is the last address of subnet and cannot be assigned to any host. In above example

0 Subnet has broadcast address 63 64 Subnet has broadcast address 127 128 Subnet has broadcast address 191 192 Subnet has broadcast address 255

Prepared By Adugna A.

Page 52: Computer Networking: Subnetting and IP Addressing

What is the network address What is the network address of each subnet? of each subnet?

Network address is the first address of subnet. This address is used to locate the network, and cannot be assigned to any host. In above example address 0,64,128,192 are the network address

Prepared By Adugna A.

Page 53: Computer Networking: Subnetting and IP Addressing

A Short BroadcastA Short Broadcast

A broadcast is a message that every node on a network or subnetwork receives & examines.

Cisco IOS supports 2 different types of broadcast messages: Flooded Directed

Prepared By Adugna A.

Page 54: Computer Networking: Subnetting and IP Addressing

A Short Broadcast A Short Broadcast (Cont.)(Cont.)

Generally speaking, routers do not propagate broadcasts, which is one of the benefits of installing a router in the first place.

Prepared By Adugna A.

Page 55: Computer Networking: Subnetting and IP Addressing

A Short Broadcast A Short Broadcast (Cont.)(Cont.)

Flooded broadcasts (those with the nominal broadcast address of 255.255.255.255) are not forwarded by the router & are considered local traffic only.

Directed broadcasts, which contain all 1’s in the Host portion of the IP address, are addressed to a specific subnetwork & are allowed to pass.

Prepared By Adugna A.


Recommended