subnetting vlsm and summarization

144
TCP/IP Network Fundamentals Subnetting, VLSM and Summarization UEEN2013 (Topic 03)

Upload: joshua-lim

Post on 13-Sep-2015

165 views

Category:

Documents


14 download

DESCRIPTION

topic in subnetting and supernetting

TRANSCRIPT

FICT Presentation

TCP/IP Network FundamentalsSubnetting, VLSM and SummarizationUEEN2013(Topic 03)1IP Subnet Rule #1Every IP address within the closed network has to be unique.There cant be two same IP addresses in the networkSame applies to the Public IP addresses in the Internet

PC0 and PC2 cant have the same IP in this networkIP Subnet Rule #1The following networks is okay (for having same IP addresses) since they are separated.There are two closed network in the diagram.

IP Subnet Rule #2The function of a subnet mask is to divide the IP address into two parts: The Network ID and the Host ID.The more important part is to produce the Network IDSubnet mask by itself is meaningless. It has to work with an IP address.The process of getting the networking ID is the perform a bitwise AND operation between the IP and subnet mask.

IP Subnet Rule #2An example of the process of getting the network ID and host ID:IP address = 128.143.137.144Subnet mask = 255.255.0.0Network ID = (128.143.137.144 & 255.255.0.0) => 128.143.0.0Host ID = 137.144 (of network 128.143.0.0)

This is just a simplified demonstration, in fact you need to convert the decimal form to binary form, order to perform the ANDING operation:128.143137.144IP addressNetwork IDHost IDIP Subnet Rule #2Another example to determine what the network ID is, for any given IP addressyou have to convert both octal addresses into binary, and do a bitwise AND operation. An example using an IP address of 156.154.81.56 used with a network mask of 255.255.255.240 follows:

This translate to a network ID of 156.154.81.48Sometimes, network ID is also called network address or subnet address#Quick Quiz#What is the subnet address for IP address 150.215.17.9, given the subnet mask as 255.255.240.0?

If the network ID = 192.168.48.0, and the host ID = 9.83, what should be the subnet mask?AnswerThe subnet address is 150.215.16.0

192.168.48.0 = 192.168.001100002.09.83 = 000010012.83Subnet mask = 255.255.11110000.0 = 255.255.240.0IP Subnet Rule #3Network address within a closed network is preferred to be unique.

Network ID=192.168.4.0Network ID=192.168.1.0Network ID=192.168.2.0Network ID=192.168.3.0Packet Tracer ExampleIn the following network, though every IP address is unique, but the network ID is not unique, hence the following network wont work.You may try to build this network in Packet Tracer.

IP Subnet Rule #4For a correct and valid 32 bits subnet mask: Left all 1 and right all 01111111.11110000.00000000.00000000 (valid)11111111.11101101.00000000.00000000 (not valid)Subnet mask cant have a 0 between two 1s or a 1 between two 0There are only 32 valid subnet masks (theoretical maximum).255.0.0.0, 255.128.0.0, 255.192.0.0, . 255.255.255.255Can be represented by / notatione.g. /9, /24, etc/10 means ten 1 from the left, and the remaining 22 bits are 0192.168.1.15/24 =>This interface has an IP = 192.168.1.15The subnet mask = 255.255.255.0Belongs to network 192.168.1.0#Quick Quiz#Which of the following are valid subnet masks (choose all that apply)?A. 255.128.0.0validB. 255.255.224.0 validC. 255.255.64.0 invalidD. 255.255.255.244 invalidE. 255.240.0.0 validF. 255.255.236.0 invalidAnswerA (valid) 255.128.0.011111111.10000000.00000000.00000000B (valid) 255.255.224.011111111.11111111.11100000.00000000C (invalid) 255.255.64.011111111.11111111.01000000.00000000D (invalid) 255.255.255.24411111111.11111111.11111111.11110100E (valid) 255.240.0.011111111.11110000.00000000.00000000F (invalid) 255.255.236.011111111.11111111.11101100.00000000#Quick Quiz#What is conversion from one form to the other for the following subnet masks?/19/23255.255.192.0255.255.255.248

Answer/19 = 11111111.11111111.11100000.00000000 = 255.255.224.0/23 = 11111111.11111111.11111110.00000000 = 255.255.254.0255.255.192.0 = 11111111.11111111.11000000.00000000 = /18 255.255.255.248 = 11111111.11111111.11111111.11111000 = /29

