Presentation is loading. Please wait.

Presentation is loading. Please wait.

CISCO NETWORKING ACADEMY Chabot College ELEC 99.05 Subnet Masking.

Similar presentations


Presentation on theme: "CISCO NETWORKING ACADEMY Chabot College ELEC 99.05 Subnet Masking."— Presentation transcript:

1 CISCO NETWORKING ACADEMY Chabot College ELEC 99.05 Subnet Masking

2 CISCO NETWORKING ACADEMY Logical Address Composition Though the exact length and format of a logical (layer 3) address differs depending on the protocol, all logical addresses share this basic formula: NETWORK NUMBER HOST NUMBER

3 CISCO NETWORKING ACADEMY Logical Address Composition IP address may have an additional field, the subnet field, that is used to identify smaller networks within a larger network. NETWORK NUMBER SUBNET NUMBER HOST NUMBER

4 CISCO NETWORKING ACADEMY Address Classes Class A (0 - 127) Class B (128-191) Class C (192-223) NetworkHost Network Host Network Host 1st octet2nd octet3rd octet4th octet

5 CISCO NETWORKING ACADEMY Address Classes Class A Class B Class C 854531158 16865114201 21014423556 NetworkHost

6 CISCO NETWORKING ACADEMY The Subnet Mask The solution to the IP address shortage was thought to be the subnet mask. Formalized in 1985, the subnet mask breaks a single class A, B or C network in to smaller pieces.1985

7 CISCO NETWORKING ACADEMY Subnetting What’s happened to the host fields? Network SubnetHost 8 bits 8 bits are now used to represent subnets. Only 8 bits remain for possible hosts.

8 CISCO NETWORKING ACADEMY Subnetting What’s happened to the host fields? Network SubnetHost 8 bits 8-bit subnet field = 2 8 subnets = 256 subnets. 8-bit host field = 2 8 hosts = 256 hosts. Remember, we started with 65,536 hosts!

9 CISCO NETWORKING ACADEMY The Subnet Mask The Subnet Mask is a 32-bit number. Its job is to tell routers (and humans) which bits are network number and which bits are used to represent hosts.

10 CISCO NETWORKING ACADEMY The Subnet Mask The Subnet Mask corresponds to the IP address. A “1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number A “0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit.

11 CISCO NETWORKING ACADEMY The Subnet Mask 11111111 00000000 10101001110001110100010110001001 Address Mask Here, the first 16 bits of the mask are set to “1.” Thus, the first 16 bits (2 octets) of the IP address are network number.

12 CISCO NETWORKING ACADEMY The Subnet Mask 11111111 00000000 10101001110001110100010110001001 Address Mask Network Host The mask shows that the first two octets refer to the network number.

13 CISCO NETWORKING ACADEMY The Subnet Mask 11111111 00000000 10101001110001110100010110001001 Address Mask Network Host The mask shows that the first two octets refer to the network number. 255 00

14 CISCO NETWORKING ACADEMY The Subnet Mask 11111111 00000000 10101001110001110100010110001001 Address Mask Network Host Here, the first 24 bits are set to “1” in the subnet mask. Thus, the first 24 bits (3 octets) of the IP address are network number.

15 CISCO NETWORKING ACADEMY The Subnet Mask 11111111 00000000 10101001110001110100010110001001 Address Mask Network Host Here, the first 24 bits are set to “1” in the subnet mask. Thus, the first 24 bits (3 octets) of the IP address are network number. 255 0

16 CISCO NETWORKING ACADEMY The Subnet Mask 11111111 11100000 10101001110001110100010110001001 Address Mask Network Host Here, the first 27 bits of the subnet mask are set to “1.” Thus, the first 27 bits of the IP address refer to network number.

17 CISCO NETWORKING ACADEMY The Subnet Mask 11111111 11100000 10101001110001110100010110001001 Address Mask Network Host Here, the first 27 bits of the subnet mask are set to “1.” Thus, the first 27 bits of the IP address refer to network number. 255 224

18 CISCO NETWORKING ACADEMY The Default Subnet Masks Class A or /8 Class B or /16 Class C or /24 255000 00 0 If any additional bits in the subnet mask are set to “1,” then subnets have been created.

19 CISCO NETWORKING ACADEMY The Subnet Mask 255 0 20721540 Address Mask Network Host

20 CISCO NETWORKING ACADEMY The Subnet Mask 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 00000000 255 0

21 CISCO NETWORKING ACADEMY Class C : 1-bit Mask (/25) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 10000000 255 128 Masks can be written different ways. When the phrase “1-bit” mask is used, that means 1 more bit than the default. This example can also be called a 25-bit mask, or /25 (there are 25 network bits).

22 CISCO NETWORKING ACADEMY Class C: 2-bit Mask (/26) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11000000 255 192

23 CISCO NETWORKING ACADEMY Class C: 3-bit Mask (/27) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11100000 255 224

24 CISCO NETWORKING ACADEMY Class C: 4-bit Mask (/28) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11110000 255 240

25 CISCO NETWORKING ACADEMY Class C: 5-bit Mask (/29) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11111000 255 248

26 CISCO NETWORKING ACADEMY Class C: 6-bit Mask (/30) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11111100 255 252

27 CISCO NETWORKING ACADEMY Class C: 7-bit Mask (/31) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11111110 255 254

28 CISCO NETWORKING ACADEMY Class C: 8-bit Mask (/32) 11001111000101010011011000000000 20721540 Address Mask Network 11111111 255

29 CISCO NETWORKING ACADEMY Class C : 1-bit Mask (/25) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 10000000 255 128 Because this is a class C, all nodes on this network will share the first three octets. Those numbers are not an issue.

30 CISCO NETWORKING ACADEMY Last Octet 1-bit Mask (/25) 00000000 0 Address Mask Host 10000000 128 How many subnet possibilities with 1 bit? 2 1 = 2 different possibilities

