Sunteți pe pagina 1din 37

IP Addressing and

Routing
www.huawei.com

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Network layer locates the third layer of


TCP/IP protocol stack, between the
data link layer and transport layer.
Network layer defines some protocols to
ensure the right forwarding of data
packet.

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 2

Upon completion of this course, you will be


able to :
Master the classes of IP address
Subnet address planning in reason
Understand ARP/RARP protocol
principle
Know the working principle of router

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 3

Chapter 1 IP Address
Chapter 2 Protocols of Network Layer
Chapter 3 Working Principle of Router

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 4

Data Encapsulation and De-encapsulation

upper layer
data
TCP header upper layer
data
IP header

upper layer
data

LLC header upper layer FCS


data
MAC header upper layer FCS
data
0101110101001000010

Application
layer

Application
layer

upper layer data


upper layer data

Transport
layer

segment

Transport
layer

Network
layer

packet

Network
layer

Data link
layer

frame

Data link
layer

TCP+ upper layer data


IP+TCP+ upper layer data
LLC header +IP+TCP+ upper layer data

Physical
layer

HUAWEI TECHNOLOGIES CO., LTD..

bit

Physical
layer

All rights reserved

0101110101001000010

Page 5

Data Encapsulation on Network Layer


TCP Header Upper layer
data
IP Header

IP Header

source
address
171.17.1.1

HUAWEI TECHNOLOGIES CO., LTD..

Upper layer
data

destination
address

Transport layer

Network layer

data

IP address

All rights reserved

Page 6

IP Address

IP address identifies a network device uniquely, it is made up


of 32 binary digit.

IP address is shown as dotted decimal format.

IP address is divided into two parts:


Network address portion
Host address portion
IP address

Network address

HUAWEI TECHNOLOGIES CO., LTD..

Host address

All rights reserved

Page 7

Classification of IP Address
Class A

1.0.0.0~126.255.255.255
0 Network(7bit)

Class B

Host(24bit)

128.0.0.0~191.255.255.255
1 0 Network(14bit)

Class C

Host(16bit)

192.0.0.0~223.255.255.255
1 1 0

Network(21bit)

Class D

224.0.0.0~239.255.255.255
1 1 1 0
Multicast address

Class E

240.0.0.0~255.255.255.255
1 1 1 1 0
reserve

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Host(8bit)

Page 8

Special IP Address
Network part

Host part

Address type

Any

all 0

Network
Address

Any

all 1

Broadcast
Address

127

Any

all 0

Usage
Representing a network
Segment
All the nodes of a Specially
designated network segment

Loopback
Address
All Networks

Loop test
As the designate default routes
in Huawei Quidway router

all 1

HUAWEI TECHNOLOGIES CO., LTD..

Broadcast
Address

All nodes of
Local network segment

All rights reserved

Page 9

Private IP Address

Private IP address
10.0.0.0~10.255.255.255
172.16.0.0~172.31.255.255
192.168.0.0~192.168.255.255

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 10

Subnet Mask Introduction

Distinguish between network part and host part by subnet mask

The subnet mask format is same as the IP address format

All of the network part and subnet part of subnet mask are 1, and all of

the host part are 0

For example Class Bs subnet


mask is 255.255.0.0

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 11

Network Address and Subnet Mask

IP Address

192.168.1

Subnet Mask

255.255.255

Network Address:

192.168.1

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

100

Page 12

System Conversion

8bit
Binary system

27

26

25

24

23

22

21

20

128

64

32

16

Decimal Summation is 255

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 13

Example of System Conversion


Example :

1*128

1*64

1*32

0*16

1*8

0*4

0*2

1*1

128

64

32

233

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 14

System Conversion of IP Address

IP address192.168.1.11(decimal)

byte8bits

byte8bits

byte8bits

byte8bits

2726252423222120 2726252423222120 2726252423222120 2726252423222120

11000000

10101000

00000001

00001011

192

168

11

binary digit11000000.10101000.00000001.00001011

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 15

Addressing without Subnet


Addressing without Subnet means using nature mask, no subdivision of

network segment. Class B segment 172.16.0.0 with mask 255.255.0.0

172.16.30.1/16

172.16.28.1/16

Et her net

172.16.30.10/16

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 16

Addressing with Subnets

Class B segment 172.16.0.0


172.16.4.1/24

Ethernet

Ethernet

172.16.8.1/24

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 17

Subnet Mask Representation


192 .

IP Address

168 .

11000000 10101000 00000001 00000111

Subnet mask

11111111

Bits of subnet mask

Subnet mask representation

HUAWEI TECHNOLOGIES CO., LTD..

255 . 255

. 255

11111111

11111111

. 240

11110000

8 + 8 + 8+ 4 = 28

192 . 168 . 1 . 7 / 28

All rights reserved

Page 18

Calculation of Network address


IP Address is: 192.168.1.7/28
192

IP Address

168

11000000 10101000 00000001 00000111

255

Subnet Mask