Rule #4: Variable Network ID bitsSince functional subnet masks can range from /8 to /30, which means the network ID bits are also varies depending on the subnet mask.This will cause the network ID to be the same for some subnet masks but different in some other cases.Be careful on your design.192.168.12.1/30 => 192.168.12.0192.168.12.1/29 => 192.168.12.0192.168.12.1/28 => 192.168.12.0192.168.12.1/27 => 192.168.12.0192.168.12.1/26 => 192.168.12.0192.168.12.1/25 => 192.168.12.0192.168.12.1/24 => 192.168.12.0192.168.12.1/23 => 192.168.12.0192.168.12.1/22 => 192.168.12.0192.168.12.1/21 => 192.168.8.0

192.168.12.1/20 => 192.168.0.0192.168.12.1/19 => 192.168.0.0192.168.12.1/18 => 192.168.0.0192.168.12.1/17 => 192.168.0.0192.168.12.1/16 => 192.168.0.0192.168.12.1/15 => 192.168.0.0192.168.12.1/14 => 192.168.0.0192.168.12.1/13 => 192.168.0.0192.168.12.1/12 => 192.160.0.0192.168.12.1/11 => 192.160.0.0

Network IDNetwork IDRule #4: Size of Host ID bits From the subnet mask, not only we know that size of network ID bits, but also the size of the host bits.32 bits = network ID bits + host ID bits

For example, /25 =>25 network ID bits with (32-25) = 9 host ID bits.#Quick Quiz#How many host bits are there for the following cases:18.9.110.7 / 18192.168.3.17 / 26188.9.7.66 (255.255.255.224)AnswerBased on the question, we can ignore the IP address and just focus on the subnet mask. It is the subnet mask that determine the number of network ID bits and host ID bits.Total size of IP and subnet mask = 32 bits.18.9.110.7 / 1832 -18 = 14 bits (host ID)192.168.3.17 / 2632 26 = 6 bits (host ID)188.9.7.66 (255.255.255.224)255.255.255.224 => /2732 27 = 5 bits (host ID)19IP Subnet rule #5In order to communicate within the LAN, the IP address of all hosts and gateways must have the same network ID.All IP in the same subnet should be designed to have the same network ID.That includes PC IP, server IP, and gateway IP.For the following example:If subnet mask = /16, all PC IP, server0 IP, and gateway IP will be able to communicate with each otherIf subnet mask = /24, gateway IP of Router0, and PC2 WONT be able to communicate with the rest.

IP Subnet rule #5

Design guideline: In order to communicate with each other in a LAN, any IP connecting to a switch should share a same network address

PC0 can ping PC1PC0 cant ping PC3

#Quick Quiz#Can PC0 ping PC1?

AnswerBoth have the same network ID.

192.168.10.241/28 =

192.168.10.241 &255.255.255.240

= 192.168.10.240192.168.10.242/30 =

192.168.10.242 &255.255.255.252

= 192.168.10.240240 = 11110000#Quick Quiz#Which of the following IP addresses belong to this network ID: 192.168.152.0, given the subnet mask = 255.255.248.0(a)192.168.184.71(b)192.168.159.200(c)192.168.157.3(d)192.168.140.5624Answer192.168.184.71/21 = 192.168.184.0 (no)192.168.159.200/21 = 192.168.152.0 (yes)192.168.157.3/21 = 192.168.152.0 (yes)192.168.140.56/21 = 192.168.136.0 (no)

25Application of Rule #5 in Gateway IPRemember that gateway IP has to be in the same network ID with the rest of the host IP.Otherwise, your subnet wont work properly.So, please DONT design your gateway IP as the following example.

This is okay.Dont do this.Dont do this.IP Subnet rule #6If the datas destination IP does not have the same network ID as the source IP, the data have to be sent to the gateway (router).

In most cases under Windows XP, the data with destination IP that does not have the same network ID will be sent to default gateway.The default gateway IP will be utilized in ARP.Destination MAC address of default gateway will be used.

If PC0 wants to:ping 192.168.2.1ping 180.7.4.3ping 10.0.1.1

The data has to be sent to the gatewayIP Subnet rule #6Example for rule #6:

PC0 (192.168.1.1) ping 10.0.1.1Check for source IP network ID192.168.1.1 & 255.255.255.0 = 192.168.1.0Check for destination IP network ID10.0.1.1 & 255.255.255.0 = 10.0.1.0The source IP network and the destination IP network mismatchThe host need to send the packet to the default gatewayThe subnet mask used in both cases, is the subnet mask of source IPs PCIP Subnet rule #6The algorithm for rule #6:

Command destination_IP (e.g. ping 10.10.1.1)

If (destination_IP & my_PC_subnet_mask == source_IP & my_PC_subnet_mask)This means the destination IP is within same LAN,Check arp_table for this IP address for MAC address. (if not send out arp to get this IPs MAC address)Send the frame out to the IP address which is in the same LAN

