You are on page 1of 27

IP Addressing

HUAWEI TECHNOLOGIES CO., LTD.


Foreword

The Internet Protocol (IP) is designed to provide a means for internetwork


communication that is not supported by lower layer protocols such as
Ethernet. The implementation of logical (IP) addressing enables the
Internet Protocol to be employed by other protocols for the forwarding of
data in the form of packets between networks. A strong knowledge of IP
addressing must be attained for effective network design along with clear
familiarity of the protocol behavior, to support a clear understanding of the
implementation of IP as a routed protocol.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 2
Objectives

Upon completion of this section, trainees will be able to:


 Describe the fields and characteristics contained within IP.
 Distinguish between public, private and special IP address ranges.
 Successfully implement VLSM addressing.
 Explain the function of an IP gateway.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 3
Next Header Processing

6 Bytes 6 Bytes 2 Bytes 46-1500 Bytes 4 Bytes

DMAC SMAC Type Data FCS

IP 0x0800

 The next set of instructions for processing are referenced in the


type field of the frame header.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 4
IP Packet Header

20-60 Bytes

IP Data

0 16 31
Header DS Field Total Length
Version
Length

Identification Flags Fragment Offset


Fixed
Message Time to Live Protocol Header Checksum 20
Header Bytes
Source IP Address

Destination IP Address

IP Options

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 5
IP Fragmentation

Host A Host B
L3

L2 L2

Header DS Field Total Length


Version
Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source IP Address

Destination IP Address

IP Options

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 6
Time To Live

Host A Host B

TTL=255 TTL=254 TTL=253

Header DS Field Total Length


Version
Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source IP Address

Destination IP Address

IP Options

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 7
Protocol Field

IP Data

0x06/0x11 TCP/UDP

0x01 ICMP

Header DS Field Total Length


Version
Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source IP Address

Destination IP Address

IP Options

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 8
IP Addressing

Network Host

192.168.1 .1

11000000.10101000.00000001 .00000001

 The IP address identifies networks, and network hosts.


 Binary is the base numbering system used for IP addressing
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 9
IP Addressing

Network Address

192.168.1 .0

11000000.10101000.00000001 .00000000

Broadcast Address

192.168.1 .255

11000000.10101000.00000001 11111111

 The upper and lower most host address values are reserved.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 10
Decimal, Binary and Hexadecimal

Format Value Range Base Value

Binary 0—1 2

Decimal 0—9 10

Hexadecimal 0—F 16

 Binary and Hexadecimal are common numbering systems used


within IP networks.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 11
Binary vs. Decimal Conversion

Bit Order 1 1 1 1 1 1 1 1
Binary
Power 27 26 25 24 23 22 21 20

Binary 128 64 32 16 8 4 2 1

Decimal Binary Hexadecimal Decimal Binary Hexadecimal

0 00000000 00 9 00001001 09

1 00000001 01 10 00001010 0A

2 00000010 02 11 00001011 0B

3 00000011 03 12 00001100 0C

4 00000100 04 13 00001101 0D

5 00000101 05 14 00001110 0E

6 00000110 06 15 00001111 0F
… … …
7 00000111 07
255 11111111 FF
8 00001000 08

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 12
Binary Conversion

Network Host

Binary 11000000 10101000 00000001 00000001

27+26 27+25+23 20 20

Decimal 192 168 1 1

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 13
IP Address Classes

1.0.0.0~126.255.255.255

Class A 0 Network(8bit) Host (24bit)


Host (24bit)

128.1.0.0~191.254.255.255

Class B 10 Network (16bit) Host (16bit)

192.0.1.0~223.255.254.255

Class C
110 Network (24bit) Host (8bit)

224.0.0.0~239.255.255.255

Class D 1110 Multicast

240.0.0.0~255.255.255.254

Class E 1111 Experimental

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 14
IP Address Types

Private Address Ranges


Class A 10.0.0.0~10.255.255.255
Class B 172.16.0.0~172.31.255.255
Class C 192.168.0.0~192.168.255.255

Special Addresses
Diagnostic 127.0.0.0 ~ 127.255.255.255
Any Network 0.0.0.0
Network Broadcast 255.255.255.255

 The IP network address range has been divided, and certain


addresses and ranges assigned special functions in the
network.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 15
IP Communication

Host A Host B

192.168.1.1 192.168.2.1

192.168.1.2 192.168.2.2

Host C Host D

Network Host
192 168 1 0

192 168 2 0

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 16
Subnet Mask

Network Host
192.168.1 0

11000000.10101000.000000001 00000000

Subnet
255.255.255 0

11111111.11111111.11111111 00000000

 Subnet masks distinguish between the binary values that


represent each (sub)network and those that represent each
host.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 17
Default Subnet Mask

Class A 255 0 0 0

Class B 255 255 0 0

Class C 255 255 255 0

 Certain subnet masks are applied to address ranges by default


to denote the fixed range that is used for each network class.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 18
Address Planning

IP Address 192 168 1 7

Subnet Mask 255 255 255 0

11000000 10101000 00000001 00000111


11111111 11111111 11111111 00000000

Network Address
(Binary) 11000000 10101000 00000001 00000000

Network Address 192 168 1 0


Host Addresses: 2n 256
Valid Hosts: 2n - 2 254

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 19
Case Scenario

IP Address 172 16 1 7

Subnet Mask 255 255 0 0

Network Address ? ? ? ?

Host Addresses: 2n ?

Valid Hosts: 2n - 2 ?

 Determine the network for the given IP address, and the number
of actual, and valid host addresses in the network.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 20
Addressing Limitations

192.168.2.0/24

192.168.1.0/24 20 Hosts

30 Hosts 192.168.3.0/24
10 Hosts

 Network design using the default subnet mask results in


address wastage
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 21
VLSM Calculation

IP Address 192 168 1 7

Subnet Mask 255 255 255 128

11000000 10101000 00000001 00000111


11111111 11111111 11111111 10000000

11000000 10101000 00000001 00000000

Network Address 192 168 1 0


Host Addresses: 2n 128
Valid Hosts: 2n - 2 126

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 22
VLSM Case Scenario

20 Hosts

30 Hosts
10 Hosts

 Using only the network 192.168.1.0/24, implement VLSM for the


given number of hosts in each network segment.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 23
Classless Inter-Domain Routing

10.24.0.0/24

10.24.1.0/24
Announce route
10.24.0.0/22

10.24.2.0/24

10.24.3.0/24

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 24
IP Gateways

Host A L3 Host B
L2 L2

192.168.1.1 192.168.1.253 192.168.2.253 192.168.2.1

Host A Host B

L3 L3

192.168.1.1 L2 192.168.2.1

 Gateways use IP to forward packets between networks


 Hosts may act as gateways between networks in a LAN
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 25
Summary

 What is the IP subnet mask used for?


 What is the purpose of the TTL field in the IP header?
 How are gateways used in an IP network?

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 26
Thank you
www.huawei.com

You might also like