Sunday, July 11, 2010

IP Subnetting and Variable Length Subnet Masks (VLSM)


computer & technologySubnetting Basics

• There are loads of reasons in favor of subnetting. Some of the
benefits include:
• Reduced network traffic:- We all appreciate less traffic of any kind.
Networks are no different. Without trusty routers, packet traffic could grind the entire network down to a near standstill.
• Optimized network performance:- This is a result of reduced network traffic.
• Simplified management:- It’s easier to identify and isolate network problems in a group of smaller connected networks than within one gigantic network.
• Facilitated spanning of large geographical distances:- Because WAN links are considerably slower and more expensive than LAN links, a single large network that spans long distances can create problems in every arena listed above.


How to Create Subnets

• To create subnetworks, you take bits from the host portion of the IP address and reserve them to define the subnet address.
• To determine your current requirements as well as plan for future conditions. Follow these steps:
• Determine the number of required network IDs:
• One for each subnet
• One for each wide area network connection
• Determine the number of required host IDs per subnet:
• One for each TCP/IP host
• One for each router interface
• Based on the above requirement, create the following:
• One subnet mask for your entire network
• A unique subnet ID for each physical segment
• A range of host IDs for each subnet


Subnet Masks

• A subnet mask is a 32-bit value that allows the recipient of IP packets to distinguish the network ID portion of the IP address from the host ID portion of the IP address.
• The default subnet masks for Classes A, B, and C. These default masks cannot change.
• Default Subnet Mask



Classless Inter-Domain Routing (CIDR)

• It’s basically the method that ISPs (Internet Service Providers)use to allocate an amount of addresses to a company, a home—a customer.
• They provide addresses in a certain block size which looks something like this: 192.168.10.32/28. This tell you what is your subnet mask.
• For example a Class A default subnet mask is 255.0.0.0. This means that the first byte of the subnet mask is all ones (1s) or 11111111.


Classless Inter-Domain Routing (CIDR) (contd.)

• When referring to a slash notation, The 255.0.0.0 is considered a /8 because it has 8 bits that are 1s—that is, 8 bits that are turned on.
• For class B default subnet mask is 255.255.0.0, slash notation will be /16 and class C default subnet mask is 255.255.255.0 its slash notation will be /24.
• Refer table 3.2 in Book


Subnetting Class C Addresses

• In a Class C address, only 8 bits are available for defining the hosts. This means that the only Class C subnet masks can be the following:
Binary Decimal Shorthand
---------------------------------------------------------
10000000 = 128 /25 (Not valid on the Cisco exams!)
11000000 = 192 /26
11100000 = 224 /27
11110000 = 240 /28
11111000 = 248 /29
11111100 = 252 /30
11111110 = 254 /31 (Not valid)


The Binary Method: Subnetting a Class C Address

• For example, 255.255.255.192., 192 = 11000000
• The 1s represent the subnet bits, and the 0s represent the host bits available in
each subnet. 192 provides 2 bits for subnetting and 6 bits for defining the hosts
in each subnet.
• The subnet bits can’t be both off or on at the same time, the only two valid
subnets are these:
• 01000000 = 64 (all host bits off)
• 10000000 = 128 (all host bits off)
• The table show Subnet 64




The Fast Way: Subnetting a Class C Address

• How many subnets? 2x – 2 = number of subnets. x is the number of masked bits, or the 1s.For example, in 11000000, the number of ones gives us 22 – 2 subnets. In this example, there are 2 subnets.
• How many hosts per subnet? 2y – 2 = number of hosts per subnet. y is the number of unmasked bits, or the 0s. For example, in 11000000, the number of zeros gives us 26–2 hosts. In this example, there are 62 hosts per subnet.
• What are the valid subnets? 256 – subnet mask = block size, or base number. For example,256 – 192 = 64. 64 is the first subnet. The next subnet would be the base number plus itself, or 64 + 64 = 128, (the second subnet). You keep adding the base number to itself until you reach the value of the subnet mask, which is not a valid subnet because all subnet bits would be turned on (1s).


The Fast Way: Subnetting a Class C Address
(contd.)