If (destination_IP & my_PC_subnet_mask != source_IP & my_PC_subnet_mask)This means the destination IP is not in the same LANCheck OS for default_gateway_IPCheck arp_table for the MAC address of default_gateway_IPSend the frame to the default gateway.#Quick Quiz#How many gateways are there in the figure?

Answer

This LAN has 4 gatewaysThis LAN has 1 gatewayIP Subnet rule #7Router MUST be used in order for two hosts with different network address (or network ID) to communicate.Communication will not happen between hosts with different subnets address that are connected to a switchA switch only provides communication for the PCs with the same network IDTwo different subnets has to be communicated via a router.

Rules #7 in RouterBased on rule #7, IP addresses set in a router ports have to be in different subnet.Meaning IP addresses set in router ports cant be in the same subnetThe router IOS will complain.The router wont allow you to set it.

The following example wont work.

Example network of IP Subnet Rules #7The following example WORKS, despite a little strange.The network does not violate any subnet rule. In fact, it embrace them. (1 LAN 2 IP subnets)The following network embraces IP subnet rule 5, rule 6 and rule 7Rule 5: Two PC cant communicate with different subnet address within a LANRule 6: Data need a gateway to exit to another subnet.Rule 7: You need a router for communication between 2 subnets.

IP Subnet Rule #8Two special cases on host ID bits which are all 0s and all 1s When Host ID bits are all 0s, it is a network address.When Host ID is all 1s, it is a broadcast address, we dont use it as a host address too.

These two addresses represent the head and the tail of the given IP address block range.

We CANT use both of these IP addresses as host IP and gateway IP.

Example, IP address = 192.168.1.1, Subnet mask = 255.255.255.0Network address of the subnet = 192.168.1.0Broadcast address of the subnet = 192.168.1.255Rule 8 in RouterRouter wont accept network address and broadcast address as its port IP address.

In the following example, the router will complain in both cases and wont accept the IP addresses with the given subnet mask:IP = 192.168.1.0subnet mask = 255.255.255.0IP = 192.168.1.255subnet mask = 255.255.255.0

Packet Tracer ExampleStudy the following example and see why the router wont accept IP address from /30 to /23.

#Quick Quiz#201.110.93.25/20 =>

Network address : ________________ Broadcast address :___________________

Answer201.110.93.25/20 => There are (32 - 20) = 12 (host ID bits)/20 = 255.255.240.0 = 255.255.111100002.0201.110.01011101.25/20 = 201.110.0101xxxx.xxxxxxxxx = host ID bits.Network address (host ID bits = 0)201.110.01010000.00000000 = 201.110.80.0Broadcast address (host ID bits = 1)201.110.01011111.11111111 = 201.110.95.255What is a broadcast address?A broadcast address is a network address that allows information to be sent to all nodes on a LAN, rather than to a specific network host.Broadcast is used in ARP and DHCP.Router will stop broadcast from reaching other subnets.Sometimes, IP subnets is also called a broadcast domain.IP subnet rule #9The first usable IP and the last usable IP.Usable IP addresses mean they can be used in hosts, PCs, printers, gateways, and servers.The first usable IP = network address + 1More precisely, host ID = 1If network adress = 192.168.3.0, first usable IP = 192.168.3.1The last usable IP = broadcast address 1More precisely, host ID = All 1s 1If broadcast address = 192.168.3.255, last usable IP = 192.168.3.254Cisco guidelines (not rules):Last usable IP is preferred to berouter IP address = gateway IPFirst usable IP is preferred to be server, printer any host that requires static IP#Quick Quiz#What is the first usable and last usable IP for 172.16.185.3/22 ?AnswerWhat is the first usable and last usable IP for 172.16.185.3/22 ?IP = 172.16.10111001.00000011SM = 255.255.11111100.00000000Network address = 172.16.10111000.00000000 = 172.16.184.0Broadcast address = 172.16.10111011.11111111 = 172.16.187.255First usable IP172.16.184.1Last usable IP172.16.187.254

LAN IP design guidelineGiven a range of IP address:First IP addresses are preferred to be used for setting static IP for servers and printersStarting from the first IP and counting downe.g: 192.168.1.1 for DHCP server; 192.168.1.2 for printerLast IP addresses are preferred to be used for setting router IP (gateway IP)Starting from the last IP and counting up.e.g. 192.168.1.254 for gateway 1, 192.168.1.253 for gateway 2.Mid-range IP addresses are preferred to be set as the DHCP range for the PCse.g 192.168.1.10 to 192.168.1.250In this range, we reserve 10 first IP for servers and printer and 5 last IPs for gateways

