networks and protocols ce00997-3 week 1b. osi 7 layer model vs tcp/ip

45
Networks and Protocols CE00997-3 Week 1b

Upload: reynard-lewis

Post on 14-Jan-2016

229 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Networks and Protocols CE00997-3

Week 1b

Page 2: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

OSI 7 layer model Vs TCP/IP

Page 3: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

OSI 7 layer model Vs TCP/IP

Page 4: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Introduction – Data and Signals

Page 5: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Analog versus Digital

•Analog - continuous waveform

•Examples: (naturally occurring) music and voice

Page 6: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Analog versus Digital

•Harder to separate noise from an analog signal than from a digital signal

Page 7: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Analog versus Digital•Digital - discrete or non-continuous waveform

•Examples: computer 1s and 0s

Page 8: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Analog versus Digital

•Despite noise in this digital signal•You can still discern a high voltage from a low voltage

Page 9: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Analog versus Digital•If there is too much noise

• You cannot discern a high voltage from a low voltage

Page 10: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

OSI Vs TCP/IP

Application

Internet

Transport

NetworkAccess

Protocols

Networks

TCP/IP model

ApplicationPresentation

Session

Network

Transport

Data Link

Physical

Application

Layers

Data FlowLayers

OSI 7 layer model

Page 11: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

ISO basic model

AP

Application-orientedfunctions

Network-dependantfunctions

AP

Real systems environment

OSI environment

Network Environment

Data Network

Computer A Computer B

Page 12: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

ISO 7 layer modelAP

Real systems environment

OSI environment

Network Environment

Data Network

ApplicationPresentationSession

NetworkLinkPhysical

Transport

AP

App. (7)Pres. (6)Sess. (5)

Net. (3)Link. (2)Phys. (3)

Trans. (4)

Comp A Comp B

Page 13: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Application

Physical

Network

Data link

Session

Presentation

Transport

APDU

TPDU

SPDU

Packet

Bit

Frame

PPDU

Host B

Name of UnitExchanged

Application

Physical

Network

Data link

Session

Presentation

Transport

Host A

7

6

5

4

3

2

1

Layer

Interface

Interface

Application protocol

Presentation protocol

Session protocol

Transport protocolCommunication subnet boundary

Internal subnet protocol

Network Network

Data link Data link

Physical Physical

Router Router

Network layer host-router protocolData link layer host-router protocolPhysical layer host-router protocol

Page 14: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Encapsulation

Page 15: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Protocol layer overview

Transfer syntax negotiation, data representation transformations

Presentation (6)

Data Communication Network

End user application process

Distributed information services

File transfer, access & management, Document & message interchange,job transfer & manipulation

Syntax-independent message interchange service

Application (7)

Physical connection to network termination equipment

Mech. & elec. Network interface definitionsPhysical (1)

End-to-end message transfer (connection management, error control, fragmentation, flow control)

Transport (4)

Data link control (framing, data transparency, error control)

Link (2)

Dialog & synchronisation control for application entities

Network-independent message interchange service

Session (5)

Network routing, addressing, call set-up and clearingNetwork (3)

Page 16: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

7 Layer model summary

ApplicationPresentation

Session

Network

Transport

Data Link

Physical

FTP, TFTP, HTTP, SMTP, DNS, TELNET, SNMP

TCP (the internet)

IP (the internet)

Ethernet (common LAN technology)

Page 17: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

The Open Systems Interconnection (OSI) model

•Application layer - where the application using the network resides

•Common network applications include remote login, file transfer, e-mail, and web page browsing

•Presentation layer - performs series of miscellaneous functions necessary for presenting the data package properly to the sender or receiver

Page 18: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

The Open Systems Interconnection (OSI) model

•Session layer - responsible for establishing sessions between users

•Transport layer - provides end-to-end error-free network connection

•Makes sure data arrives at destination exactly as it left the source

•Network layer - responsible for creating, maintaining and ending network connections

•Transfers a data packet from node to node within the network

Page 19: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

The Open Systems Interconnection (OSI) model

•Data link layer - responsible for taking data and transforming it into a frame with header, control and address information, as well as error detection code

•Physical layer - handles the transmission of bits over a communications channel

• Includes voltage levels, connectors, media choice, modulation techniques

Page 20: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

The Open Systems Interconnection (OSI) model

Page 21: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

7 Layer protocol

Page 22: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

7 layer operation

Page 23: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

What is TCP/IP?

• Industry standard suite of Protocols• Routable enterprise networking protocol• Technology for connecting dissimilar systems• Robust, scaleable, cross-platform client/server

framework• Method for gaining access to the internet

Page 24: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP Transmission Control Protocol

• Service– Guarantees end to end delivery of packets, re-sends

anything not received– Controls the flow of data from host to host and host into

the network– Multiplexing, the TCP header has a port number which is

used to determine which application should receive the packet

– Connection-orientated, reliable– Divides outgoing messages into segments, reassembles at

destination

Page 25: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

IP network• The IP protocol is not dependent on any

particular hardware and is ideally suited to integrate LANs and WANs into 1 network

Ethernet

E the rne t

Token-ring

IP R ou te r

Large IP packettransmitted on Token-R ingLAN

Router fragments packetand forwards on Ethernetsegment

IP R ou te r

Fram e-relay

IP R ou te r

Router forwards IP packetsonto frame-re lay

Router forwardsIP packetsonto Ethernet

F inal destinationre-assembles IPpacket fragments

Page 26: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

IP (Internet Protocol)• Service

– responsible for moving packets from source to destination across the network

– fragmentation and re-assembly of packets across small packet sub-nets

• IP is a Datagram protocol, it does not– guarantee delivery– guarantee sequence of delivery– control flow of packets into network

