Sunteți pe pagina 1din 44

Internet Protocol

Rev 1.0

HUAWEI TECHNOLOGIES CO., LTD.

www.huawei.com

All rights reserved

Objectives
IP Address and subnet planning
IP Forwarding
InterVLAN Routing

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 2

IP Forwarding (Routing)

N4

N2.H1

N1.H1

N1.H2
N3.H1

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 3

IP Header Format
0

Version

15

31

Message Service type


length

Flag

Identification
Time to live

Total length

Protocol

Frag offset

Message header checksum

Source IP address
Destination IP address
IP options

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 4

Type of Service

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 5

IP Addressing

32 Bits

Network
8 Bits

Host
8 Bits

8 Bits

10000000 00000001 11111111

128 .

HUAWEI TECHNOLOGIES CO., LTD.

1.

All rights reserved

255 .

Page 6

8 Bits

11111110

254

Classification of IP Addresses
Network(8bit)

Host(24bit)

1.0.0.0~
0
126.255.255.255

Class A
Host(16bit)

Network(16bit)
128.0.0.0~
191.255.255.255 1 0

Class B
Network(24bit)

Host(8bit)

192.0.0.0~
1 0
223.255.255.255 1
224.0.0.0~
1 1 10
239.255.255.255

240.0.0.0~
255.255.255.255 1 1 1 1 0

HUAWEI TECHNOLOGIES CO., LTD.

Class C

Multicast address

Reserved

All rights reserved

Page 7

Class D

Class E

Address Mask
Distinguish network portion and host portion

First series of ones following by series of zeros


32-bit string, can be represented in dotted-decimal format

as IP address or just count of ones (mask length):


Mask for class A: 255.0.0.0 or /8 or :
11111111 00000000 00000000 00000000

Mask for class B: 255.255.0.0 or /16:


11111111 11111111 00000000 00000000

Mask for class C: 255.255.255.0 or /24 or:


11111111 11111111 11111111 00000000

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 8

IP address and mask


192

168

17

11000000 10101000 00000001 00010001

&
255

255

&
255

11111111 11111111 11111111 00000000

=
192

168

=
1

HUAWEI TECHNOLOGIES CO., LTD.

11000000 10101000 00000001 00000000

All rights reserved

Page 9

IP address and mask


192

168

17

11000000 10101000 00000001 00010001

&
255

255

&
255

248

11111111 11111111 11111111 11110000

=
192

168

=
1

16

HUAWEI TECHNOLOGIES CO., LTD.

11000000 10101000 00000001 00010000

All rights reserved

Page 10

Subnets and Subnet Masks


192

168

17

11000000

10101000

00000001

00010001

11111111

11111111

11111111

11110000

Network Part

Subnet Part Host Part


(n bits)
(m bits)

IP Subnet: 192.168.1.16 255.255.255.248 or 192.168.1.16/28


Subnet numbers: 2n ( n=4, 24=16)
Host numbers: 2m-2 ( m=4, 24 2 = 14)
For 192.168.1.17/28:

network address 192.168.1.16


broadcast address 192.168.1.31
HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 11

Subnet Planning

192.168.1.0/25 (128 addresses)

192.168.1.0/24
(256 addresses)

192.168.1.128/27 (32)
192.168.1.160/27 (32)
192.168.1.128/25 (128)
192.168.1.192/26 (64)

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 12

Special IP Addresses
Network part

Host part

Address
type

Any

Completely 0

Network
address

Any

Completely 1

Broadcast
address

All the nodes of a Specially


designated network
segment

127

Any

Loopback
address

Loop test

Completely0

Completely1

HUAWEI TECHNOLOGIES CO., LTD.

Use
Representing a network
Segment

Huawei Quidway router


used
All networks
Designate default routes

Broadcast
address

All rights reserved

All nodes of
Local network segment

Page 13

IP Address For Private Network


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 14

Variable Length Subnet Mask (VLSM)


Classless Interdomain Routing (CIDR)
192.168.1.32/27

192.168.1.64/27

ISP
Announce

192.168.1.96/27

192.168.1.0/24

192.168.1.128/27

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 15

Objectives
IP Address and subnet planning
IP Forwarding
InterVLAN Routing

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 16

IP Forwarding Process
10.1.1.0/24
.2

129.6.1.0/24

.1
E0/0
MAC2

MAC1

.1
E0/1
MAC3

.2
E1/0
MAC4

Router A

GW:10.1.1.1

10.2.2.0/24
.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2
MAC1

MAC2

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 17

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2
MAC1

MAC2

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 18

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 19

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 20

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2
MAC3

MAC4

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 21

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2
MAC3

MAC4

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 22

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 23

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 24

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.2 10.2.2.2
MAC5

MAC6

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 25

E1/1

IP Forwarding Process
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

.2
MAC6

Router B

GW:10.2.2.1
Data
10.1.1.2 10.2.2.2
MAC5

MAC6

Dest./Mask

NextHop

Interface

Dest./Mask

NextHop Interface

10.1.1.0/24

10.1.1.1

E0/0

10.1.1.0/24

129.6.1.1 E1/0

10.2.2.0/24

129.6.1.2

E0/1

10.2.2.0/24

10.2.2.1

129.6.1.0/24

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 26

E1/1

IP Forwarding
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.1 10.2.2.1

Dest./Mask

NextHop

Interface

10.1.1.0/24

10.1.1.1

E0/0

Dest./Mask

NextHop Interface

10.2.2.0/24

129.6.1.2

E0/1

10.1.1.0/24

129.6.1.1 E1/0

129.6.1.0/24

129.6.1.1

E0/1

10.2.2.0/24

10.2.2.1

0.0.0.0/0

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 27