e.g. 192.168.1.1e.g. 192.168.1.254Static IPDynamic IPStatic IPStatic IPFirst IPLast IPMid-range IPWhy Last Usable IP for Gateway?Case study:Router locked with password, you dont know the password and the router IP, and you are new to the job.What do you assign?Do you have to test 254 IP to find the IP? Provided that you know the subnet mask is /24.Technically, you can assign any usable IP in the range for the default gateway IP.If last usable IP rule is followed, you can guess it easily.

If the gateway IP is set in the beginning of the range (e.g. 192.168.1.3), chances is very high that you set an host IP which is the same as the default gateway IP.IP Subnet Rules #10When Internet addresses were standardized (in early 1980s), the IP addresses were divided up into 5 classes:Class A: Network prefix is 8 bits long. Default mask: 255.0.0.0. or /8Class B: Network prefix is 16 bits long. Default mask: 255.255.0.0 or /16Class C: Network prefix is 24 bits long. Default mask: 255.255.255.0 or /24Class D: is multicast addressClass E: Experimental

IP Subnet Rules #10

We can only use class A, B, and C for host IP address.Class A, B, C IP addresses are called unicast IP addressWe CANT use class D and E IP address for normal IP address.Class D IP addresses are called multicast IP addressesClass D IP usage is quite different from class A, B, C.Broadcast, Multicast, UnicastBroadcastOne to allUsed in DHCP, ARPMulticastOne to manyClass D IPNormally used in streaming IP TV or streaming radioUnicastOne to oneClass A, B, C IPWhat we have been using

IP Subnet Rules #10Unicast IP = 1 device 1 IPMulticast IP = all devices that tune into that channel share the IPUnicast IP and multicast IP can be used at the same time in 1 host.Example in the following diagram:Two streaming servers with multicast IP (224.0.0.112 and 224.0.0.113)For example streaming web cam videos.All PCs and servers still require their unique IP addressIf all PC tune in the channel of 224.0.0.112, all PCs and Streaming Server 1 will share the same multicast IP (224.0.0.112) on top of their own unicast IP address.

IP Subnet Rules #11The range of private IP addresses which is NOT used in public IP address for global Internet.The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets (local networks):10.0.0.0 - 10.255.255.255172.16.0.0 - 172.31.255.255192.168.0.0 - 192.168.255.255IANA has reserved private the following IP addresses for Automatic Private IP Addressing (APIPA) for Windows platform (except NT).169.254.0.0 - 169.254.255.255APIPA is used in Windows where the IP address (169.254.x.x) is assigned automatically by the OS (after sometime) when the DHCP service is not available (and the option of Obtain an IP address automatically is on).If the DHCP service is working fine in your LAN, and you still get the IP 169.254.x.x for your Windows IP, that only means your cable, connection or NIC is having problem.Private and Public IP AddressPrivate IP addresses are the IP addresses that use at home (and at school), as your source IP.You need to pay money for an Public IP address (monthly subscription).And the domain name too (e.g. www.utar.edu.my, www.intel.com)Public IP is global, and you need to apply and obtain it through IANA (maybe via Tmnet)The range of Private IP (IMPORTANT !!!)10.0.0.0 to 10.255.255.255172.16.0.0 to 172.16.255.255192.168.0.0 to 192.168.255.255Private IP is not unique. There are thousands of 192.168.1.1 in the worldSpecial IP = 127.0.0.1, is reserved to be the loopback IP addressTo test the network softwareThe domain name localhost = 127.0.0.1#Quick Quiz#You key in the primary DNS IP address as 202.188.0.5 and your secondary DNS IP address as 202.190.3.4.However, you later found out that both IP addresses point to the same PC/host/server.Is this possible?Why and why not?IP Subnet Rule #12A host can have different IP addresses according to the number of network interface cards installed. IP is an Network Interface addressA PC with 1 NICs requires 1 IP addressA PC with 3 NICs requires 3 IP addressesOne IP for each NICA router with 2 Fast Ethernet ports and 2 T1 serial ports need 4 IP addressOne IP for each portsA DNS server can have 2 NICs with 2 different IP addressesAnswer for the previous slideFrom now on, adjust your previous thought on IP address is a network host address.Meaning 1 IP = 1 host.

#Quick Quiz#1. How many IP addresses are required in Router0?2. How many IP addresses are required in PC5?3. How many IP addresses are required in PC9?4. How many LAN/IP subnets are there in this network?

Answer: (1) 3 (3) 1 (2) 2 (4) 9

IP Rule #13Host ID bits as LAN design parameter for allocating the number of PCs/hosts in a LAN.