11111111

255

11111111

255 .

11111111

240

11110000

Network Address
11000000 10101000 00000001 00000000
(Binary)

Network Address

HUAWEI TECHNOLOGIES CO., LTD..

192.168.1.0/28

All rights reserved

Page 19

Calculation of Host Number


Subnet Mask

Network Portion

Host Portion

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

0 0 0 0 0 0 00 0 0 0 0 0 00

N bit

Host Number 2n
Valid Host Number : 2n - 2

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 20

Example of Host Number Calculation


IP Address192.168.1.100/28
/28=255.255.255.240

The binary representation of subnet mask:


11111111111111111111111111110000

28bits
network portion
The total number of host: 24

4bits
Host portion

The valid number of host: 24 -2

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 21

Example of Subnet Address Planning


examplea company gets class C address 201.222.5.0. if it needs

20 subnet and 5 host in each subnet. How to plan the IP address?

Subnet address

Usable host address

201.222.5.8/29

201.222.5.9~201.222.5.14

201.222.5.16/29

201.222.5.17~201.222.5.22

201.222.5.232/29

201.222.5.233~201.222.5.238

201.222.5.240/29

201.222.5.241~201.222.5.246

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 22

Example of Planning Class B

Subnet address
Host address

172.16.2.0
172.16.2.1172.16.2.254

Broadcast address

172.16.2.255

IP host address

172.16.2.120

Subnet mask

255.255.255.0

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 23

Example of Planning Class C


Subnet address

192.168.5.120

Host address

192.168.5.121-192.168.5.126

Broadcast address

192.168.5.127

IP host address

192.168.5.121

Subnet mask

255.255.255.248

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 24

Classless Inter-Domain Routing (VLSM)


192.168.1.32/27
192.168.1.160/30
192.168.1.64/27

ISP

announce
192.168.1.0

192.168.1.164/30

192.168.1.96/27
192.168.1.168/30

192.168.1.128/27
192.168.1.172/30

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 25

Classless Inter-Domain Routing (CIDR)


CIDR reduces scale of routing table and enhances network

extensibility.

198.168.1.0

Internet

Announce route
198.168.0.0/16

198.168.2.0

ISP
198.168.3.0

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 26

Chapter 1 IP Address
Chapter 2 Protocols of Network Layer

Chapter 3 Working Principle of Router

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 27

ARP

ARP--Address Resolution Protocol

MAC address of 10.0.0.2


: 00-E0-FD-00-00-12

HostA

IP:10.0.0.1/24
MAC:00-E0-FD-00-00-11

HostB
ARP Reply

IP:10.0.0.2/24
MAC:00-E0-FD-00-00-12

Need MAC
address of
10.0.0.2?

ARP Request?
broadcast
unicast

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 28

Proxy ARP

If ARP request is sent


from one host in the
network to another host
in another network, thus
the router which
connects this two
network can reply this
request, this procedure
is called Proxy ARP.

HUAWEI TECHNOLOGIES CO., LTD..

Network A
ARP Reply

Network B

ARP Request

All rights reserved

Page 29

Gratuitous ARP
Create error
information
HostA

MAC address of 10.0.0.1


: 00-E0-FD-00-00-12

HostB

ARP Reply
IP:10.0.0.1/24
MAC:00-E0-FD-00-00-11

IP:10.0.0.1/24
MAC:00-E0-FD-00-00-12

need MAC
address of
10.0.0.1

ARP Request?
broadcast
unicast

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 30

RARP
RARP--Reverse Address Resolution Protocol

Your IP
address is
10.0.0.1
Diskless
workstation

RARP Reply

RARP Server

Whats my IP
address?
RARP Request?

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 31

Chapter 1 IP Address

Chapter 2 Protocols of Network Layer


Chapter 3 Working Principle of Router

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 32

The Function of Router


Router runs in the layer 3the core function is interconnection of

the networks

Group data forwarding


Route : establish, refresh, lookup routing table
Rate adapt between the subnetwork

Network isolationto prevent network stormappoint


accessing rule (firewall)
Interconnection of the heterogeneous networks

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 33

The Working Process of Router


Router
Network layer

Router
Routing protocol
conversion

Data link layer

De-encapsulation

Physical layer

LAN1

Network layer
Data link layer

Protocol
encapsulation

Physical layer

LAN2

WAN
sending

receiving
transmission

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 34

Routing Table

Router keeps a routing table at any time, sending and forwarding of all

messages

Router maintain a routing table all the time, all the message are sent
from corresponding interface via lookup routing table.

Routing table can be static configuration, it also can be generated by

dynamic routing protocols.

Routing table includes the following contents:


Destination address
Network mask

Outgoing interface
Next hop
HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 35

Summary

The classification of IP address.

The function of ARP/RARP


protocol.

The work principle of router.

HUAWEI TECHNOLOGIES CO., LTD..

All rights reserved

Page 36

Thank You
www.huawei.com
T

S-ar putea să vă placă și