E1/1

Mask matching

Dest./Mask

&

10.1.1.0/24

10.2.2.0/24

129.6.1.0/24

00001010 00000010 00000010 00000001


11111111 11111111 11111111 00000000

/24

00001010 0000010 00000010 00000000

00001010 0000001 00000001 00000000

0.0.0.0/0

HUAWEI TECHNOLOGIES CO., LTD.

10.2.2.1

All rights reserved

10.1.1.0

Mask matching

Dest./Mask

&

10.1.1.0/24

10.2.2.0/24

129.6.1.0/24

00001010 00000010 00000010 00000001


11111111 11111111 11111111 00000000

/24

00001010 0000010 00000010 00000000

00001010 0000010 00000010 00000000

0.0.0.0/0

HUAWEI TECHNOLOGIES CO., LTD.

10.2.2.1

All rights reserved

10.2.2.0

Mask matching

Dest./Mask

&

10.1.1.0/24

10.2.2.0/24

129.6.1.0/24

00001010 00000010 00000010 00000001


11111111 11111111 11111111 00000000

/24

00001010 0000010 00000010 00000000

10000001 0000110 00000001 00000000

0.0.0.0/0

HUAWEI TECHNOLOGIES CO., LTD.

10.2.2.1

All rights reserved

129.6.1.0

Mask matching

Dest./Mask

&

10.1.1.0/24

10.2.2.0/24

129.6.1.0/24

00001010 00000010 00000010 00000001


00000000 00000000 00000000 00000000

/0

00000000 0000000 00000000 00000000

00000000 0000000 00000000 00000000

0.0.0.0/0

HUAWEI TECHNOLOGIES CO., LTD.

10.2.2.1

All rights reserved

0.0.0.0

Mask matching

Dest./Mask
10.1.1.0/24

10.2.2.0/24
129.6.1.0/24
0.0.0.0/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

IP Forwarding
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.1 10.2.2.1

Dest./Mask

NextHop

Interface

10.1.1.0/24

10.1.1.1

E0/0

Dest./Mask

NextHop Interface

10.2.2.0/24

129.6.1.2

E0/1

10.1.1.0/24

129.6.1.1 E1/0

129.6.1.0/24

129.6.1.1

E0/1

10.2.2.0/24

10.2.2.1

0.0.0.0/0

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 33

E1/1

IP Forwarding
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.1 10.2.2.1

Dest./Mask

NextHop

Interface

10.1.1.0/24

10.1.1.1

E0/0

Dest./Mask

NextHop Interface

10.2.2.0/24

129.6.1.2

E0/1

10.1.1.0/24

129.6.1.1 E1/0

129.6.1.0/24

129.6.1.1

E0/1

10.2.2.0/24

10.2.2.1

0.0.0.0/0

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 34

E1/1

IP Forwarding
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1

Data
10.1.1.1 10.2.2.1

Dest./Mask

NextHop

Interface

10.1.1.0/24

10.1.1.1

E0/0

Dest./Mask

NextHop Interface

10.2.2.0/24

129.6.1.2

E0/1

10.1.1.0/24

129.6.1.1 E1/0

129.6.1.0/24

129.6.1.1

E0/1

10.2.2.0/24

10.2.2.1

0.0.0.0/0

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 35

E1/1

IP Forwarding
10.1.1.0/24
.2
MAC1
GW:10.1.1.1

129.6.1.0/24

.1
E0/0
MAC2

.1
E0/1
MAC3

10.2.2.0/24

.2
E1/0
MAC4

Router A

.1
E1/1
MAC5

Router B

.2
MAC6
GW:10.2.2.1
Data

10.1.1.1 10.2.2.1

Dest./Mask

NextHop

Interface

10.1.1.0/24

10.1.1.1

E0/0

Dest./Mask

NextHop Interface

10.2.2.0/24

129.6.1.2

E0/1

10.1.1.0/24

129.6.1.1 E1/0

129.6.1.0/24

129.6.1.1

E0/1

10.2.2.0/24

10.2.2.1

0.0.0.0/0

129.6.1.1

E0/1

129.6.1.0/24 129.6.1.2 E1/0

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 36

E1/1

IP Forwarding Process

Router

Router

IP

IP

ETH PPP
E1/0 S2/0

LAN 1

HUAWEI TECHNOLOGIES CO., LTD.

encapsulation

decapsulation

Routing
(selecting path)

PPP ETH

S2/1 E0/1

WAN

All rights reserved

LAN 2

Page 37

Objectives
IP Address and subnet planning
IP Forwarding
InterVLAN Routing

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 38

Layer 2 Switching NetworkBroadcast

Broadcast domain

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Insulating layer 2 broadcast domain

VLAN 100

VLAN 200

VLAN has insulated the layer 2 broadcast domain, thus

strictly insulating any flow between any two VLANs

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Inter-VLAN Communication

VLAN 100

VLAN 200

VLAN 300

Flow between different VLANs cannot directly pass

VLAN boundaries, we should use routers to forward the


packets from one VLAN to another VLAN
HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Route Selection in Inter-VLAN Communication


VLAN 300

3.3.3.30/24
Ping 2.2.2.20

VLAN 100

VLAN 200
Ethernet 3

Non-local user or gateway


Send it to default gateway

1.1.1.10/24
Ethernet 1

Ethernet 1 belongs to network 1.1.1.0/24


Ethernet 2 belongs to network 2.2.2.0/24
Ethernet 3 belongs to network 3.3.3.0/24
HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

2.2.2.20/24
Ethernet 2

Integration of Switching and Routing


VLAN 100

VLAN 200

VLAN 300
VLAN 100

VLAN 200

VLAN 300

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Thank you
www.huawei.com

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