networks and protocols ce00997-3 week 1b. osi 7 layer model vs tcp/ip
TRANSCRIPT
Networks and Protocols CE00997-3
Week 1b
OSI 7 layer model Vs TCP/IP
OSI 7 layer model Vs TCP/IP
Introduction – Data and Signals
Analog versus Digital
•Analog - continuous waveform
•Examples: (naturally occurring) music and voice
Analog versus Digital
•Harder to separate noise from an analog signal than from a digital signal
Analog versus Digital•Digital - discrete or non-continuous waveform
•Examples: computer 1s and 0s
Analog versus Digital
•Despite noise in this digital signal•You can still discern a high voltage from a low voltage
Analog versus Digital•If there is too much noise
• You cannot discern a high voltage from a low voltage
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
ISO basic model
AP
Application-orientedfunctions
Network-dependantfunctions
AP
Real systems environment
OSI environment
Network Environment
Data Network
Computer A Computer B
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
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
Encapsulation
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)
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)
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
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
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
The Open Systems Interconnection (OSI) model
7 Layer protocol
7 layer operation
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
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
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
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
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.
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
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.
Deterministic MAC
Non-Deterministic MAC
TCP/IP development
1965 1970 1980 1985
APANETcommissioned
by DOD1969
1975
Telnet1972
FTP1973
TCP1974
IP1981
TCP/IPProtocol Suite1982
DNS1984
TCP/IP Utilities
LPQLPQ
FTPFTP TFTPTFTP RCPRCP TelnetTelnet
RSHRSH REXECREXEC LPRLPR
NBTSTATNBTSTAT ROUTEROUTE TRACERTTRACERT ARPARP FingerFinger
PINGPING IPCONFIGIPCONFIG NSLOOKUPNSLOOKUP HOSTNAMEHOSTNAME NETSTATNETSTAT
LPDLPD
Protocol Graph
TCP UDP
IP
HTTP
FTP SMTP DNS DNS TFTP
Internet
Your LAN
Many LANsand WANs
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
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
Protocols & port numbers
Port numbers
TELNET
23
FTP
21
SMTP
25
DNS
53
TFTP
69
SNMP
161
TCP UDP Transport layer
Application layer
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.
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
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.
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.
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.
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
UDP segment format
DestinationPort
Length CheckSum
Data…SourcePort
n16 161616# of bits
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