For example: For a subnet with a mask of 255.255.255.128, how many hosts that we can allocate in that subnet?255.255.255.128 => /25 => 32-25 = 7 host bits27 => 128 host ID => theoretically 128 IP address.Actual allocation of PC/host IP = 128 1 1 1 = 125 IP addressCant use network address, broadcast address, and gateway address for PC/hosts. (Assuming 1 gateway in the LAN)Host includes laptops, servers and printers.

If a LAN is desired to have 27 PCs, what should be the subnet mask?Formula: 2H number of hosts + 3; H = host ID bits3 = 1 network address + 1 broadcast address + 1 gateway2H 27 + 3 => 25 30 => H = 5; Subnet mask = /(32-5) = /27 => 255.255.255.224IP Subnet Rules #14The principle of IP design in subnetting and supernetting Subnetting1 bigger network split into a few smaller networks.Supernetting2 or more smaller networks are joined into a larger network.

subnettingsupernettingIP Subnet Rules #14

SupernettingSubnettingIP Subnet Rules #14Split the host number portion of an IP address into a subnet number and a (smaller) host number. Result in a few blocks of IP addresses.The subnet mask will be extended with more 1The subnet mask will get larger.network prefixhost numbersubnet numbernetwork prefixhost numberextended network prefixIP Subnetting example (1)Perform subnetting for the following LAN.172.16.0.0/16Specification: Subnet number = 8 bits.

IP Subnetting example (2)Original subnet mask = /16New extended subnet mask = /(16 + 8) = /24 172.160.08 bits Subnet #network prefix8 bitshosts16 bits16 bitsNew network prefix8 bitshostsextended network prefix (24 bits)IP Subnetting example (3)ImplementationSubnet 1 network into 3 LAN1 network ID (172.16.0.0/16) becomes 3 network ID (172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24)All subnet mask has been changed from /16 to /241 gateway -> 3 gateways

Subnetting and SupernettingThe principle of IP design in subnetting and supernetting Subnetting1 bigger IP subnet split into a few smaller IP subnets.Supernetting2 or more smaller IP subnets are joined into a larger IP subnet.

subnettingsupernetting

SupernettingSubnettingQuick Quiz: Subnet and SupernetSubnetting or supernetting will produce more hosts within a subnet?Subnetting or supernetting will require more routers?Supernetting will require more switch ports or less switch ports?Supernetting will result in longer network ID or shorter network ID?AnswerSupernettingSubnettingMore switch portsShorter network ID

Split the host number portion of an IP address into a subnet number and a (smaller) host number. Result in a few blocks of IP addresses.The subnet mask will be extended with more 1The subnet mask will get larger. (e.g: /16 => /20)network prefixhost numbersubnet numbernetwork prefixhost numberextended network prefixIP Subnetting example (1)Perform subnetting for the following LAN.172.16.0.0/16Specification: Subnet number = 8 bits.

IP Subnetting example (2)Original subnet mask = /16New extended subnet mask = /(16 + 8) = /24 172.160.08 bits Subnet #network prefix8 bitshosts16 bits16 bitsNew network prefix8 bitshostsextended network prefix (24 bits)IP Subnetting example (3)General Implementation:Subnet 1 network into 3 LAN1 network ID (172.16.0.0/16) becomes 3 network ID (172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24)All subnet mask has been changed from /16 to /241 gateway -> 3 gateways

Quick Quiz:If you have a network 170.100.0.0/16, the number of subnet bits allocated is 6, then:What will be the new subnet mask?How many more gateway IP addresses do you require?Answer/16 + 6 = /22 = 255.255.252.0Assume that originally you need 1 gateway IP address. 6 subnet bits will require 26 gateway addresses = 64Maximum you need (64 1) = 63 more gateway IP address.170.1000.06 bits Subnet #network prefix10 bitshosts16 bits16 bitsNew network prefix10 bitshostsextended network prefix (22 bits)Types of SubnettingTraditional classful subnettingBased on the IP class to perform subnettingDesign with equal size subnet mask across the network

VLSM (variable subnet mask)Design a network with subnets of different size of subnet maskMore efficient use of the IP addresses

CIDR & VLSMPrior to 1981, IP addresses used only the first 8 bits to specify the network portion of the addressIn 1981, RFC 791 modified the IPv4 32-bit address to allow for three different classesIP address space was depleting rapidlythe Internet Engineering Task Force (IETF) introduced Classless Inter-Domain Routing (CIDR)CIDR uses Variable Length Subnet Masking (VLSM) to help conserve address space.VLSM is simply subnetting a subnetTraditional classful SubnettingFirst, determine which class does the IP belongs toClass A (24 host bits), B (16 host bits) or C (8 host bits)

