Sie sind auf Seite 1von 17

Data Forwarding Scenario

Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.


Foreword
 The TCP/IP protocol suite operates as a collection of rules in order to
support the end-to-end forwarding of data, together with lower layer
protocols such as those defined in the IEEE 802 standards. The knowledge
of the lifecycle of data forwarding enables a deeper understanding of the
IP network behavior for effective analysis of network operation and
troubleshooting of networking faults. The entire encapsulation and
decapsulation process therefore represents a fundamental part of all
TCP/IP knowledge.

Page 1 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
 Upon completion of this section, you will be able to:
 Explain the process steps for data encapsulation and decapsulation.

 Troubleshoot basic data forwarding issues.

Page 2 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Scenario Introduction

Host A Server A

RTA RTB

10.1.1.1/24 Internet 172.16.10.1/24

Host B Server B

10.1.1.2/24 172.16.10.2/24

 Data forwarding may be local or remote, however the general forwarding


process is the same.

Page 3 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Path Discovery

Network/Mask Gateway Interface


0.0.0.0/0 10.1.1.254 10.1.1.1
10.1.1.0/24 - 10.1.1.1
Host A Server A

RTA RTB
10.1.1.1/24 G0/0/0 Internet 172.16.10.1/24

10.1.1.254/24
Host B Server B

10.1.1.2/24 172.16.10.2/24

 Host A must have knowledge of a path to the destination.


Page 4 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
ARP
Host A Host A> arp -a
Internet address Physical address Type
10.1.1.254 00-01-02-03-04-08 Dynamic
10.1.1.2 00-01-02-03-04-06 Dynamic

10.1.1.1/24 RTA
00-01-02-03-04-05
G0/0/0
Host B
10.1.1.254/24 Internet
00-01-02-03-04-08

10.1.1.2/24
00-01-02-03-04-06

 The ARP cache table is used to discover the data link next-hop.

 An unknown next-hop will generate an ARP request.


Page 5 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
TCP Encapsulation
Host A
Segment

TCP Data (If Applicable)


Transport

Network
Source Port Destination Port

Sequence Number
Data Link
Acknowledgement Number

Header NC E UA P R S F
Resv. S W C R C S S Y I Window
Length R E GK H T N N Physical
Checksum Urgent Pointer

Options Padding

 Encapsulation is performed once path is confirmed.


Page 6 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
IP Encapsulation
Host A
Packet (Datagram)

IP TCP Data (If Applicable) Transport

Network
Version Header DS Field Total Length
Length

Identification Flags Fragment Offset Data Link

Time to Live Protocol Header Checksum


Physical
Source IP Address

Destination IP Address

IP Options

Page 7 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Ethernet Framing
Host A
Frame

Transport

Ethernet IP TCP Data FCS


Network

D.MAC S.MAC Type Data Link

D.MAC S.MAC Length LLC SNAP Physical

 Frame type is dependant on the encapsulated protocols.

 IP is the upper layer protocol, so the Ethernet II frame is used.


Page 8 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Frame Forwarding

Host A

D.MAC(48bits) SFD(8 bits) Preamble(56 bits)

1…0100 11010101 010101010101010101…

 Data link layer uses carrier sense to detect for existing traffic.

 Preamble and SFD used to synchronize with forwarded frame.


Page 9 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Frame Processing

Host A
Error Check

FCS Data Ethernet II SFD Preamble

RTA

DESTINATION MAC
G0/0/0
Host B 00-01-02-03-04-08
TYPE
0x0800

 Frame will be received by all in the same collision domain.

 Only the gateway (RTA) will process the frame.


Page 10 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Packet Processing

Ver HL DS Total Length


Identification Flag Offset
TTL Protocol Checksum
Source IP: 10.1.1.1
Dest IP: 172.16.10.1 Destination/Mask Interface
IP Options 172.16.10.0/24 G0/0/1
RTA
Data IP

10.1.1.254/24 G0/0/0 G0/0/1

FCS Data Ethernet II SFD Preamble

 Destination IP is checked against the address of the gateway.

 A new frame header is constructed following discovery process.


Page 11 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Frame Decapsulation
Server A

RTB
172.16.10.1/24
08-07-06-05-04-AA

G0/0/1 Server B

FCS Data Ethernet II SFD Preamble

172.16.10.2/24
08-07-06-05-04-BB
D.MAC S.MAC Type(0x0800)

 Frame is forwarded with destination MAC address of Server A.

 Server A compares interface MAC to frame destination MAC.


Page 12 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Packet Decapsulation
Server A

Data (If Applicable) IP

RTB 172.16.10.1/24
Header
08-07-06-05-04-AA Ver. DS Field. Total Length
Length

Identification Flags Fragment Offset


G0/0/1
Server B
TTL Protocol: 0x06 Header Checksum

Source IP: 10.1.1.1


Destination IP: 172.16.10.1

172.16.10.2/24 IP Options
08-07-06-05-04-BB

 Server A compares own IP to destination address of IP header.

 IP header is processed and discarded, data is directed to TCP.


Page 13 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Segment Decapsulation
Server A

Data (If APL) TCP

RTB 172.16.10.1/24
02-03-04-05-06-AA Source Port: 1027 Destination Port: 80

Sequence Number
G0/0/1
Server B Acknowledgement Number

Header NC E U A P R S F
Length Resv. S WC R CS S Y I Window
R E GK HT N N
Checksum Urgent Pointer
172.16.10.2/24
02-03-04-05-06-BB Options Padding

 TCP header builds connection with the service at port 80.

 Parameters within the TCP header used to manage connection.


Page 14 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Summary
 What information is required before data can be encapsulated?

 What happens when a frame is forwarded to a destination to which it is not


intended?

 How does the data in the frame ultimately reach the application it is intended for?

 When multiple sessions of the same application are active (e.g. multiple web
browsers), how does the return data reach the correct session?

Page 15 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com

Das könnte Ihnen auch gefallen