ip addressing: ccna quick reference

9
Contents IPv4 Address Structure IPv6 Address Structure IP Address Classes Private IP Addressing (RFC 1918) Classless Subnet Masks Wildcard Masks Multicast IP Addresses Binary to Decimal Conversion Decimal to Binary Conversion Hexidecimal to Decimal Conversion IPv4 Packet Header IPv6 Packet Header DHCP Option Codes Subnetting Examples IPv4 Address Structure

Upload: shaun-hummel

Post on 09-Apr-2017

79 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: IP Addressing: CCNA Quick Reference

Contents

IPv4 Address Structure

IPv6 Address Structure

IP Address Classes

Private IP Addressing (RFC 1918)

Classless Subnet Masks

Wildcard Masks

Multicast IP Addresses

Binary to Decimal Conversion

Decimal to Binary Conversion

Hexidecimal to Decimal Conversion

IPv4 Packet Header

IPv6 Packet Header

DHCP Option Codes

Subnetting Examples

IPv4 Address Structure

Page 2: IP Addressing: CCNA Quick Reference

IPv6 Address Structure

IP Address Classes

Group IP Address Range Subnet Mask

Class A 1.0.0.0 - 127.255.255.255 255.0.0.0

Class B 128.0.0.0 - 191.255.255.255 255.255.0.0

Class C 192.0.0.0 - 223.255.255.255 255.255.255.0

Class D 224.0.0.0 - 239.255.255.255 Not Applicable

Class E 240.0.0.0 - 255.255.255.255 Not Applicable

Private IP Addressing (RFC 1918)

IP Address Range Subnet Mask CIDR

10.0.0.0 - 10.255.255.255 255.0.0.0 /8

172.16.0.0 - 172.31.255.255 255.240.0.0 /12

192.168.0.0 - 192.168.255.255 255.255.0.0 /16

Classless Subnet Masks

Class A Subnet Mask CIDR No. of Hosts No. of Subnets

255.0.0.0 /8 16777214 0 (default)

255.128.0.0 /9 8388606 2

255.192.0.0 /10 4194302 4

255.224.0.0 /11 2097150 8

255.240.0.0 /12 1048574 16

255.248.0.0 /13 524286 32

255.252.0.0 /14 262142 64

255.254.0.0 /15 131070 128

255.255.0.0 /16 65534 256

255.255.128.0 /17 32766 512

255.255.192.0 /18 16382 1024

255.255.224.0 /19 8190 2048

Page 3: IP Addressing: CCNA Quick Reference

255.255.240.0 /20 4094 4096

255.255.248.0 /21 2046 8192

255.255.252.0 /22 1022 16384

255.255.254.0 /23 510 32768

255.255.255.0 /24 254 65536

255.255.255.128 /25 126 131072

255.255.255.192 /26 62 262144

255.255.255.224 /27 30 524288

255.255.255.240 /28 14 1048576

255.255.255.248 /29 6 2097152

255.255.255.252 /30 2 4194304

255.255.255.252 /31 - -

255.255.255.255 /32 host address host address

Class B Subnet Mask CIDR No. of Hosts No. of Subnets

255.255.0.0 /16 65534 0 (default)

255.255.128.0 /17 32766 2

255.255.192.0 /18 16382 4

255.255.224.0 /19 8190 8

255.255.240.0 /20 4094 16

255.255.248.0 /21 2046 32

255.255.252.0 /22 1022 64

255.255.254.0 /23 510 128

255.255.255.0 /24 254 256

255.255.255.128 /25 126 512

255.255.255.192 /26 62 1024

255.255.255.224 /27 30 2048

255.255.255.240 /28 14 4096

255.255.255.248 /29 6 8192

255.255.255.252 /30 2 16384

255.255.255.252 /31 - -

255.255.255.255 /32 host address host address

Class C Subnet Mask CIDR No. of Hosts No. of Subnets

255.255.255.0 /24 254 0 (default)

255.255.255.128 /25 126 2

255.255.255.192 /26 62 4

Page 4: IP Addressing: CCNA Quick Reference

255.255.255.224 /27 30 8

255.255.255.240 /28 14 16

255.255.255.248 /29 6 32

255.255.255.252 /30 2 64

255.255.255.254 /31 - -

255.255.255.255 /32 host address host address

Wildcard Masks

Subnet Mask CIDR Wildcard Mask

255.0.0.0 /8 0.255.255.255

255.128.0.0 /9 0.127.255.255

255.192.0.0 /10 0.63.255.255

255.224.0.0 /11 0.31.255.255

255.240.0.0 /12 0.15.255.255