Second, determine how many subnet bits you want to allocate.

Third, compute the new subnet mask.

Fourth, plan the IP range of each subnet.Traditional Classful SubnettingIn this subnetting scheme, you cant use the subnet bits which is all 0s and all 1sThere is a way to overcome this, will discuss later in the slides.

In fact, you will lose a lot of usable host IP addresses in the form ofSubnetwork network ID (all host bits = 0)Subnetwork broadcast address (all host bits = 1s)Gateway IP addressesThe subnetworks with all bits which 0s and 1sSubnet bits =00.. or 11..Original Network bitsHost bitsTraditional Classful SubnettingThere are two ways to determine the subnet bits (you can choose either one the following):The number of subnets that you want to have in the network that you are going to splitFor example, you want 10 subnets in the network, then you need S subnet bits. (2S >= 10) The maximum number of hosts that you want to allocate For example, if you have a class B IP address, and you need maximum1000 hosts in any one of the subnet, then you need N subnet bits where ( 32 = 16 + S + H bits) 2H >= 1000 => H = 10 bits. Then N = 32 16 10 = 4 bits.16 is the original host bits for class B IP address.

Quick QuizIf I have a class B address, and I need 11 subnets, what should be mySubnet bitsHost bitsMax number of hosts in each subnet New subnet mask?Answer:Subnet bits = 4Host bits = 12Max # of host = 212 2New mask = /20Quick Quiz: Number of subnet bitsHow many departments can you design if your company: has a class C IP address;1 department = 1 subnet;max host in any one of the department = 18;AnswerClass C IP has 8 bits host18 host requires 2S > 18 => S = 58 5 = 3 (subnet bits)23 = 88 2 = 6 subnets => 6 departments2 represents subnet bits with all 0s and all 1s.

Steps to Subnetting (1)Case Study:You have a Class C address of 192.168.100.0 /24. You need nine subnets. What is the IP plan of network numbers, broadcast numbers, and valid host numbers? What is the subnet mask needed for this plan?Steps to Subnetting (2)

Since the subnet mask is /24, we only need to focus on the 4th octet.The 4 octet is the host bits, represented by HThe N bits is the new subNet bits.Steps to Subnetting (3)

Steps to Subnetting (4)

Steps to Subnetting (5)

Steps to Subnetting (6)

Steps to Subnetting (7)

Steps to Subnetting (8)

Steps to Subnetting (8)

Continuenext pageSteps to Subnetting (9)

Steps to Subnetting (10)

Quick Quiz:How many host IP addresses are there in 192.168.100.0/24?How many host IP addresses are there in all the valid subnets, if 4 bits is used as subnet bits?Assume host only consist of end devices PCs, servers, and printers.Answer:28 2 = 254 hosts28 16 16 14 14 14 = 18216 = subnet with all 0 subnet bits16 = subnet with all 1 subnet bits14 = subnet network address14 = subnet broadcast address14 = gateway IP for the subnetsCompare to the original supernet, the subnetting has lost (254-182) = 72 useful host IP addresses.

Quick Quiz: SubnettingYou have address of 172.16.0.0 /16. You need nine subnets. What is the IP plan for these 9 subnets?

Answer

Quick Quiz: SubnettingYou are being assigned to a network 10.0.109.2/19, and 4 bits are being allocated for subnets. You are asked to configure your PC to be the 8th host in the 5th subnet (0 subnet is not the 1st subnet). The gateway is the last usable host address. So, what will be your IP address, subnet mask, and gateway address?

Answer 10.0.109.0 = 10.0. 01101101. 2/19 => 10.0. 011 < 0110 >< 1.2> => 10.0.011 < 0101>< 0.00001000> = 5th subnet. = 8th host.So IP = 10.0. 01101010 . 00001000 = 10.0.106.8Subnet mask = /23 = 255.255.254.0Gateway address = 10.0. 011 = 10.0.107.254VLSM (1)Variable-length subnet masking (VLSM) is the more realistic way of subnetting a network to make for the most efficient use of all of the bits.

VLSM is the process of subnetting a subnet and using different subnet masks for different networks in your IP plan.