Page 27: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

MAC Addressing

• Without a name computers cannot be accessed• At the data link layer, a header, and possibly a trailer,

is added to upper layer data.• Header and trailer contain control information

intended for the data link layer entity in the destination system.

• Data from upper layer entities is encapsulated in the data link layer header and trailer.

Page 28: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

MAC Address

OrganisationalUnique

IdentifierOUI

Vendor assigned(NIC Cards,Interfaces)

24 bits

6 hex digits

00 60 2F

Cisco

24 bits

6 hex digits

3A 07 BC

Particular device

Page 29: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Flat structure• MAC addresses provide a way for computers to identify

themselves.• They give hosts a permanent, unique name.• The number of possible addresses is extremely large 1612

(over 2 trillion!) possible MAC addresses.• One major disadvantage, they have no structure, and are

considered flat address spaces.• Different vendors have different OUIs, but they're like

personal identification numbers.• As your network grows to more than a few computers,

this disadvantage becomes a real problem.

Page 30: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Deterministic MAC

Page 31: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Non-Deterministic MAC

Page 32: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP/IP development

1965 1970 1980 1985

APANETcommissioned

by DOD1969

1975

Telnet1972

FTP1973

TCP1974

IP1981

TCP/IPProtocol Suite1982

DNS1984

Page 33: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP/IP Utilities

LPQLPQ

FTPFTP TFTPTFTP RCPRCP TelnetTelnet

RSHRSH REXECREXEC LPRLPR

NBTSTATNBTSTAT ROUTEROUTE TRACERTTRACERT ARPARP FingerFinger

PINGPING IPCONFIGIPCONFIG NSLOOKUPNSLOOKUP HOSTNAMEHOSTNAME NETSTATNETSTAT

LPDLPD

Page 34: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Protocol Graph

TCP UDP

IP

HTTP

FTP SMTP DNS DNS TFTP

Internet

Your LAN

Many LANsand WANs

Page 35: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP/IP protocol suite

TransportTCPTCP UDPUDP

LAN Technologies:Ethernet, Token Ring,

FDDI

LAN Technologies:Ethernet, Token Ring,

FDDI

WAN Technologies:Serial Lines, Frame Relay,

ATM

WAN Technologies:Serial Lines, Frame Relay,

ATM

Network

ApplicationWindows® SocketsApplications

Windows® SocketsApplications

NetBIOSApplications

NetBIOSApplications

NetBIOSNetBIOS over TCP/IP

Sockets TDI

IPIPICMP

ARP

InternetIGMP

Page 36: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP Segment Format

S ource P ort D es tina tion P ort

S equence num ber

A cknow ldgm en t num berTCP

headerlength

reservedURG

ACK

PSH

FIN

SYN

RST

W indow S ize

C hecksum U rgen t P o in te r

O p tions

D a ta

Page 37: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

Protocols & port numbers

Port numbers

TELNET

23

FTP

21

SMTP

25

DNS

53

TFTP

69

SNMP

161

TCP UDP Transport layer

Application layer

Page 38: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP client ports

• Q. If you have a computer running an e-mail package, 2 web browsers (Netscape and IE) how does the computer know, when a TCP/IP packet arrives which application should receive the packet ?

• A. Each application sets up its connection using a different port number, when the replies come back from the server the port number is used to send the packet to the correct connection.

Page 39: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP ports (cont.)

• Note : Each application is allocated a different port number by the TCP software

N etS cape

IE

E -M a il

C lien t P C

TC P

Request Source port = 1095Destination.port =80

W ebS erve rw w w .bbc .co .uk

W ebS erve rw w w .s ta ffs .ac .ukReply Source port = 80

Destination.port =1095

RequestSource port = 1093Destination.port =80

Reply Source port = 80Destination.port =1093

M ailS e rve r

Reply Source port = 110Destination.port =1000

Request Source port = 1000Destination.port =110

Page 40: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP server ports• The server must respond to client requests• Q. How does the client know which port to send its

request to ?• A. “Well known port numbers” are assigned to particular

services.

Page 41: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP Error control– The acknowledgment and sequence number fields are used to

guarantee delivery of packets to the destination. – For each packet sent out an acknowledgment must be sent

back.– If no acknowledgment is sent back within a certain time the

packet is sent again.– Each new packet to be transmitted is allocated a new sequence

no., the returning acknowledgment no. informs the sender of the next expected sequence no.

– The sequence no. is used to keep the packets in order.

Page 42: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

TCP flow control

• The window size field is used by the receiver to control the flow of packets from the sender.

• If the receiver sets the window size to 400 the sender is only allowed to send 400 bytes before stopping.

• The receiver can stop the sender by setting the window size to 0.

Page 43: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

UDP (User Datagram Protocol)• Service

– connectionless– provides port allocations the same as TCP– Unreliable, does NOT guarantee delivery– does not guarantee sequencing– useful when speed is more important than

reliability e.g. Internet telephony– Transmits messages called datagrams– Does not reassemble incoming messages– No flow control– uses not acknowledments

Page 44: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

UDP segment format

DestinationPort

Length CheckSum

Data…SourcePort

n16 161616# of bits

Page 45: Networks and Protocols CE00997-3 Week 1b. OSI 7 layer model Vs TCP/IP

IP network and host id.

• An example with Class A addressing• First digit is network id , last 3 digits host id• Note the routers use the network id to route the packets

across the internet

N etw ork ID = 7N e tw ork id = 5

IP R ou te r IP R ou te r

Network ID = 6

IP R ou te r

N e tw orkid = 4

Host id = 0.0.195

4.0.0.195

4.0.0.205

Host id = 0.0.205 Host id = 0.0.112

5.0.0.112

7.0.0.234

Host id = 0.0.234