Network Architecture Models: Layered Communications School of Business Eastern Illinois University...

31
Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation and De-encapsulation

Transcript of Network Architecture Models: Layered Communications School of Business Eastern Illinois University...

Page 1: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

Network Architecture Models: Layered Communications

School of BusinessEastern Illinois University

© Abdou Illia, Fall 2015

(September 14, 2015 )

Encapsulation and De-encapsulation

Page 2: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

2Learning objective

Understand the principles of layered communications

Page 3: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

3Hybrid TCP/IP-OSI Model

Layers Sample protocols for Web access

Application HTTP

Transport TCP

Internet IP

Data Link Ethernet, PPP

Physical Ethernet, Modem standards, Telephone standards

Page 4: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

4Layered Communications

Application programs on different computers cannot communicate directly– There is no direct connection between them!– They need to use an indirect communication system

BrowserBrowser

TransTrans

IntInt

DLDL

PhyPhy

User PC

Web AppWeb App

TransTrans

IntInt

DLDL

PhyPhy

Webserver

HTTP RequestHTTP Request

Page 5: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

5Layer Cooperation on the User PC

Application layer passes HTTP-request to Transport layer

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

HTTP RequestHTTP Request

PhysicalUser PC

Page 6: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

6Layer Cooperation on the User PC

Transport layer creates a TCP segment– HTTP request is put in the data field– A TCP header is added

So, Transport layer “encapsulates” HTTP request within a TCP segment

HTTP RequestHTTP Request TCP-HTCP-H

TCP Segment

DataField

TCPHeader

Page 7: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

7Encapsulation

Encapsulation is:– Embedding a received message in the data field of a

new message

Example: TCP encapsulates HTTP request in the data field of a new massage called TCP Segment

HTTP RequestHTTP Request TCP-HTCP-H

TCP Segment

DataField

TCPHeader

Page 8: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

8Layer Cooperation on the User PC

Transport layer passes the TCP segment down to the Internet layer

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

TCP segmentTCP segment

PhysicalUser PC

Page 9: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

9Layer Cooperation on the User PC

Internet Layer encapsulates TCP Segment within an IP packet– An IP packet to deliver a TCP segment has a TCP

segment in its data field

TCP segmentTCP segment IP-HIP-H

IP Packet

DataField

IPHeader

Page 10: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

10Layer Cooperation on the User PC

The Internet layer passes the IP packet to the Data Link layer– Internet layer messages are called packets

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

IP packetIP packet

PhysicalUser PC

Page 11: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

11Layer Cooperation on the User PC

Data Link Layer encapsulates IP Packet within a PPP Frame– Data Link layer messages are called frames– PPP frame has IP packet in data field– PPP frame has a PPP Trailer and a PPP Header

PPP Frame Encapsulating an IP Packet

PPP-TPPP-T IP packetIP packet PPP-HPPP-H

Page 12: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

12Layer Cooperation on the User PC

The Data Link layer passes the PPP frame to the Physical layer, which delivers it to the Physical layer on the first router, one bit at a time (no message at the Physical layer)

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

Physical (10110 …)User PC

PPP framePPP frameTo firstrouter

Page 13: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

13

PPP-TPPP-T

Layer Cooperation on the User PC

Recap: Adding Headers and Trailers:

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

HTTP req.HTTP req.

PhysicalUser PC

HTTP req.HTTP req. TCP-HTCP-H

HTTP req.HTTP req. TCP-HTCP-H IP-HIP-H

HTTP req.HTTP req. TCP-HTCP-H IP-HIP-H PPP-HPPP-H

Page 14: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

14TCP segment Source Port # and Destination Port #:

– Contain reference # of application programs at both ends– Used (together with IP address) to identify the application program

Sequence Number:– Indicates position of this segment within sequence of segments– Used to perform error recovery (e.g. loss of continuity)

TCP message has a Flags Field (three of which widely used)– SYN bit set to 1 to request a connection– ACK bit set to 1 to acknowledge a received TCP segment– FIN bit set to 1 to inform of a connection closure

Source Port # (16) Destination Port # (16)

Sequence Number (32 bits)

Acknowledgement Number (32 bits)

Hdr Len(4) Flags (6) Window Size (16)

Options (if any) PAD

Bit 0 Bit 31

Reserved (6)

TCP Checksum (16) Urgent Pointer (16)

Data Field

TCP Header

Page 15: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

15TCP SegmentTransmission Control Protocol. Src Port http (80). Dst Port 1958). Seq: 3043958669. Ack: 937013559. Len:0

Source port: http (80)

Destination port: 1958 (1958)

Sequence number: 3043958669

Acknowledgment number: 937013559

header length: 24 bytes

Ө Flags_0xx0012 (SYN, ACK)

0………. = Congestion window reduced (CWR): not set

..0…….. = ECN-Echo: not set

…0……..= Urgent: Not set

….1…….= Acknowledgment: Set

……0…..= Push: Not set

…….0….= Reset: Not set

……..1…= Syn: Set

………0..= Fin: Not set

Window size: 5840

Checksum: 0x206a (correct)