What you have to remember is that you need to make sure that there is no overlap in any of the addresses.VLSM (2)Remember that when you perform classful (or what I sometimes call classical) subnetting, all subnets have the same number of hosts because they all use the same subnet mask. This leads to inefficiencies. For example, if you borrow 4 bits on a Class C network, you end up with 14 valid subnets of 14 valid hosts. (instead of 16 subnets)A serial link to another router only needs 2 hosts, but with classical subnetting, you end up wasting 12 of those hosts. IP Subnet Zero (1)When you work with classical subnetting, you always have to eliminate the subnets that contain either all zeros or all ones in the subnet portion. Hence, you always used the formula 2N 2 to define the number of valid subnets created. However, Cisco devices can use those subnets, as long as the command ip subnet-zero is in the configuration.IP Subnet Zero (2)This command is on by default in Cisco IOS Software Release 12.0 and later; if it was turned off for some reason, however, you can re-enable it by using the following command:

Router(config)#ip subnet-zero

Now you can use the formula 2N rather than 2N 2.VLSM Example #1 (1)Given the following network 192.168.1.0/24, how is it going to be subnetted?We only need to take care of the 10 hosts subnet, 11 hosts subnet, and 30 hosts subnet.Assume IP subnet-zero is implemented.Assume that there wont be expansion on the number of host per subnet.

VLSM Example #1 (2)Using the traditional subnetting methodology.There are 3 subnets and the maximum # host in a subnet is 30.Either we have 2 subnet bits or 5 host bits.If we choose 2 subnets bit design (6 bits host), there wont be much expansion on subnets but growth on hosts.In this case, we choose 5 bits host design (3 subnet bits), as specified in the question.VLSM Example #1 (3)Since we have ip subnet-zero, we can use the range192.168.1.1 to 192.168.1.30192.168.1.225 to 192.168.1.254You can pick any three of these 8 subnets.VLSM Example #1 (4)With traditional classful subnetting

192.168.1.0/27192.168.1.32/27192.168.1.64/27VLSM Example #1 (5)However, the traditional classful subnetting in this case, is not IP address efficient.Given that there wont be expansion on the number of host per subnet.10 hosts subnet and 11 hosts subnet will have around 20 IP addresses (per subnet) that are not utilized.VLSM Example #1 (6)If we use VLSM scheme, this is how we are going to do it.1st we choose the largest network 30 hostsHost bits is still 5We can still use the subnet of 192.168.1.1 to 192.168.1.30, which is 192.168.1.0/272nd we group the 10 hosts subnet and 11 hosts subnet into one 30 hosts subnet.We can use the subnet of 192.168.1.33 to 192.168.1.62, which is 192.168.1.32/27VLSM Example #1 (7)Now, we perform subnetting the subnet.We subnet the 192.168.1.32/27 into two subnets.With the help of IP calculator (using CIDR), we have:192.168.1.32/28Usable IP range 192.168.1.33 to 192.168.1.46192.168.1.48/28Usable IP range 192.168.1.49 to 192.168.1.62VLSM Example #1 (8)With VLSM subnetting

192.168.1.0/27192.168.1.48/28192.168.1.32/28VLSM Example (1) A Class C network192.168.100.0/24is assigned. You need to create an IP plan for this network using VLSM.

VLSM Example (2)The steps to create an IP plan using VLSM for the network illustrated are as follows:Step 1: Determine how many H bits will be needed to satisfy the largest network.Step 2: Pick a subnet for the largest network to use.Step 3: Pick the next largest network to work with.Step 4: Pick the third largest network to work with.Step 5: Determine network numbers for serial links.VLSM Example (3)

VLSM Example (4)

ContinueNext pageVLSM Example (5)

ContinueNext pageVLSM Example (6)

ContinueNext pageVLSM Example (7)

ContinueNext pageVLSM Example (8)

ContinueNext pageVLSM Example (9)

VLSM Example (10)

ContinueNext pageVLSM Example (11)

ContinueNext pageVLSM Example (12)

VLSM Example (13)

ContinueNext pageVLSM Example (14)

ContinueNext page

VLSM Example (15)

VLSM ConclusionLooking at the plan, you can see that no number is used twice. You have now created an IP plan for the network and have made the plan as efficient as possible, wasting no addresses in the serial links and leaving room for future growth.

This is the power of VLSM.Quick Quiz: VLSM DesignGiven the address of a network is 214.97.254.0/17. This network is going to be subnetted into 3 subnets with 900 hosts, 100 hosts and 500 hosts. Design the IP ranges consecutively, one net after the other, starting with the lowest IP address in 214.97.254.0/17. Design using the VLSM scheme, put the largest subnet first down to the smallest subnet.Answer(900-500-100) arrangement

900 hosts is rounded to 1024 (0x3FF), occupying 0x000 to 0x3FF. New subnet 3-1 = 214.97.128.0 to 214.97.131.255 => 214.97.128.0/22(lower two octets) 10000000.00000000 to 10000011.11111111

