880 likes | 912 Views
SUBNET & ROUTING. Sritrusta Sukaridhoto. IP Addressing. IP addressing. Introduction to IP addressing Classes of IP addressing Why Subnet Masks are necessary? How to create subnet masks. Why are IP addresses written as bits?.
E N D
SUBNET & ROUTING Sritrusta Sukaridhoto
IP addressing • Introduction to IP addressing • Classes of IP addressing • Why Subnet Masks are necessary? • How to create subnet masks Subnet & Routing
Why are IP addresses written as bits? • In order for data to pass along the media, it must first be changed to electrical impulses. • When a computer receives these electrical impulses, it recognizes two things: the presence of voltage on the wire or the absence of voltage on the wire. Subnet & Routing
What format do IP addresses use? Subnet & Routing
How are IP addresses expressed in dotted notation? Subnet & Routing
Why are IP addresses necessary? • IP addressing makes it possible for data passing over the network media of the Internet to find its destination. • Because each IP address is a 32-bit value, that means that there are four billion different IP address possibilities. • IP addresses are hierarchical addresses like phone numbers and zip codes. Subnet & Routing
How do IP addresses make it possible for data sent via the Internet to find its destination? • It is because each network connected to the Internet has a unique network number. • To ensure that each network number on the Internet will always be unique and unlike that of any other number, an organization called the International Network Information Center, or InterNIC Subnet & Routing
How do IP addresses incorporate network addresses? • Every IP address has two parts. These are known as the network number and the host number. Subnet & Routing
What are the different classes of networks? • There are three classes of IP addresses that a company can receive from the InterNIC. The InterNIC reserves class "A" IP addresses for governments throughout the world, class "B" IP addresses for medium size companies, and class "C" Subnet & Routing
IP addressing • Classes of Networks 1 Byte 1 Byte 1 Byte 1 Byte Class A: Class B: Class C: Network number assigned by NICHost number assigned by Systems Administrator Subnet & Routing
IP addressing • IP Address Bit Patterns 1 2 - 8 9 – 32 (24 bits) Bit # Class A: Class A address range1.0.0.0 – 126.0.0.0 (127.0.0.0 is for loopback)Private Class A address: 10.0.0.0Number of hosts: 224 -2 = 16,777,214 Subnet & Routing
IP addressing • IP Address Bit Patterns 1 2 3 - 16 17 – 32 (16 bits) Bit # Class B: Class B address range128.0.0.0 – 191.255.0.0Private Class B : 172.16.0.0 – 172.31.0.0 Number of hosts: 216 - 2 = 65,534 Subnet & Routing
IP addressing • IP Address Bit Patterns 1 2 3 4 - 24 25 – 32 (8 bits) Bit # Class C: Class C address range192.0.0.0 – 233.255.255.0Private Class C : 192.168.0.0 Number of hosts: 28 - 2 = 254 Subnet & Routing
How many classes of Networks are there? you have learned about three classes of networks that can be assigned by the InterNIC. In fact, there are five classes of networks. However, only three of these are used commercially. Subnet & Routing
What IP addresses are reserved for multicast purposes and experimental purposes? The highest number listed was 223. You may have wondered why the highest value was only 223 and not 255, since there are 255 possible values for an octet. in IP addresses the values 224 through 255 are not used in the first octet for networking purposes. Subnet & Routing
What IP addresses are reserved for the Networks? By convention, in IP addressing schemes, any IP address that ends in all binary zeroes is reserved for the networkaddress. Thus, in a class "A" network, 113.0.0.0 would be the IP address of that network. Routers use a network's IP address when forwarding data on the Internet. Subnet & Routing
What IP addresses are reserved for broadcasts? for the network that is 176.10.0.0, the broadcast address that would be sent out to all devices on that network would be 176.10.255.255. Subnet & Routing
Who assigns subnet addresses? As with the host number portion of class "A," class "B," and class "C” addresses, subnet addresses are assigned locally. Usually this is done by the network administrator. Subnet & Routing
IP addressing – Subnet mask • Subnet Masking - Why? IP address Netmask Network Address & = Subnet & Routing
IP addressing - Subnetting • Subnetting • Is the act of “borrowing” bits from the host portion to create smaller networks (called subnetworks) • Minimum bits that can be borrowed is 2 - why? • Subnetting is used to reduce the number of broadcast domains • Communication between these subnetworks is achieved through a router Subnet & Routing
How are subnet addresses concealed from outside networks? Subnets are hidden from outside networks by using a mask. These are referred to as subnet masks. The function of a subnet mask is to tell devices which part of an address is the network number including the subnet, and which part is the host. Subnet & Routing
What format do subnet masks use? Subnet masks use the same format as IP addressing. In other words, they are thirty two bits long and divided into four octets. Subnet masks have all 1s in the network and subnetwork portion, and all 0s in the host portion. Subnet & Routing
How many bits can be borrowed from the host number in class "B" and class "C" networks to create subnets? Because there are only two octets in the host field of a class "B” network, up to fourteen bits can be borrowed to create subnetworks. A class "C" network has only one octet in the host field. Therefore, only up to six bits can be borrowed in class "C” networks to create subnetworks. Subnet & Routing
What happens to the subnet mask address if only some of the bits in an octet are borrowed? Imagine that you have a class "B” network. This time however, instead of borrowing all eight bits of the third octet, only seven bits are borrowed to create subnetworks. Using binary representation, in this example, the subnet mask would be 11111111.11111111.11111110.00000000. Therefore, 255.255.255.0 can no longer be used as the subnet mask. Subnet & Routing
If only seven bits are borrowed in a class "B" network, what would the subnet mask be in dotted decimal notation? HINT: To convert any eight bit binary number into a decimal number, total the powers of 2 that occur in the number. Subnet & Routing
What determines how many subnetworks can be created by borrowing bits from the host field? Can you figure out all of the possible combinations of 0s and 1s if four bits are borrowed from the host field to create subnetworks? 16 from 0000 to 1111. However, you know that 1111 is reserved for broadcast and 0000 means this network. Subnet & Routing
How many subnetworks can be created by borrowing five bits from the host field? Answer: Thirty-two subnetworks or 25 =32 subnetworks can be created by borrowing five bits from the host field. Subnet & Routing
Which numbers in a subnetwork are reserved for broadcasts? In previous section, we used an example of a class "C" network in which three bits are borrowed from the host field. You learned that when three bits are borrowed from the host octet, up to eight subnetworks can be created each having up to thirty-two hosts. You also learned that IP addresses ending in all binary 1s are reserved for broadcasts. The same is true for subnetworks. Subnet & Routing
For IP address 197.15.22.160 on the same class "C” network. How would this be expressed in a binary numbering scheme? Answer: If 197.15.22.160 is converted to binary format, it becomes 110001010.00001111.00010110. 10100000. The first three bits in the last octet, 101, indicate that this is the sixth subnetwork. As before the remaining bits are all binary 0s. This means that the IP address197.15.22.160 must be one that is reserved for a subnetwork address. Subnet & Routing
Subnet mask • How do we determine how many bits to “borrow” for a subnet? • Determine the number of sub networks required • 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 subnetworks Subnet & Routing
Subnet mask • Example: • You are given a class B address and you are required to create 1000 subnetworks. • By working from the LHS of the (first octet after the network number) 3rd octet, calculate the number of bits to equal or slightly exceed 1000. (ie 2x = > 1000) • This would equate to 210 or 1024-2 networks • Hence you will need to borrow 10 bits from the host portion to create 1000 subnetworks Subnet & Routing
Subnet mask • Example: • The subnetmask in this instance would be255.255.255.192 • How many host per network can you obtain from this addressing scheme? 6 bits left for hosts 10 Bits Borrowed (subnetmask) Natural Class B netmask Subnet & Routing
Subnet mask • How do we determine how many bits to “borrow” for a subnet given the number of hosts required? • Determine the number of hosts required • Work from the LEAST significant (RHS) bits of the last octet and calculate the number of bits needed to create the required number of subnetworks Subnet & Routing
Subnet mask • Example: • You are given a class B address and you require 1000 nodes per subnet • By working from the RHS (last octet) of the 4th octet, calculate the number of bits to equal or slightly exceed 1000. (ie 2x = >1000) • This would equate to 210 or 1024-2 networks • Hence you will need to borrow 6 bits from the host portion to create subnetworks with 1000 hosts each Subnet & Routing
Subnet mask • Example: • The subnetmask in this instance would be255.255.252.0 • How many subnetworks per network can you obtain from this addressing scheme? • Note: Do you recognise this address as the student “supernet” address? 10 bits required for hosts 6 Bits Borrowed (subnetmask) Natural Class B netmask Subnet & Routing
What about a Supernet? • A supernet “borrows” bits from the network portion to create contiguous nodes to form a “super network” • For example • Company A has about 1000 nodes to address. A class B address would be too big (or may not be available). Solution Supernetting using 4 contiguous class C addresses203.10.112.0203.10.113.0203.10.114.0203.10.115.0 (All netmasked to 255.255.255.0) Subnet & Routing
What about a Supernet? • By allowing the first 2 bits of the third octet to be “borrowed”, a virtual class B address can be created. • A supernet address of 203.10.112.0 – 203.10.115.255 is formed with a subnet mask of 255.255.252.0. • The Host portion will be expanded from 8 – 10 bits • Route summarisation can occur to 203.10.112.0/22 Subnet & Routing
What about a Supernet? Network Portion Host portion 203.10.112.0 203.10.113.0 203.10.114.0 203.10.115.255 255.255.252.0 We have expanded the host portion by 2 bits to 10 bits Subnet & Routing
What is a Broadcast Address • A broadcast address is used to by a node to communicate with ALL nodes in a broadcast domain • Like the netmask, the broadcast address is “AND” with the network address. • However, the host portion of the network is identified in a broadcast address Subnet & Routing
What is a Broadcast Address • A broadcast address does this by inserting all “1’s” in the host portion. • Eg A natural class B broadcast address would look something like this • N.N.255.255 • If it is not a classful subnetmask, you can determine the broadcast address within each subnet by locating the host portion and setting them to all 1’s. Subnet & Routing
What is a Broadcast Address • An example of a Broadcast address & = Subnet & Routing
What is a Broadcast Address • An example of a cross boundary subnet broadcast address with a mask of 255.255.252.0 & = Network Portion SN Host portion Network Address Host Broadcast Address Subnet & Routing