IP Addresses & Classes Presented By: M.Usman Khan Ghauri Nauman Aslam
IP Address An IP address is a unique identifier, or address for a computer or host connection on a network. –IPs are 32 bit binary numbers represented in 4 parts of 8. Each part is separated by a decimal point (.) and is referred to as an octet. This is known as a dotted decimal notation Example: In Binary:
Dotted decimal notation Used to make the form shorter and easier to read Internet addresses are usually written using this form Looking at the first byte of an address in decimal form will allow us to determine which class the particular address belongs (for the example it belongs to class B)
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. 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(InterNIC)
Parts of An IP Every IP consist of two parts –One part identifying the network(Network ID) –One part identifying the node(Host ID) The Class of the address and the subnet mask determines which part belongs to the network address and which part belongs to the node address
What are the different classes of networks? There are three classes of IP addresses that are commercially used, 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“ 2 other classes D&E [details on slides]
Address classes Classes of Networks NHHH Class A: NNNH Class C: NNHH Class B: Network number assigned by NIC Host number assigned by Systems Administrator 1 Byte
Class ranges for Internet addresses
Class A –Addresses begin with 0xxx, or 1 to 126 decimal –Class A addresses would have the following format: NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn There is one octet which defines the network address, and three which defines the node address Used for networks with more than 65,536 hosts (up to hosts)
Class A IP Address Bit Patterns 0 Network # Host # Class A: Bit # – 32 (24 bits) Class A address range – ( is for loopback) Private Class A address: Number of hosts: = 16,777,
Loopback Addresses beginning with: , or 127 decimal, are reserved for internal, or local machine use. For example if you ping using , it should point to yourself.
Class B Addresses begin with 10xx, or 128 to 191 Format –NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn There are two octets which define the network address and two which define the node address Used for networks that have between 256 and 65,534 hosts
13 IP addressing IP Address Bit Patterns Class B: Bit # – 32 (16 bits) Class B address range – Private Class B : – Number of hosts: = 65,534 10Network #Host #
Class C Addressing Addresses begin with 110x, or 192 to 223 Format –NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn There are three octets which define the network address and one which define the node address Used with networks that have fewer than 254 hosts
IP addressing IP Address Bit Patterns Class C: Bit # – 32 (8 bits) Class C address range – Private Class C : Number of hosts: = Network #Host # 3
Class D Addresses Special category of IPs, which are used for multicasting purposes Begin with 1110, or 224 to 239 decimal
Class E Addresses Special category of IPs, which are often reserved for future use. They are usually not be used for host addresses Begin with 1111, or 240 to 254
What IP addresses are reserved for broadcasts? for the network that is , the broadcast address that would be sent out to all devices on that network would be
Private networks There are three network addresses reserved for private networks Addresses: 16,777, Addresses: 1,048, Addresses: 65,536
Internet Classes (Class B) (Class C) (Class A) (Class D) (Class E)
Network Masks A network mask helps you know which portion of the address identifies the network and which portion of the address identifies the node. Class A, B, and C networks have default masks, also known as natural masks, as shown here: –Class A: –Class B: –Class C: An IP address on a Class A network that has not been subnetted would have an address/mask pair similar to: convert the address and mask to binary numbers = =
Any address bits which have corresponding mask bits set to 1 represent the network ID. Any address bits that have corresponding mask bits set to 0 represent the node ID = = −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− net id | host id netid = = 8 hostid = = Network Masks
Broadcasting Used to send packets to all networks or subnets. Two types of broadcasting: –All-nets broadcasting - packet are addressed: –Subnets broadcasting – Host portion of the address is set to 255. For example If the IP address is: , a class C with a mask of , the broadcast address would be
Network Address VS Broadcast address A Network address has all the host bits set to “0” A Broadcast address has all the host bits set to “1” Therefore – is the network address – is the broadcast address
SUB-NETTING
Subnetting Breaking a large network into smaller networks (subnets) Subnetting –Is the act of “borrowing” bits from the host portion to create smaller networks (called subnetworks) –Subnetting is used to reduce the number of broadcast domains –Communication between these subnetworks is achieved through a router.
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.
The Sub-net Mask A 32-bit number used to describe which portion of an address refers to the subnet and which portion refers to the host. –Every computer on a network must have the same subnet mask. The following are examples of different subnet masks:
Sub-netting To subnet a network, extend the natural mask using some of the bits from the host ID portion of the address to create a subnetwork ID. For example, given a Class C network of which has a natural mask of , you can create subnets in this manner: − −
3 Borrowed bits = eight subnets. (2 3 =8) 5 bits = 32 hosts (2 5 =32) actually 30 hosts. So, with this in mind, these subnets have been created. – host address range 1 to 30 – host address range 33 to 62 – host address range 65 to 94 – host address range 97 to 126 – host address range 129 to 158 – host address range 161 to 190 – host address range 193 to 222 – host address range 225 to 254
IP Addressing and Subnetting Quick Techniques
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 & Routing33 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
34 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 (ie 2 x = > 1000) –This would equate to 2 10 or networks –Hence you will need to borrow 6 bits from the host portion to create subnetworks with 1000 hosts each
Now Identify! In this example, you are given two address / mask combinations, written with the prefix/length notation, which have been assigned to two devices. Your task is to determine if these devices are on the same subnet or different subnets. You can do this by using the address and mask of each device to determine to which subnet each address belongs. [Classless Interdomain Routing (CIDR) format] DeviceA: /20 DeviceB: /20
Example Solution − − −−−−−−−−−−−−−−−−|sub|−−−−−−−−−−−− subnet = = Looking at the address bits that have a corresponding mask bit set to one, and setting all the other address bits to zero (this is equivalent to performing a logical "AND" between the mask and address), shows you to which subnet this address belongs. In this case, DeviceA belongs to subnet
Now Solve? DeviceB: /20 ? Are deviceA and B on same subnet?
SUPERNETTING
Supernetting Supernetting is the idea of combining two or more blocks of IP addresses that together compose a continuous range of addresses (no missing addresses in the middle). A super subnet that contained both of the smaller classful subnets
Supernetting
Rules: ** The number of blocks must be a power of 2 (1, 2, 4, 8, 16,...). ** The blocks must be contiguous in the address space (no gaps between the blocks). ** The third byte of the first address in the superblock must be evenly divisible by the number of blocks. In other words, if the number of blocks is N, the third byte must be divisible by N.
Did you get it enough?