500 hosts => rounded to 511 (0x1FF), occupying 0x400 to 0x5FF. New supernet = 214.97.132.0 to 214.97.133.255 => 214.97.132.0/23 (lower two octets) 10000100.00000000 to 10000101.11111111

100 hosts is rounded to 128 (0x7F), occupying 0x600 to 0x67F. New subnet 3-2 = 214.97.134.0 to 214.97.134.127 => 214.97.134.0/25(lower two octets) 10000110.00000000 to 10000110.01111111Quick Quiz: SubnettingGiven the following network 192.168.1.0/24, how is it going to be subnetted with 50 hosts, 60 hosts, and 70 hosts?

Answer 1: Traditional subnettingWith traditional method, the network requires 2 subnet bits (assume with ip subnet-zero).That leave only 6 host bits (max # of host 62), then we cant fit 70 hosts with only 6 host bits. Therefore, we cant subnet this network with traditional method. Answer 2: VLSM subnettingStart with largest network, 70 hosts, require 7 host bits, left with 1 subnet bit.Which make the new subnet mask /25We can put the 70 hosts in either 192.168.1./25 (192.168.1.0/25) or 192.168.1./25 (192.168.1.128/25)We choose the first subnet, which is 192.168.1.0/25The rest of the two subnets will be fit into 192.168.1.128/25Follow with the second largest network, 60 hosts, require 6 host bits. We need to perform subnetting the subnet (192.168.1.128/25), which leave us with 1 new subnet bitWhich make the new subnet mask /26We can put the 60 hosts in either 192.168.1./26 (192.168.1.128/26) or 192.168.1./26 (192.168.1.192/26)We choose the 60 hosts in the subnet of 192.168.1.128/26We put the remaining 50 hosts in the subnet of 192.168.1.192/26

Quick Quiz: Subnetting (again)Given the following network 192.168.1.0/24, how is it going to be subnetted with 70 hosts, 60 hosts, and 70 hosts? (previously it was 50, 60 and 70 hosts)

Answer:This network can NOT be subnetted with traditional subnetting or VLSM with 192.168.1.0/24.Though 70+60+70 = 200 hosts (which are less than 254 host, which is 8 host bits)Reason:There are two largest subnet with 70 hosts which require 7 host bits, which leave us with 1 bit subnet (# of subnets = 2).After fitting the two 70 hosts subnet, there is no more subnet left for the 60 hosts.You can either fit in 2 of the 3 subnets.Route SummarizationRoute summarization, is needed to reduce the number of routes that a router advertises to its neighbor.Router summarization make the combined subnets appear to be a supernetFor every route you advertise, the size of the update and routing table grows. Route summarization greatly reduces the size of the routing tableIt has been said that if there were no route summarization, the Internet backbone would have collapsed from the sheer size of its own routing tables back in 1997.

CIDRCIDR (Classless Inter Domain Routing) is also known as supernetting as it effectively allows multiple subnets to be grouped together for network routing.

CIDR was adopted to help ease the load imposed on internet and large network backbone routers by the increasing size of routing tables.Large routing tables have several adverse effects: Routers require more memory in order to store and manipulate their routing tables which increases operation costs. Routing latency is increased due to the large amount of data contained in the routing tables. Network bandwidth usage is increased by routing updates when routers exchange their routing tables.CIDRCIDR (Classless Inter-Domain Routing) encompasses:the VLSM technique of specifying arbitrary-length prefixes.An address in CIDR notation is written with a suffix indicating the number of bits in the prefix, such as 192.168.0.0/16, where /16 is the suffix, and 192.168.0.0 is the prefix.the aggregation of multiple contiguous prefixes into supernets, thus reducing the number of entries in the global routing table. Aggregation hides multiple levels of subnetting from the Internet routing table, and reverses the process of subnetting with VLSM.

Route Summarization Example (1)

Route Summarization Example (2)

Route Summarization Example (3)

Route Summarization Example (4)

Route Summarization Example (5)

Try this supernetting with UTAR IP calculator (yourself)Route Summarization Example (6)

Supernetting & Route SummarizationSupernet and route summarization use the same IP address computation that combines a few IP of a few subnets into one.The difference is that supernetting will physically combine a few subnets together whereas route summarization only compute the supernet network ID (in router) without changing the network.Supernetting & Route SummarizationBoth route summarization & supernetting produce the same summarized IP network ID.However supernetting changes the network topology.

172.16.128.0/22

OriginalsupernettingRouteSummarizationPros and Cons of subnettingPros:Better security and managementMore host IP being utilized within the subnet.Cons:Waste some host IP in the form of network address, broadcast address, and gateway IPsNetwork design is more complex in order to perform the IP planning.