1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

58
1 ITC242 – Introduction to Data Communications TCP/IP and OSI
  • date post

    18-Dec-2015
  • Category

    Documents

  • view

    228
  • download

    1

Transcript of 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

Page 1: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

1

ITC242 – Introduction to Data Communications

TCP/IP and OSI

Page 2: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

2

“Study algorithm for this unit”• Make up the background knowledge for this unit.• The subsequent chapter is related logically to the previous chapters.------- This means that you must

make up them if you miss one or more.• You cannot fully understand the contents being covered by only attending the class !• The content I am lecturing in the classes is harder than that of the text• Different learning outcomes, depending on the degree for which you are studying• The exam is relatively easier than…..

Before coming to my classes(1) Read the corresponding chapter(s) to be covered(2) Read my PowerPoint slides published on the course website (3) Write down the questions you haveIf you have not done the above, then ……

During my classesConcentrate on listening and thinking rather than talking !Concentrate on understanding rather than writing ! ( make notes)

After my classes

Read the text and the slides again !If you still have questions, then go to my officeIf you still have questions, then read the reference book(s)If you still have questions, then consider withdrawing from this unit

Page 3: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

3

Last Week

Topic 3 – Distributed Data Processing• Describe the differences between centralised

and distributed data processing• Describe different types of distributed data

processing for applications and distributed databases

• Describe the implications for data comms of distributed data processing

• Understand the motivation towards client server architectures

Page 4: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

4

Last Week

Topic 4 – The Internet

• Discuss the history of the Internet and explain it’s explosive growth

• Describe the overall Internet architecture including key components

• Explain the components and operation of the Domain Name System

Page 5: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

5

Topic 5 – TCP/IP and OSI

Learning objectives

• Describe the definition of a protocol;

• Discuss the need and benefits of using protocol architectures;

• Describe the TCP/IP protocol architecture

• Describe the OSI reference model.

Page 6: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

6

What’s a protocol?human protocols:• “what’s the time?”• “I have a question”• introductions

… specific msgs sent

… specific actions taken when msgs received, or other events

network protocols:• machines rather than

humans• all communication activity

in Internet governed by protocols

protocols define format, order of msgs sent and received among network entities, and actions taken on msg transmission, receipt

Page 7: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

7

What’s a protocol?a human protocol and a computer network protocol:

Hi

Hi

Got thetime?

2:00

TCP connection request

TCP connectionresponseGet http://www.awl.com/kurose-ross

<file>time

Page 8: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

8

Protocol Architecture – Modular Approach

• Breaks complex tasks into subtasks

• Each module handles specific subset of tasks

• Communication occurs– between different modules on the same

system– between similar modules on different systems

Page 9: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

9

Advantages of Modularity

• Easier application development

• Network can change without all programs being modified

Page 10: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

10

Organization of air travel

• a series of steps

ticket (purchase)

baggage (check)

gates (load)

runway takeoff

airplane routing

ticket (complain)

baggage (claim)

gates (unload)

runway landing

airplane routing

airplane routing

Page 11: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

11

ticket (purchase)

baggage (check)

gates (load)

runway (takeoff)

airplane routing

departureairport

arrivalairport

intermediate air-trafficcontrol centers

airplane routing airplane routing

ticket (complain)