31 CISCO NETWORKING ACADEMY Last Octet 1-bit Mask (/25) 000000000 = 128 = 255 = The last octet can be any value from 0 - 255. 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary

32 CISCO NETWORKING ACADEMY Last Octet 1-bit Mask (/25) 000000000 = 128 = 255 = How many hosts can be on each subnet? 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary 2 7 = 128 different possibilities MINUS TWO. 7 bits

33 CISCO NETWORKING ACADEMY Why “Minus Two”? Two special host addresses are “reserved”: –the address of the subnet itself (all zeros) –the broadcast address for the subnet (all ones) 000000000 = 128 = 255 = 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary Subnet addr. Broadcast addr. Subnet addr. Broadcast addr.

34 CISCO NETWORKING ACADEMY Network #, Broadcast Address 000000000 = All zeros in the HOST portion of the address is reserved for network (or subnet) number. All ones is reserved for the network (or subnet) BROADCAST address. 000000011 = DecimalBinary 0010010036 = 01111111127 = 10000000128 = 11111111255 =

35 CISCO NETWORKING ACADEMY Last Octet 000000000 = 128 = 255 = So, which subnet is this host on? 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary 207.21.54.35 255.255.255.128 Subnet #0

36 CISCO NETWORKING ACADEMY Last Octet 000000000 = 128 = 255 = Are these two hosts on the same subnet? 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary 207.21.54.115 255.255.255.128 No.207.21.54.129 255.255.255.128

37 CISCO NETWORKING ACADEMY Last Octet 000000000 = 128 = 255 = Unfortunately, older TCP/IP software cannot handle subnets with all zeros in the subnet field. 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary

38 CISCO NETWORKING ACADEMY Last Octet 000000000 = 128 = 255 = More bad news, older TCP/IP software cannot handle subnets with all ones in the subnet field. 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary

39 CISCO NETWORKING ACADEMY Last Octet 000000000 = 128 = 255 = For now, using subnets that have all zeros or all ones in the subnet field should be considered illegal. (It’s not really, but….) 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary

40 CISCO NETWORKING ACADEMY Last Octet 000000000 = 128 = 255 = Bottom line, a 1-bit mask results in no usable addresses. 01111111127 = 10000000 11111111 Subnet #0Subnet #1 DecimalBinary

41 CISCO NETWORKING ACADEMY Class C : 2-bit Mask (/26) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11000000 255 192 Because this is a class C, all nodes on this network will share the first three octets. Those numbers are not an issue.

42 CISCO NETWORKING ACADEMY Class C : 2-bit Mask (/26) 00000000 0 Address Mask Host 11000000 192 How many subnet possibilities with 2 bits? 2 2 = 4 different possibilities: 00 01 10 11

43 CISCO NETWORKING ACADEMY Last Octet 000000000 = 64 = 127 = 0011111163 = 01000000 01111111 Subnet #0Subnet #1 DecimalBinary 128 = 191 = 10000000 10111111 192 = 255 = 11000000 11111111 Subnet #2Subnet #3

44 CISCO NETWORKING ACADEMY Last Octet 000000000 = 64 = 128 = How many hosts can be on each subnet? 0011111163 = 01000000 01111111 Subnet #0Subnet #1 DecimalBinary 2 6 = 64 different possibilities MINUS TWO. 6 bits

45 CISCO NETWORKING ACADEMY Which subnets can be used? 000000000 = 64 = 127 = 0011111163 = 01000000 01111111 Subnet #0Subnet #1 DecimalBinary 128 = 191 = 10000000 10111111 192 = 255 = 11000000 11111111 Subnet #2Subnet #3

46 CISCO NETWORKING ACADEMY Putting it together Assuming the mask: 255.255.255.192, which addresses are legal for hosts? 1) 207.21.54.35 2) 207.21.54.63 3) 207.21.54.65 4) 207.21.54.190 5) 207.21.54.195

47 CISCO NETWORKING ACADEMY Class C : 3-bit Mask (/27) 11001111000101010011011000000000 20721540 Address Mask Network Host 11111111 11100000 255 224 Because this is a class C, all nodes on this network will share the first three octets. Those numbers are not an issue.

48 CISCO NETWORKING ACADEMY Class C : 3-bit Mask (/27) 00000000 0 Address Mask Host 11100000 224 How many subnet possibilities with 3 bits? 2 3 = 8 different possibilities: 000 001 010 011 100 101 110 111

49 CISCO NETWORKING ACADEMY Last Octet 000000000 = 32 = 63 = 0001111131 = 00100000 00111111 DecimalBinary 64 = 95 = 01000000 01011111 96 = 127 = 01100000 01111111 10000000128 = 160 = 191 = 10011111159 = 10100000 10111111 DecimalBinary 192 = 223 = 11000000 11011111 224 = 255 = 11100000 11111111

50 CISCO NETWORKING ACADEMY Last Octet 000000000 = 32 = 64 = How many hosts can be on each subnet? 0001111131 = 00100000 00111111 Subnet #0Subnet #1 DecimalBinary 2 5 = 32 different possibilities MINUS TWO. 5 bits

51 CISCO NETWORKING ACADEMY Which subnets can be used? 000000000 = 32 = 63 = 0001111131 = 00100000 00111111 DecimalBinary 64 = 95 = 01000000 01011111 96 = 127 = 01100000 01111111 10000000128 = 160 = 191 = 10011111159 = 10100000 10111111 DecimalBinary 192 = 223 = 11000000 11011111 224 = 255 = 11100000 11111111


Download ppt "CISCO NETWORKING ACADEMY Chabot College ELEC 99.05 Subnet Masking."

Similar presentations


Ads by Google