255.248.0.0 /13 0.7.255.255

255.252.0.0 /14 0.3.255.255

255.254.0.0 /15 0.1.255.255

255.255.0.0 /16 0.0.255.255

255.255.128.0 /17 0.0.127.255

255.255.192.0 /18 0.0.63.255

255.255.224.0 /19 0.0.31.255

255.255.240.0 /20 0.0.15.255

255.255.248.0 /21 0.0.7.255

255.255.252.0 /22 0.0.3.255

255.255.254.0 /23 0.0.1.255

255.255.255.0 /24 0.0.0.255

255.255.255.128 /25 0.0.0.127

255.255.255.192 /26 0.0.0.63

255.255.255.224 /27 0.0.0.31

255.255.255.240 /28 0.0.0.15

255.255.255.248 /29 0.0.0.7

255.255.255.252 /30 0.0.0.3

255.255.255.252 /31 0.0.0.1

255.255.255.255 /32 0.0.0.0

Page 5: IP Addressing: CCNA Quick Reference

Multicast IP Addressing

Reserved Address Assigned

224.0.0.2 All Routers on Subnet

224.0.0.5 OSPF Hello Packets

224.0.0.6 OSPF DR/BDR Hello Packets

224.0.0.9 RIPv2 Hello Packets

224.0.0.10 EIGRP Hello Packets

224.0.0.12 DHCP

224.0.0.13 All PIM Routers

224.0.0.18 VRRP Hello Packets

224.0.0.22 IGMP

224.0.1.41 H.323 Gatekeeper Discovery Address

224.0.0.102 HSRPv2 Hello Packets

224.0.0.251 Multicast DNS Query

224.0.0.254 Experimental

224.0.0.255 Unassigned

Conversions

The binary system is based on ones (1) and zeros (0)

There are 8 bits per octet, 4 octets per IPv4 address

The bit value is based on position

The bit set to 1 sets the value. The bit set to zero = 0

There are 8 bits with 2 (nth power) so 2 power of 8 = 255

Per octet: set all bits to 1 = 255, set all bits to 0 = 0

0 0 0 0 0 0 0 0 = 0

1 1 1 1 1 1 1 1 = 255

8 7 6 5 4 3 2 1 bit position

128 64 32 16 8 4 2 1 bit value

Example 1:

decimal 10 = from right to left, set 2nd bit to (1) and 4th bit to a (1) and everything else to a zero (0).

0 0 0 0 1 0 1 0 = 10

10.0.0.0 = 00001010 . 00000000 . 00000000 . 00000000

Example 2:

decimal 100 = from right to left, set 3rd bit (4), 6th bit (32) and 7th bit (64) to a (1) and everything else zero (0).

0 1 1 0 0 1 0 0 = 100 (4 + 32 + 64)

Page 6: IP Addressing: CCNA Quick Reference

Example 3:

Converting the following binary number to decimal (IPv4) equivalent requires adding bits for each octet that are

set to (1) value. The sum of each octet must add up to the decimal value for each octet.

00001010 . 01100100 . 00101000 . 10000000

(8+2) | (64+32+4) | (32+8) | 128 position

= 10.100.40.128

Example 4:

Converting the following decimal (IPv4) to binary equivalent requires setting the bits to (0) or (1) value. Write all zeros for each octet and change bit position to (1) so that sum is correct for each decimal value.

192. 168. 32. 7

11000000 . 10101000 . 00100000 . 00000111

(128+64) | (128+32+8) | (bit 6 = 32) | (1+2+4)

Example 5:

What is the binary conversion of hexidecimal FDA4?

IPv6 use hexidecimal format instead of the IPv4 octets. The IPv4 address is comprised of 4 octets that are 8

bits each (32 bit length). The IPv6 address is comprised of 32 hexidecimal values of 4 bits each. The length of

an IPv6 address is then 128 bits (4 bits x 32 hexidecimal values). Each hexidecimal number has 16 possible

values that range from 0 to F derived from the lower 4 bits of an octet. The same values from 0 -9 are used for

IPv4 and IPv6 binary to decimal conversion. The values 10 to 15 however are A to F.

binary 5 = 0 1 0 1

0 1 0 1 = 0 + 4 + 0 + 1 = 5

binary 13 = 1 1 0 1

1 1 0 1 = 8 + 4 + 0 + 1 = 13 (hexidecimal D)

A = 10 (1010)

B = 11 (1011)

C = 12 (1100)

D = 13 (1101)

E = 14 (1110)

F = 15 (1111)

Converting FDA4 to binary:

FDA4 = 1111 1101 1010 0100

