Sie sind auf Seite 1von 17

Data Forwarding Scenario

HUAWEI TECHNOLOGIES CO., LTD.


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.

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

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


 Explain the process steps for data encapsulation and decapsulation.

 Troubleshoot basic data forwarding issues.

Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 3
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.

Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 4
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.

Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 5
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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 6
TCP Encapsulation

Host A
Segment

TCP Data (If Applicable) Transport

Network
Source Port Destination Port

Sequence Number
Data Link
Acknowledgement Number

Header N C E UA P RS 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.

Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 7
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

Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 8
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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 9
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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 10
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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 11
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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 12
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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 13
Packet Decapsulation

Server A

Data (If Applicable) IP

RTB 172.16.10.1/24 Header


08-07-06-05-04-AA Ver. Length DS Field. Total Length

Identification Flags Fragment Offset


G0/0/1
Server B Header
TTL Protocol: 0x06
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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 14
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 UAPR S F
Length Resv.S W C R C S S Y I Window
R E GK H T 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.


Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 15
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?

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

Das könnte Ihnen auch gefallen