nwt ip addressing 1
DESCRIPTION
network troubleshooting.TRANSCRIPT
-
Network TroubleshootingIP Addressing 1
CT046-3-3 Network Troubleshooting
Topic & structure of the lessonClassful IP Address
Subnetting
CT046-3-3 Network Troubleshooting
Communication on InternetEach host contains an unique IP address
Processes on the Network Layer add source and destination IP addresses on each outgoing packet
Packet is sent to the nearest router (on the same LAN)
Router forwards the packet based on IP address using its routing table
Packet reaches destination through the network of routers
End router transmits the packet to the host
CT046-3-3 Network Troubleshooting
IP AddressA 32 bit number (IP v4)Represented as dotted decimal formatAssigned by IANA to maintain uniqueness
128 . 16 . 32 . 13 (Decimal)
1 0 0 0 0 0 0 0 . 0 0 0 1 0 0 0 0 . 0 0 1 0 0 0 0 0 . 0 0 0 0 1 1 0 1 (Binary)
CT046-3-3 Network Troubleshooting
Example
140.179.220.200
Written in binary form: 140.179.220.200
10001100.10110011.11011100.11001000
We see the address in the decimal formThe computer sees it in the binary form
CT046-3-3 Network Troubleshooting
OctetsThe 32-bit IP address is broken up into 4 octets, which are arranged into a dotted-decimal notation scheme.
An octet is a set of 8 bits & not a musical instrument.
Example of an IP version 4:
172.64.126.52
CT046-3-3 Network Troubleshooting
Routing Table and Network AddressEach host is part of some network (small or large)
Instead of keeping address of each individual host, router keeps address of the associated network
Network address is unique for any two hosts on two different LANs
Network address is determined by part of the IP address
CT046-3-3 Network Troubleshooting
Classes of IP addressClasses determine number of bits to be examined for network addressThey are called classful IP Address.There are 5 classes of IP address namely A, B, C, D, E
Networks and Hosts:- Class A: 128 Networks with 16 million hosts each- Class B: 16384 Networks with upto 64K hosts each- Class C: 2 million Networks with 256 hosts each - Class D: Used for multicasting - Class E: Reserved
CT046-3-3 Network Troubleshooting
Classes of IP addressNetworkHostHostHost0NetworkNetworkHostHost10NetNetworkNetworkHost110Multicast address1110Reserved for future use11110ABCDE1.0.0.0 to127.255.255.255128.0.0.0 to191.255.255.255192.0.0.0 to223.255.255.255224.0.0.0 to239.255.255.255240.0.0.0 to247.255.255.255
CT046-3-3 Network Troubleshooting
CT046-3-3 Network Troubleshooting
Identifying ClassesClasses can be identified by examining the value in the first octet of IP address
Ranges of values in the first octet for different classes :
Class A : 0 127N . H . H . HClass B : 128 191N . N . H . HClass C : 192 223N . N . N . H
CT046-3-3 Network Troubleshooting
Network Address and Broadcast AddressNetwork address : - Used to identify the network - Denoted by values in the network part and all 0s in the host part
Broadcast address : - Used to address all the hosts in a single network - Denoted by values in network part followed by all 1s in the host portion
CT046-3-3 Network Troubleshooting
Examples192.168.20.3 - Class : C - Network Address: 192.168.20.0 - Broadcast Address: 192.168.20.255 127.0.4.1 - Class : A - Network Address: 127.0.0.0 - Broadcast Address: 127.255.255.255185.23.5.1 - Class : B - Network Address: 185.23.0.0 - Broadcast Address: 185.23.255.255
CT046-3-3 Network Troubleshooting
Subnetting
CT046-3-3 Network Troubleshooting
Introduction There are only 3 usable IP address classes:Class AClass BClass C
Class A networks have the highest number of available hosts.
Class C networks have the fewest number of hosts.
CT046-3-3 Network Troubleshooting
IntroductionThe world is running out of available IP addresses.
There just isnt an unlimited number of IP addresses available & subnetting helps extend the existing addresses until either the next version of IP is rolled out or some other technology charges on the scene.
Subnetting reduces the size of the routing tables stored in routers. Subnetting extends the existing IP address base & restructures the IP address.
As a result, routers must have a way to extract from a IP address both the Network address & the Host address.
CT046-3-3 Network Troubleshooting
Subnetting, Subnet & Subnet MaskSubnetting, a subnet & a subnet mask are all different.
In fact, subnetting creates the subnet & is identified by the subnet mask.
Subnetting is the process of dividing a network & its IP addresses into segments, each of which is called a subnetwork or subnet.
The subnet mask is the 32-bit number that the router uses to cover up the network address to show which bits are being used to identify the subnet.
CT046-3-3 Network Troubleshooting
Subnetting A network has its own unique address, such as a Class B network with the address 172.20.0.0 which has all zeroes in the host portion of the address.
From the basic definitions of a Class B network & the default Class B subnet mask, this network can be created as a single network that contains 65,534 individual hosts.
CT046-3-3 Network Troubleshooting
Subnetting (Cont.)Through the use of subnetting, the network can be logically divided into subnets with fewer hosts on each subnetwork.
It does not improve the available shared bandwidth only, but it cuts down on the amount of broadcast traffic generated over the entire network as well.
CT046-3-3 Network Troubleshooting
Subnetting (Cont.)Example of subnetting: When the network administrator divides the 172.20.0.0 network into 5 smaller networks:
172.20.1.0172.20.2.0172.20.3.0172.20.4.0172.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.
CT046-3-3 Network Troubleshooting
Subnetting (Cont.)From the example, only a single IP address is used as reference to the network. Instead of 5 network addresses, only one network reference is included in the routing tables of routers on other networks.
CT046-3-3 Network Troubleshooting
Why Subnet?To break the network down into pieces, each of which can be addressed separately.
Controls network trafficReduces broadcastsCan provide low level security with access lists on the routerOrganization of IP address spaceFewer IP addresses, often as few as one, are needed to provide addressing to a network & subnetting.
CT046-3-3 Network Troubleshooting
How Subnetting is Performed?Hosts bits from a given class is reassigned as network bits, known as borrowing bits
Subnet address include: - Network portion of the major IP address (Class A, Class B or Class C network portion) - Subnet field (created by borrowing bits from the original host field of the major IP address) - Host field (the remaining bits in the original host fields)
Work from the most significant (LHS) bits of the first octet after the network number and calculate the number of bits needed to create the required number of sub networks
CT046-3-3 Network Troubleshooting
How many bits to borrow?Depends on maximum number of host per subnet
Use the following formulas: n of usable subnet = 2 n - 2 n of usable hosts = 2 n 2
[Restriction]
- The last two bits in the last octet, regardless of the IP address class, may never be assigned to the sub network - All 0s and all 1s cant be used as the subnet address - All 0s and all 1s cant be used as the host address
CT046-3-3 Network Troubleshooting
Answer this !5 bits are borrowed - How many usable subnets? - How many usable hosts?
We need 32 usable subnets - How many bits to borrow? - How many usable subnets? - How many usable host?
CT046-3-3 Network Troubleshooting
Answer this !5 bits are borrowed - No of usable subnets : 30 - No of usable hosts : 6
We need 32 usable subnets - No of bits to borrow : 6 - No of usable subnets : 62 - No of usable host : 2
CT046-3-3 Network Troubleshooting
Subnet MaskUsed to tell devices which part of the IP address in network number including subnet and which part is the host
Uses the same format as IP addressing i.e. 32 bit long and divided into four octets
Have all 1s in the network portion and all 0s in the host portion
CT046-3-3 Network Troubleshooting
Default Subnet MasksClass A : - N. H. H. H - 11111111.00000000.00000000.000000000 - 255 . 0 . 0 . 0Class B : - N. N. H. H - 11111111.11111111.00000000.000000000 - 255 . 255 . 0 . 0Class C : - N. N. N. H - 11111111.11111111.11111111.000000000 - 255 . 255 . 255 . 0
CT046-3-3 Network Troubleshooting
Subnet mask for custom subnetsThe subnet bits are determined by adding the position value of the bits that were borrowed
If three bits were borrowed, the mask for a Class C address would be 255.255.255.224
CT046-3-3 Network Troubleshooting
Calculating Resident Network using Subnet MaskNetwork address by using subnet mask is performed by logical ANDingThe IP address and sub network mask are ANDed with the result being the sub network idThe process is performed in binary level. So all the addresses must be viewed in binaryAND function table
CT046-3-3 Network Troubleshooting
ANDing processIP address: 1001000.11001000.11001000.00001010 200 . 200 . 200 . 10AND
Subnet Mask: 11111111.11111111.11111111.00000000 255 . 255 . 255 . 0
Network Address: 11001000.11001000.11001000.00000000 200 . 200 . 200 . 0
CT046-3-3 Network Troubleshooting
Determining the Number of Required Subnets and the Resulting Subnet Mask To come up with a subnetting plan (subnetting scheme), the engineer must answer the following questions:
How many subnets are required for a particular network?What is the largest number of hosts needed in the largest subnet?How many subnet bits does the subnet mask need to support (at least) that many subnets?How many host bits does the subnet mask need to support (at least) that many hosts per subnet?What subnet mask(s) support(s) the required number of subnet and host bits?
CT046-3-3 Network Troubleshooting
Subnetting a Default Class C Network Address
200.129.41.0
CT046-3-3 Network Troubleshooting
Subnetting a Default Class C Network Address: 200.129.41.0Default Class C address is divided into network and host portions as follows: N . N . N . H
To subnet we borrow bits from the host portion of the address (8 bits for Class C)N . N . N . x x x x x x x x
Borrowing n bits yields 2n 2 subnets.Leaving n bits yields 2n 2 hosts.
For a class C, we can borrow from 2 to 6 bits.Why not 1 bit? (How many usable subnets?)Why not 7 bits? (How many usable hosts?)
CT046-3-3 Network Troubleshooting
Subnetting a Default Class C Network Address: 200.129.41.0Suppose we need 14 usable subnets, how many bits do we borrow?
Remember, borrowing n bits give us:2n 2 subnetsTry borrowing 3 bits (n = 3):23 2= 8 2 = 6 usable subnets (not enough)Try borrowing 4 bits 24 2= 16 2 = 14 usable subnets (enough)
CT046-3-3 Network Troubleshooting
Subnetting a Default Class C Network Address: 200.129.41.0Write it with the network octet in binary:200.129.41.0000 0000 break hereBorrowing 4 bits yields 14 usable subnetsHow many usable hosts per subnet?Same formula as subnets (2n 2) 4 host bits (n = 4)24 2 = 16 2 = 14 usable hosts per subnetsubnet bitshost bits
CT046-3-3 Network Troubleshooting
Subnetting a Default Class C Network Address: 200.129.41.0Examples:First usable 200.129.41.0001 ^ 0000subnet address:200.129.41.16First usable host200.129.41.0001 ^ 0001 on the first subnet: 200.129.41.17Second usable host200.129.41.0001 ^ 0010on the first subnet: 200.129.41.18..Last usable host200.129.41.0001 ^ 1110on the first subnet: 200.129.41.30Broadcast address200.129.41.0001 ^ 1111for the first subnet:200.129.41.31
CT046-3-3 Network Troubleshooting
Subnetting a Default Class C Network Address: 200.129.41.0Examples:Second usable 200.129.41.0010 ^ 0000subnet address:200.129.41.32Third usable 200.129.41.0011 ^ 0000subnet address:200.129.41.48Fourth usable 200.129.41.0100 ^ 0000subnet address:200.129.41.64...Last usable 200.129.41.1110 ^ 0000subnet address:200.129.41.224
CT046-3-3 Network Troubleshooting
The Subnet Mask: How the Router Determines the SubnetThe subnet mask (in binary) has:all ones in the network and subnet portion of the addressall zeros in the host potion of the address
The subnet mask for the previous example is:255.255.255. 240255.255.255. 1111^ 0000 (128 + 64 + 32 + 16 =240)
ANDing this mask with any valid host address on the network will always yield the subnet address for that host.
CT046-3-3 Network Troubleshooting
The Subnet Mask: How the Router Determines the Subnet
Example (our subnet mask is 255.255.255.240)
IP host address: 200.129. 41.23Last octet to binary: 200.129. 41.0001 0111AND subnet mask: 255.255.255.1111 0000 200.129. 41.0001 0000Subnet Address: 200.129. 41.16 So the host address 200.129. 41.23 is on the 200.129.41.16 subnet.
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address
132.178.0.0
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address: 132.178.0.0Default Class B address is divided into network and host portions as follows:N . N . H . H
To subnet we borrow bits from the host portion of the address (16 bits for Class B)
N . N . x x x x x x x x . x x x x x x x x For a class B, we can borrow from 2 to 14 bits.
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address: 132.178.0.0Suppose we need 80 usable subnets, how many bits do we borrow?Remember, borrowing n bits give us:2n 2 subnetsTry borrowing 6 bits (n = 6):26 2= 64 2 = 62 usable subnets (not enough)Try borrowing 7 bits 27 2= 128 2 = 126 usable subnets (enough)
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address: 132.178.0.0Write it with the network octets in binary:132.178.0000000 0.00000000 break hereBorrowing 7 bits yields 126 usable subnets
How many usable hosts per subnet?Same formula as subnets (2n 2) 9 host bits (n = 9)29 2 = 512 2 = 510 usable hosts per subnetsubnet bitshost bits
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address: 132.178.0.0Examples:First usable 132.178.0000001 ^ 0.00000000subnet address: 132.178.2.0First usable host 132.178.0000001 ^ 0.00000001 on the first subnet: 132.178.2.1 Second usable host 132.178.0000001 ^ 0.00000010on the first subnet: 132.178.2.2 . . .Last usable host 132.178.0000001 ^ 1.11111110on the first subnet: 132.178.3.254Broadcast address 132.178.0000001 ^ 1.11111111 for the first subnet: 132.178.3.255
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address: 132.178.0.0Examples:
Second usable 132.178.0000010 ^ 0.00000000 subnet address: 132.178.4.0Third usable 132.178.0000011 ^ 0.00000000 subnet address: 132.178.6.0 . . .Ninety-first usable 132.178.1011011 ^ 0.00000000subnet address: 132.178.182.0 . . .Last usable 132.178.1111110 ^ 0.00000000subnet address: 132.178.252.0
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address: 132.178.0.0
The subnet mask for this example is:255.255.254.0255.255.1111111 ^ 0.00000000
ANDing this mask with any valid host address on this network will always yield the subnet address.
CT046-3-3 Network Troubleshooting
Subnetting a Default Class B Network Address: 132.178.0.0Example:IP host address:132.178.119.112Last octets to binary:132.178.0111011 ^ 1.01110000AND subnet mask:255.255.1111111 ^ 0.00000000132.178.0111011 ^ 0.00000000
Subnet Address: 132.178.118.0
Which subnet is this. How can you tell?
CT046-3-3 Network Troubleshooting
How does the router handle IP addresses and subnet masks?Let's assume that a device on another network with an IP address of 197.15.22.44 wants to send data to another device attached to a network with an IP address of 131.108.2.2.
The data is sent out over the Internet until it reaches the router that is attached to that network.
The router's job is to determine which one of the networks the data should be routed to.
CT046-3-3 Network Troubleshooting
Inside the router
CT046-3-3 Network Troubleshooting
when the router performs this ANDing" operation, the host portion falls through.Inside the router
CT046-3-3 Network Troubleshooting
The router looks at what is left which is the network number including the subnetwork.Inside the router
CT046-3-3 Network Troubleshooting
The router then looks in its routing table and tries to match the network number including the subnet with an interface. Inside the router
*******