F D A 4

Page 7: IP Addressing: CCNA Quick Reference

IPv4 Header

IP H

ea

de

r =

20

by

tes

Version

4-bits

Header Length

4-bits

DSCP

8 bits

Total Length

16 bits

Identification

16 bits

Flag

3 bits

Fragment Offset

13 bits

Time to Live (TTL)

8 bits

Protocol

8 bits

Header Checksum

16 bit

32-bit Source IP Address

32-bit Destination IP Address

Options if Header Length > 5

Payload (Data)

ECN

2 bits

IPv6 Header

IPv

6 H

ea

de

r =

32

0 b

yte

sVersion

4-bitsTraffic Class

8 bits

Flow Label

20 bits

Payload Length

16 bits

Next Header

8 bits

Hop Limit

8 bits

128-bit Source IP

Address

128-bit Destination IP

Address

Payload (Data)

Page 8: IP Addressing: CCNA Quick Reference

DHCP Option Codes

Option Description

3 Default gateway sent to DHCP clients

4 time server

6 DNS server IP address

12 Send hostname part of FQDN to client

15 Domain name part of FQDN to client

42 NTP Server

43 MS DHCP server IP address for WLAN controller discovery

60 Vendor Class Identifier (VCI)

66 TFTP Server

82 DHCP relay agent

150 TFTP server for IP Phone configuration file

Subnetting Examples The following questions are based on the Class C IP address 192.168.0.0/24 that is available for assignment. Refer to the Classless Subnet Masks table for selecting the correct number of subnets and hosts required. Note as well the context of host addresses refers to any network interface for desktop, servers and network devices. 1. What is the optimized subnet mask for WAN point-to-point (PTP) connectivity ? Answer: There are two host addresses required for connecting a PTP WAN link. Each router interface is assigned an IP address and subnet mask. Refer to Classless Subnet Masks (Table) and Class C address section where two hosts are available with /30 subnet mask (serial mask). In addition there are 64 subnets allowing for 64 separate PTP links with two host addresses per link. Subnet-1:

Network Address = 192.168.1.0/30

Router-1 Address = 192.168.1.1/30

Router-2 Address = 192.168.1.2/30

Broadcast Address = 192.168.1.3/30

2. What subnet mask would provide IP addressing for twelve branch offices with a maximum of ten host addresses required per office ? Answer: Refer to Classless Subnet Masks (Table) and Class C address section where fourteen hosts are available with /28 subnet mask. In addition there are 16 subnets available that can be assigned. Each branch office would require at least one unique subnet. There are only twelve branches so the additional four subnets are unused and available for future assignment. Subnet 1 = 192.168.1.0/28, hosts = (1-14)

Subnet 2 = 192.168.1.16, hosts = (17-30)

Subnet 3 = 192.168.1.32, hosts = (33-46)

Subnet 4 = 192.168.1.48, hosts = (49-62)

Subnet 5 = 192.168.1.64, hosts = (65-78)

Subnet 6 = 192.168.1.80, hosts = (81-94)

Page 9: IP Addressing: CCNA Quick Reference

Subnet 7 = 192.168.1.96, hosts = (97-110)

Subnet 8 = 192.168.1.112, hosts = (113-126)

Subnet 9 = 192.168.1.128, hosts = (129-142)

Subnet 10 = 192.168.1.144, hosts = (145-158)

Subnet 11 = 192.168.1.160, hosts = (161-174)

Subnet 12 = 192.168.1.176, hosts = (177-190)

Subnet 13 = 192.168.1.192, hosts = (193-206)

Subnet 14 = 192.168.1.208, hosts = (209-222)

Subnet 15 = 192.168.1.224, hosts = (225-238)

Subnet 16 = 192.168.1.240, hosts = (241-254)

3. What subnet mask would provide at least 65 host addresses for a large branch office? Answer: Refer to Classless Subnet Masks (Table) and Class C address section where 126 hosts are available with /25 subnet mask. In addition there are 2 subnets available that can be assigned to the branch office. The /26 subnet mask provides only a maximum of 62 hosts. For example there are two subnets with IP address 192.168.1.0/25 including 192.168.1.0 and 192.168.128 and 126 hosts per subnet. Network Address = 192.168.1.0

Hosts = 192.168.1.1 - 192.168.1.126

Broadcast Address = 192.168.1.0-127

Network Address = 192.168.1.128

Hosts = 192.168.1.129 - 192.168.1.254

Broadcast Address = 192.168.1.255

Available at Amazon.com

CCNA Routing and Switching 200-125 Copyright 2017 CiscoNet Solutions All Rights Reserved