Ө Options: (4 bytes

Maximum segment size: 1460 byte

Page 16: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

16UDP Segment

Source Port Destination Port

Data

Dean (2004:161)

Length Checksum

Data

0 16 31

Page 17: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

17IP Packet

VersionDifferentiated

services

Identification

Time to liveHeaderlength

ReservedRST

ACK

PSH

URG

SYN

FIN

Sliding-window size

Options Padding

Data

IHL Total length

Flags Fragment offset

Protocol Header checksum

Source IP address

Destination IP address

Contains:– IP version used– Source IP address – Destination IP address, etc.

Page 18: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

18Layer Cooperation on the Webserver

Situation reverse to Situation on User PC (De-encapsulation)

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

PhysicalUser PC Webserver

Page 19: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

19Layer Cooperation on the Webserver

Data Link layer processes the DL-Frame’s header and trailer to deencapsulate the IP packet

Data Link layer passes the IP packet to the Internet layer

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

IP-PacketIP-Packet

DL-Frame containing IP packet in data fieldDL-Frame containing IP packet in data field

PhysicalFinal Router Webserver

Page 20: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

20Layer Cooperation on the Webserver

Successively pass up layer messages– Other layers pass successive data fields (containing next-lower layer messages) up to the next-

higher layer

ApplicationApplication

TransportTransport

InternetInternet

Data LinkData Link

PhysicalFinal Router Webserver

PPP-TPPP-T

HTTP req.HTTP req.

HTTP req.HTTP req. TCP-HTCP-H

HTTP req.HTTP req. TCP-HTCP-H IP-HIP-H

HTTP req.HTTP req. TCP-HTCP-H IP-HIP-H PPP-HPPP-H

IP Packet

TCPsegment

HTTP request

Page 21: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

21Hybrid TCP/IP and Windows Layering

Hybrid TCP/IP-OSI Layering

Microsoft Windows Layering

Application Clients and Services

Transport Protocols

(TCP/IP, IPX/SPX, NetBEUI, etc.)Internet

Data Link Adapters

(Dial-up adapters, Network Interface Card, etc.)Physical

Page 22: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

22Windows Architecture implementation

Figure 2.14: Network Dialog Box in Windows 98

Properties Button

Network Dialog box in Windows

Page 23: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

23Summary Questions

1. (a) What is layered communication? (b) Why is it necessary ? (c) What is encapsulation? (d) What happens as soon as a layer on the source computer creates a message?

2. At which layer IP addresses of the sending and the receiving computers are added to the message?

3. At which layer MAC addresses of the sending and the receiving computers could added to the message?

4. At which layer a Trailer is usually added.

5. Compare Hybrid TCP/IP layering and Windows layering.

Page 24: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

24Summary Questions (cont.) Given the TCP/IP communications diagram illustrated below,

label each layer with its appropriate nameDear John,Today we made good progress on the text. I think it will be a great success.

Dave

Dear John,Today we made

good progress onthe text. I

think it will be agreat success

Dave

Destination address10.0.0.2 Destination address10.0.0.2 Destination address10.0.0.2 Destination address10.0.0.2

Source address10.0.0.1 Source address10.0.0.1 Source address10.0.0.1 Source address10.0.0.1

Dave

think it will be agreat success good progress onthe text. I Dear John,Today we made

Dest. MAC addr.00A0CC5F745D

Source MAC addr.00A0CC5F745D

Destination address10.0.0.2

Source address10.0.0.1

Dave

Dest. MAC addr.00A0CC5F745D

Source MAC addr.00A0CC5F745D

Destination address10.0.0.2

Source address10.0.0.1

think it will be agreat success

Dest. MAC addr.00A0CC5F745D

Source MAC addr.00A0CC5F745D

Destination address10.0.0.2

Source address10.0.0.1

Dest. MAC addr.00A0CC5F745D

Source MAC addr.00A0CC5F745D

Destination address10.0.0.2

Source address10.0.0.1

good progress onthe text. I Dear John,Today we made

…100011101000011001110011

Page 25: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

Additional slides

Page 26: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

26The First Router

First router receives an IP packet (encapsulated in a frame) in one port (interface)

Must make a router forwarding decision: select the port to use to send it back out

B?

D?

C?

Router A

B

C

DPacket

Page 27: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

27Layer Cooperation on the First Router

So far, we have only looked at User PC & Webserver– But deencapsulation and encapsulation also occur on EACH

router

Frame arrives at a port on the first router– Port’s Data Link layer receives the PPP frame containing an

IP packet

Data LinkData Link Data LinkData Link

InternetInternet

PPP FramePPP Frame

First Router

Page 28: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

28Layer Cooperation on the First Router

Incoming Data Link on the Router– Deencapsulates the IP packet from the PPP frame– Passes the IP packet to the router’ Internet layer

Data LinkData Link Data LinkData Link

InternetInternetIP PacketIP Packet

First Router

Incoming Port on First Router

Page 29: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

29Layer Cooperation on the First Router

Routers only have Physical, Data Link, and Internet layer – So Internet layer is the highest layer on a router for

router forwarding– Internet layer decides where to send the packet next:

another router or the destination Webserver

Data LinkData Link Data LinkData Link

InternetInternet

First Router

Page 30: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

30Layer Cooperation on the First Router

Internet layer passes IP packet to Data Link layer on the selected output port that will carry the IP packet to the next router or the destination Webserver

Data LinkData Link Data LinkData Link

InternetInternet

First Router

IP Packet

Selected Output Port on First Router

Page 31: Network Architecture Models: Layered Communications School of Business Eastern Illinois University © Abdou Illia, Fall 2015 (September 14, 2015 ) Encapsulation.

31Layer Cooperation on the First Router

The Data Link and Physical layer on the selected port sends the frame encapsulating the IP packet onto the next router (or destination Webserver)

InternetInternet

Data LinkData Link

InternetInternet

Data LinkData LinkFrame

Selected Output PortOn First Router

Input PortOn Next Router

(or Destination Webserver)

PhysicalLayer