baggage (claim

gates (unload)

runway (land)

airplane routing

ticket

baggage

gate

takeoff/landing

airplane routing

Layering of airline functionality

Layers: each layer implements a service– via its own internal-layer actions– relying on services provided by layer below

Page 12: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

12

Three-Layer Model

• Distributed data communications involves three primary components:– Networks– Computers– Applications

• Three corresponding layers– Network access layer– Transport layer– Application layer

Page 13: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

13

Network Access Layer

• Concerned with exchange of data between computer and network

• Includes addressing, routing, prioritizing, etc

• Different networks require different software at this layer

• Example: X.25 standard for network access procedures on packet-switching networks

Page 14: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

14

Transport Layer

• Concerned with reliable transfer of information between applications

• Independent of the nature of the application

• Includes aspects like flow control and error checking

Page 15: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

15

Application Layer

• Logic needed to support various applications

• Each type of application (file transfer, remote access) requires different software on this layer

Page 16: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

16

Addressing

• Each computer on a network requires a unique address on that network

• Each application requires a unique address within the computer to allow support for multiple applications (service access points, or SAP)

Page 17: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

17

Data Transmission

• Application layer creates data block• Transport layer appends header to create PDU

(protocol data unit)– Destination SAP, Sequence #, Error-Detection Code

• Network layer appends another header– Destination computer, facilities (e.g. “priority”)

Page 18: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

18

Simplified Architecture

Page 19: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

19

Protocol Architecture Operation

Page 20: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

20

Standardised Protocol Architectures

• Vendors like standards because they make their products more marketable

• Customers like standards because they enable products from different vendors to interoperate

• Two protocol standards are well-known:– TCP/IP: widely implemented– OSI: less used, but widely known and still useful for

modeling/conceptualizing

Page 21: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

21

TCP/IP

• Transmission Control Protocol/Internet Protocol

• Developed by DARPA• No official protocol

model

• Identified by 5 Layers– Application– Host-to-Host

(transport)– Internet (Network)– Network Access (link)– Physical

Page 22: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

22

sourceapplicatio

ntransportnetwork

linkphysical

HtHn M

segment Ht

datagram

destination

application

transportnetwork

linkphysical

HtHnHl M

HtHn M

Ht M

M

networklink

physical

linkphysical

HtHnHl M

HtHn M

HtHn M

HtHnHl M

router

switch

Encapsulationmessage M

Ht M

Hn

frame

Page 23: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

23

TCP/IP Physical Layer

• Physical interface between a DTE (e.g. computer or terminal) and a transmission medium

• Specifies:– Characteristics of medium– Nature of signals– Data rate

Page 24: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

24

TCP/IP Network Access (link)

• Exchange of data between systems on a shared network

• Utilizes address of host and destination• Can also prioritize transmission• Software at this layer depends on network

(e.g. X.25 vs. Ethernet)

Page 25: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

25

TCP/IP Internet Layer

• An Internet is an interconnection of two or more networks

• Internet layer handles tasks similar to network access layer, but between networks rather than between nodes on a network

• Uses IP for addressing and routing across networks

• Implemented in workstations and routers

Page 26: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

26

TCP/IP Transport Layer

• Also called host-to-host layer

• Reliable exchange of data between applications

• Uses TCP protocols for transmission

Page 27: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

27

TCP/IP Application Layer

• Logic needed to support variety of applications

• Separate module supports each type of application (e.g. file transfer)

Page 28: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

28

TCP & UDP

• Most TCP/IP applications use TCP for transport layer

• TCP provides a connection (logical association) between two entities to regulate flow check errors

• UDP (User Datagram Protocol) does not maintain a connection, and therefore does not guarantee delivery, preserve sequences, or protect against duplication

Page 29: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

29

TCP service

• Reliable, in-order byte-stream data transfer– loss: acknowledgements and retransmissions

• Flow control: – sender won’t overwhelm receiver

• Congestion control: – senders “slow down sending rate” when

network congested

Page 30: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

30

UDP

Goal: data transfer between end systems– same as TCP

• UDP - User Datagram Protocol : – connectionless – unreliable data

transfer– no flow control– no congestion control

App’s using TCP: • HTTP (Web), FTP

(file transfer), Telnet (remote login), SMTP (email)

App’s using UDP:• streaming media,

teleconferencing, DNS, Internet telephony

Page 31: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

31

IP and IPv6

• IP provides for 32-bit source and destination addresses

• IPv6 (1996 standard) provides for 128-bit addresses

• Migration to IPv6 will be a very slow process

Page 32: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

32

TCP/IP Applications

• SMTP (Simple Mail Transfer Protocol)– Basic e-mail facility, transferring messages among

hosts

• FTP (File Transfer Protocol)– Sends files from one system to another on user

command

• Telnet– Remote login capability, allowing a user to emulate a

terminal on the remote system

Page 33: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

33

Internetworking

• Interconnected networks, usually implies TCP/IP

• Can appear to users as a single large network

• The global Internet is the largest example, but intranets and extranets are also examples

Page 34: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

34

Origins of the OSI reference model

• The early development of LANs, MANs, and WANs was chaotic in many ways. The early 1980s saw tremendous increases in the number and sizes of networks.

• As companies realized that they could save money and gain productivity by using networking technology, they added networks and expanded existing networks as rapidly as new network technologies and products were introduced.

• By the middle of the 1980s, companies began to experience difficulties from all the expansions they had made. It became more difficult for networks using different specifications and implementations to communicate with each other.

To address the problem of networks being incompatible and unable to communicate with each other, the International Organization for Standardization (ISO) researched different network schemes.

As a result of this research, the ISO created a model that would help vendors create networks that would be compatible with, and operate with, other networks.

• the OSI reference model describes how data travels from application programs (for example, spreadsheets), through a network medium, to an application program located in another computer, even if the sender and receiver are connected using different network media.

Page 35: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

35

OSI

• Open Systems Interconnection

• Developed by ISO

• Contains seven layers

Page 36: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

36

OSI Lower Layers

• Physical

• Data Link

• Network

Page 37: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

37

OSI Physical Layer

• Responsible for transmission of bits--binary transmission • Always implemented through hardware• This layer outlines the functional, procedural, electrical,

and mechanical specifications for controlling physical links. The specifications relate to the activation, maintenance, and deactivation of physical links. It also controls the transmitting of data onto physical media.

• e.g. RS-232

• A “hub” operates at this layer

Page 38: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

38

OSI Data Link Layer• The data-link layer arranges bits from the physical layer into logical

chunks of data, known as frames. A frame is a contiguous series of data with a common function. Framing enables the network to organize bits into a logical data format and send them to the correct computer.

• This layer controls how data is formatted and how transmission on the network is controlled

• Responsible for error-free, reliable transmission of data• Flow control, error correction• Controls access to the medium

• e.g. HDLC, ethernet

• A “switch” operates at this layer

Page 39: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

39

OSI Network Layer

• Responsible for routing of messages through network• ensures data delivery by providing connectivity and path

selection between two host systems. • selects the most appropriate path for sending data, and

routes data packets • Concerned with type of switching used (circuit v. packet)• Handles routing between networks, as well as through

packet-switching networks• provides logical LAN-to-LAN communications by

supporting the routing of data between different networks • IP protocol and IP addressing at this layer

• A “router” operates at this layer

Page 40: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

40

OSI Upper Layers

• Transport

• Session

• Presentation

• Application

Page 41: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

41

OSI Transport Layer

• Aids point-to-point communications • Isolates messages from lower and upper layers• Provides reliability in the transportation of data between

hosts and ensures complete data transfer. The transport layer uses error detection and recovery information flow control to establish, maintain, and terminate all virtual circuits.

• Breaks down message size• Monitors quality of communications channel• Selects most efficient communication service necessary

for a given transmission

• TCP/UDP operate at this layer

Page 42: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

42

OSI Session Layer

• Establishes logical connections between hosts:connection establishment, data transfer, and connection release

• Manages log-ons, password exchange, log-offs

• Terminates connection at end of session

Page 43: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

43

OSI Presentation Layer

• manages data representation • transforms data into a mutually agreed format

that each application can understand • Provides format and code conversion services• Examples

– File conversion from ASCII to EBDIC(Extended Binary-Coded Decimal Interchange Code )

– Encryption and compression– Invoking character sequences to generate bold,

italics, etc on a printer

Page 44: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

44

OSI Application Layer

• Provides access to network for end-user

• User’s capabilities are determined by what items are available on this layer

Page 45: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

45

Layering: The OSI Model

Session

Network

Link

PhysicalPhysicalPhysical

Application

Presentation

Transport

Network

Link Link

Network

Transport

Session

Presentation

Application

Network

Link

Physical

Peer-layer communication

layer-to-layer communication

Router Router

1

2

3

4

5

6

7

1

2

3

4

5

6

7

Page 46: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

46

Network

Link

Transport

Application

Presentation

Session

Transport

Network

Link

Physical

The 7-layer OSI Model The 4-layer Internet model

ApplicationFTP

ASCII/Binary

IP

TCP

Ethernet

TCP/IP - OSI Comparison

Page 47: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

47

Example: FTP over the Internet Using TCP/IP and Ethernet

App

OS

R2R2 R3R3

R4R4

R1R1 R5R5

Ethernet

“A” Stanford “B” (MIT)

Ethernet

App

OS

1

234

67

20

191817

5

910

81213

11 1516

14

Page 48: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

48

In the sending host1. Application-Programming Interface (API)

– Application requests TCP connection with “B”

2. Transmission Control Protocol (TCP)– Creates TCP “Connection setup” packet– TCP requests IP packet to be sent to “B”

TCPData

TCPHeader

TCP Packet

Type = Connection Setup

Empty

Page 49: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

49

In the sending host (2)

3. Internet Protocol (IP)– Creates IP packet with correct addresses.– IP requests packet to be sent to router.

IPData

TCP Packet

Encapsulation

IPHeader

IP Packet

Destination Address: IP “B”Source Address: IP “A”Protocol = TCP

TCPData

TCPHeader

Page 50: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

50

In the sending host (3)4. Link (“MAC” or Ethernet) Protocol

– Creates MAC frame with Frame Check Sequence (FCS). – Wait for Access to the line.– MAC requests PHY to send each bit of the frame.

EthernetData

IP Packet

EthernetFCS

EthernetHeader

Ethernet Packet

Destination Address: MAC “R1”Source Address: MAC “A”Protocol = IP

IPData

IPHeader

Encapsulation

Page 51: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

51

In Router R15. Link (“MAC” or Ethernet) Protocol

– Accept MAC frame, check address and Frame Check Sequence (FCS).

– Pass data to IP Protocol.

EthernetData

IP Packet

EthernetFCS

EthernetHeader

Ethernet Packet

Destination Address: MAC “R1”Source Address: MAC “A”Protocol = IP

IPData

IPHeader

Decapsulation

Page 52: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

52

In Router R16. Internet Protocol (IP)

– Use IP destination address to decide where to send packet next (“next-hop routing”).

– Request Link Protocol to transmit packet.

IPData

IPHeader

IP Packet

Destination Address: IP “B”Source Address: IP “A”Protocol = TCP

Page 53: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

53

In Router R17. Link (“MAC” or Ethernet) Protocol

– Creates MAC frame with Frame Check Sequence (FCS). – Wait for Access to the line.– MAC requests PHY to send each bit of the frame.

EthernetData

IP Packet

EthernetFCS

EthernetHeader

Ethernet Packet

Destination Address: MAC “R2”Source Address: MAC “R1”Protocol = IP

IPData

IPHeader

Encapsulation

Page 54: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

54

In Router R516. Link (“MAC” or Ethernet) Protocol

– Creates MAC frame with Frame Check Sequence (FCS). – Wait for Access to the line.– MAC requests PHY to send each bit of the frame.

EthernetData

IP Packet

EthernetFCS

EthernetHeader

Ethernet Packet

Destination Address: MAC “B”Source Address: MAC “R5”Protocol = IP

IPData

IPHeader

Encapsulation

Page 55: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

55

In the receiving host17. Link (“MAC” or Ethernet) Protocol

– Accept MAC frame, check address and Frame Check Sequence (FCS).

– Pass data to IP Protocol.

EthernetData

IP Packet

EthernetFCS

EthernetHeader

Ethernet Packet

Destination Address: MAC “B”Source Address: MAC “R5”Protocol = IP

IPData

IPHeader

Decapsulation

Page 56: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

56

In the receiving host (2)18. Internet Protocol (IP)

– Verify IP address.– Extract/decapsulate TCP packet from IP packet.– Pass TCP packet to TCP Protocol.

IPData

TCP Packet

Decapsulation

IPHeader

IP Packet

Destination Address: IP “B”Source Address: IP “A”Protocol = TCP

TCPData

TCPHeader

Page 57: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

57

In the receiving host (3)

19. Transmission Control Protocol (TCP)– Accepts TCP “Connection setup” packet– Establishes connection by sending “Ack”.

20. Application-Programming Interface (API)– Application receives request for TCP

connection with “A”.

TCPData

TCPHeader

TCP Packet

Type = Connection Setup

Empty

Page 58: 1 ITC242 – Introduction to Data Communications TCP/IP and OSI.

58

Topic 5 Summary

• Looked at what a protocol is

• Discuss the need for and benefits of using protocol architectures;

• Describe the TCP/IP protocol architecture

• Describe the OSI reference model.