Download presentation
Presentation is loading. Please wait.
1
2440: 141 Web Site Administration IP Addressing Instructor: Enoch E. Damson
2
Data Packets Comprised of small chunks of data that each layer appends onto the packet data received from the layer directly above it Commonly referred to as datagrams Sent out on the chosen physical medium to its destination address (included in the packet by the network or IP layer Packets are nothing more than a series of bits (0s and 1s) If written in binary (bit) format, may take up a lot of space and hard to read Instead, packets can be displayed in hexadecimal to save space 1 hex digit is equivalent to 4 bits 2 hex digits represents 8 bits (1 byte) IP Addressing2
3
Hexadecimal-Decimal-Binary Computers use the binary system (base 2) with only two numeric symbols (0 and 1) Human beings find it easier working with decimal (base 10) values (0-9) Some datagrams are written in hexadecimal (base 16) values (0-9, a-f) IP Addressing3
4
Numeric Conversions There are different methods of conversions between: Decimal to Binary (and vice versa) Decimal to Hexadecimal (and vice versa) Adopt a methodology that is easiest or makes most sense to you IP Addressing4
5
Decimal to Hexadecimal Conversion Example #1: 172= 16 * 10 Remainder 12 (12 is c) 10= 16 * 0 Remainder R10(10 is a) = AC (10 12) Example #2: 205= 16 * 12 Remainder 13 (13 is d) 12= 16 * 0 Remainder 12 (12 is c) = CD (12 13) Example #3: 52= 16 * 3 Remainder 4 3= 16 * 0 Remainder 3 = 34 Hexadecimals a= 10 b= 11 c= 12 d= 13 e= 14 f= 15 IP Addressing5
6
Hexadecimal to Decimal Conversion Example #1: AC= (10 x 16 1 ) + (12 x 16 0 ) =160 + 12 =172 Example #2: CD= (12 x 16 1 ) + (13 x 16 0 ) =192 + 13 =205 Example #3: 34= (3 x 16 1 ) + (4 x 16 0 ) =48 + 4 =52 Hexadecimals a= 10 b= 11 c= 12 d= 13 e= 14 f= 15 IP Addressing6
7
Decimal to Binary Conversion Example #1: 172= 2 * 86 Remainder 0 86= 2 * 43 Remainder 0 43= 2 * 21 Remainder 1 21= 2 * 10 Remainder 1 10= 2 * 5 Remainder 0 5= 2 * 2 Remainder 1 2= 2 * 1 Remainder 0 1= 2 * 0 Remainder 1 Counting the remainders from the bottom up, the binary equivalent of the decimal value 172 is: 10101100 IP Addressing7
8
Decimal to Binary Conversion… Example #2: 125 is converted to binary by finding the integer quotients and the remainders as follows: 125 divided by 2 equals 62, remainder 1 62 divided by 2 equals 31, remainder 0 31 divided by 2 equals 15, remainder 1 15 divided by 2 equals 7, remainder 1 7 divided by 2 equals 3, remainder 1 3 divided by 2 equals 1, remainder 1 1 divided by 2 equals 0, remainder 1 1111101 For octets: pad with a 0 01111101 IP Addressing8
9
Binary to Decimal Conversion One method of converting the binary 11010011 to decimal is as follows: 1. Count the total number of digits in the number (8) 2. Subtract one from the total (8 - 1 = 7) 3. That number (7) is the power of 2 to associate with the highest exponent for two in the number 4. Convert to exponential notation, using all the digits as multipliers 5. 11010011, therefore, converts to: IP Addressing9
10
Binary to Decimal Conversion… 1286432168421 27272727 26262626 25252525 24242424 23232323 22222222 21212121 20202020 01011011 Another method of converting the binary 01011011 to decimals is as follows: Add all the decimals equivalents with the value 1 (for “on” switches) 64 + 16 + 8 + 2 + 1 = 91 IP Addressing10
11
High-Order Bit Patterns IP Addressing11
12
Low-Order Bit Patterns IP Addressing12
13
Hexadecimal-Decimal-Binary Conversion Example ac.1c.0a.c1 converted to decimal yields 172.28.10.193 hexadecimaldecimal ac 172 1c 28 0a 10 c1 193 Converting the decimals to binary results to: 10101100.00011100.00001010.11000001 hexadecimaldecimalbinary octets ac 172 10101100 1c 28 11100 (00011100) 0a 10 1010 (00001010) c1 193 11000001 The second and third octets are padded with leading 0s to make it 8 bits (1 byte) long IP Addressing13
14
Importance of Numeric Conversions Converting between number systems is important when: Calculating IP addresses Calculating Subnets Interpreting hexadecimal packet representation IP Addressing14
15
IP Addressing An IP (Internet Protocol) address is a unique identifier for a node or host connection on an IP network IP addresses are 32 bits (4 bytes) long Each byte is represented as an octet (decimal number from 0 to 255) – a grouping of 8 bits usually expressed as decimal numbers The 4 bytes are usually represented in dotted decimal notation E.g., 172.24.208.192 IP addresses have two distinct parts: Network identifier (E.g., 172.24.x.x for IP address above) Host ID identifier (E.g., x.x.208.192 for the IP address above) IP Addressing15
16
IP Addressing… IP address are categorized into ranges referred to as classes: Classes A, B, C, D, and E Only IP addresses in the classes A, B, and C are available for assigning an address to a host Class system provides a basis for determining which part of the address is the network and which is the host ID The first octet of an address denotes its class IP Addressing16
17
IP Addressing Classes Class A: Intended for large corporations and governments An IP address registry assigns the first octet, leaving the last three octets for network administrators to assign to hosts First octet between 1-126 16,777,214 hosts per network address Class B: Intended for use in medium-sized networks First two octets are assigned, leaving the last 2 for hosts First octet between 128-191 65,534 hosts per network address IP Addressing17
18
IP Addressing Classes… Class C: Intended for small networks First three octets are assigned First octet between 192-223 254 hosts per network address Class D: Reserved for multicasting – a packet is addressed to allow reception at more than one destination Applications using this include streaming media and videoconferencing First octet between 224-239 Cannot be used to assign IP addresses to host computers IP Addressing18
19
IP Addressing Classes… Class E: Reserved for experimental use First octet between 240-255 Cannot be used for IP address assignment IP Addressing19
20
Common IP Classes ClassFirstByte Subnet mask Number of Networks Hosts Class A 1 – 127 255.0.0.0126>16,000,000 Class B 128 – 191 255.255.0.0 > 16,000 >65,000 Class C 192 – 223 255.255.255.0 > 2,000,000 254 IP Addressing20
21
IP Addressing… IP addresses beginning with 127 (or 01111111) are reserved for loopback and for internal testing on a local machine 127.0.0.0 network is called the loopback address – always refers to the local computer and used to test the functionality of TCP/IP localhost always corresponds to address 127.0.0.1 To alleviate the problem of IP address scarcity, the TCP/IP’s governing body, Internet Engineering Task Force (IETF), reserved addresses for private networks Class A addresses beginning with 10 Class B addresses from 172.16 to 172.31 Class C addresses from 192.168.0 to 192.168.255 These addresses cannot be routed across the Internet IP Addressing21
22
IP Addressing… Network Address Translation (NAT) – allows an IP address from one network to be translated into another address on an internal network Can be used to translate a single IP address valid on the Internet into multiple internal addresses Useful if your ISP gives you a single IP address but you have multiple servers and users on the internal network IPv6 eliminates the need for private addressing It provides a 128-bit address (vs. IPv4’s 32 bits) A number of public and private companies around the world (IP address registries) cooperatively manage the total collection of valid IP address The activity occurs under the control of the Internet Assigned Numbers Authority (IANA) – a public nonprofit agency responsible for Internet addressing and address management IP Addressing22
23
Classless Interdomain Routing (CIDR) Addressing by class has been superseded by a more flexible addressing method Classless Interdomain Routing (CIDR) – the network and host demarcation can be made with any number of bits from the beginning of the address E.g., a Class C address’s network section is 24 bits Using CIDR, an address registry can assign an address with a network section of 26 bits 192.203.187.0/26 The CIDR technique involves “borrowing” bits from the host portion of the address to create two or more network numbers, hence process is called subnetting Subnetting divides network address in two or more subnetwork addresses (with fewer host IDs for each) IP Addressing23
24
Why Subnet? Subnetting: Makes more efficient use of available IP addresses Enables dividing networks into logical groups Can make network communication more efficient Reduces broadcast traffic IP Addressing24
25
Subnet Masks Subnet mask (netmask) – determines which part of the IP address denotes the network and host portions A 32-bit number that is always assigned to a host when the IP address is assigned A binary 1 signifies that the corresponding bit in the IP address belongs to the network portion A binary 0 signifies that the bit in the IP address belongs to the host portion The default subnet mask uses a 255 (11111111 in binary) in each octet in the IP address that corresponds to the network portion Class A: 255.0.0.0 Class B: 255.255.0.0 Class C: 255.255.255.0 IP Addressing25
26
Calculating a Subnet Mask To build a subnet mask, use the following steps: 1. Decide how many subnets you need Number is usually derived as a result of a network design document Seeing how many network cable segments are connected to router interfaces can help figure out the needed subnets Each cable segment indicates a required subnet 2. Decide how many bits you need to meet or exceed the number of required subnets Use the formula 2 n, with n representing the number of bits you must add to the starting subnet mask 3. Borrow bits from the top of the host portion of the address down 4. Ensure that you have enough host bits available to assign to computers on each subnet Use the formula 2 n -2, with n representing the number of host (0) bits in the subnet (after borrowing the bits from the host) IP Addressing26
27
Calculating a Subnet Mask Example With a Class C address 200.10.10.0 needing 12 subnets: The default subnet mask will be: 255.255.255.0 11111111.11111111.11111111.00000000 (binary equivalent) To meet or exceed 12 subnets: The nearest power of 2 is 16 (2 4 ) meaning 4 bits will be borrowed from the host portion of the original subnet mask to the network portion (making them 4 subnet bits) Borrowing 4 bits from the left of the host creates the following subnet mask: 11111111.11111111.11111111.11110000 255.255.255.240 (decimal equivalent) To calculate the number of host addresses for each subnet: Count the number of 0s remaining in the subnet mask to determine the number of bits left for the host address 11111111.11111111.11111111.11110000 (4 bits left for host) 2 4 – 2 = 14 (host addresses required for each subnet) IP Addressing27
28
Calculating a Subnet Mask Example… After calculating the appropriate subnet mask, determine the network numbers by: Placing the borrowed 4 bits in the network number and cycling the 4 bits through the possible combinations of values they represent (16 possible combinations as shown below, in this case) IP Addressing28
29
Calculating a Subnet Mask Example… After calculating the appropriate subnet mask, determine the host numbers in each subnet by: Cycling through the 4 host bits Therefore, the subnetwork address 200.10.10.32 would have host addresses from 200.10.10.33 through 210.10.10.47 However, you cannot use the IP address in which all host bits are 1s (because it is the broadcast address) So the actual range will be 210.10.10.33 through 210.10.10.46 (14 hosts) Subnet Host Addresses for 210.10.10.32 200.10.10.33 200.10.10.34 200.10.10.35 200.10.10.36 200.10.10.37 200.10.10.38 200.10.10.39 200.10.10.40 200.10.10.41 200.10.10.42 200.10.10.43 200.10.10.44 200.10.10.45 200.10.10.46 IP Addressing29
30
Calculating Supernets Supernetting “borrows” bits from network portion of an IP address to “lend” those bits to host portion Permits consecutive IP network addresses to be combined and viewed in a single logical network Combining two or more small networks into one larger network is only one reason to supernet Supernetting can combine multiple routing table entries into a single entry, which can drastically decrease the table’s size on Internet routers This reduction in routing table size increases the speed and efficiency of Internet routers IP Addressing30
31
Calculating Supernets Example Assuming a network design has the following four Class C network addresses available, 192.168.0.0, 192.168.1.0, 192.168.2.0, 192.168.3.0 on the proposed network without the necessary router interfaces to use the numbers: The default subnet mask will be: 255.255.255.0 11111111.11111111.11111111.00000000 (binary equivalent) You may combine the four networks into one by borrowing 2 bits (2 2 = 4) from the network portion of the address and adding them to the host portion. You will have a network address of 192.168.0.0 with a subnet mask of 255.255.252.0 11111111.11111111.11111100.00000000 255.255.252.0 (decimal equivalent) Instead of supporting only 8 bits for the host address portion, the supernet now supports 10 bits (8 + 2) for the host addresses This provides 1022 (2 10 – 2) host addresses on this supernet IP Addressing31
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.