• What’s the broadcast address for each subnet? The broadcast address is all host bits turned on, which is the number immediately preceding the next subnet.
• What are the valid hosts? Valid hosts are the numbers between the subnets, omitting all 0s and all 1s.


Subnetting Class B Addresses

• The possible Class B subnet masks that we have are lot more possible subnets than we do with a Class C network address:
• 255.255.128.0 (/17) 255.255.255.0 (/24)
• 255.255.192.0 (/18) 255.255.255.128 (/25)
• 255.255.224.0 (/19) 255.255.255.192 (/26)
• 255.255.240.0 (/20) 255.255.255.224 (/27)
• 255.255.248.0 (/21) 255.255.255.240 (/28)
• 255.255.252.0 (/22) 255.255.255.248 (/29)
• 255.255.254.0 (/23) 255.255.255.252 (/30)
• The Class B network address has 16 bits available for host addressing. This means we can use up to 14 bits for subnetting because we have to leave at least 2 bits for host addressing.


Subnetting Class A Addresses

• Class A subnetting is not performed any differently from Classes B and C, but there are 24 bits to play with instead of the 16 in a Class B address and the 8 bits in a Class C address.
• 255.128.0.0 (/9) 255.255.240.0 (/20)
• 255.192.0.0 (/10) 255.255.248.0 (/21)
• 255.224.0.0 (/11) 255.255.252.0 (/22)
• 255.240.0.0 (/12) 255.255.254.0 (/23)
• 255.248.0.0 (/13) 255.255.255.0 (/24)
• 255.252.0.0 (/14) 255.255.255.128 (/25)
• 255.254.0.0 (/15) 255.255.255.192 (/26)
• 255.255.0.0 (/16) 255.255.255.224 (/27)
• 255.255.128.0 (/17) 255.255.255.240 (/28)
• 255.255.192.0 (/18) 255.255.255.248 (/29)
• 255.255.224.0 (/19) 255.255.255.252 (/30)


Variable Length Subnet Masks (VLSMs)

• A router running RIP has a subnet mask of a certain value, it assumes that all interfaces within the classful address space have the same subnet mask. This is
called classful routing, and RIP and IGRP are both considered classful routing protocols.
• Classless routing protocols, however, do support the advertisement of subnet
information.Therefore, you can use VLSM with routing protocols such as RIPv2, EIGRP, or OSPF.
• A Typical Classful Network


VLSM Design

• The mask of 255.255.255.240 (/28) provides 14 subnets, each with 14 hosts.All hosts and router interfaces use the same subnet mask.



• The WAN links are point-to-point, and use only two IP addresses. So we’re basically wasting 12 valid host addresses per WAN link.


VLSM Design (contd.)

• We can use different size masks on each interface. If we do that, we get 2 hosts per WAN interface and 14 hosts per LAN interface.It makes a huge difference, we get more hosts on a LAN, we still have room to add more WANs and LANs on the same network.
• By using a VSLM design, we save address space




Implementing VLSM Networks

• To create VLSMs quickly and efficiently, you need to understand how block sizes and charts work together to create the VLSM masks.
• Block size for class C Network.

Prefix Mask Hosts Block Size
/26 192 62 64
/27 224 30 32
/28 240 14 16
/29 248 6 8
/30 252 2 4


Implementing VLSM Networks (contd.)




Troubleshooting IP Addressing

• Here are the four troubleshooting steps Cisco recommends:
1. ping 127.0.0.1.
2. ping the IP address of the local host.
3. ping the default gateway (router).
4. ping the remote server.

• If steps 1 through 4 were successful, then you know that you have IP communication between the local host and the remote server. You also know that the remote physical network is working.


Troubleshooting IP Addressing (contd.)

• If the user still can’t communicate with the server after steps 1 through 4 are successful, then you probably have some type of name resolution problem, and need to check your Domain Name Server (DNS) settings.
• If the ping to the remote server fails, then you know you have some type of remote physical network problem, and need to go to the server and work through steps 1 through 3 until you find the snag.


Determining IP Address Problems

• It’s common for a host, router, or other network device to be configured with the wrong IP address, subnet mask, or default gateway.
• The Fast Ethernet port of Lab_B is using Broadcast Address of network 64 which is invalid,change the IP Address

No comments:

Post a Comment