Anda di halaman 1dari 67

Overview in Computer Networks TCP/IP and OSI

By Quan Le-Trung http://sites.google.com/site/quanletrung/

Outline
Introduction OSI Model TCP/IP Model IPv4 vs. IPv6

What is a Protocol?
A standard that allows entities (i.e.
application programs) from different systems to communicate Shared conventions for communicating information Includes syntax, semantics, and timing

Standardized 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, still useful for modeling/conceptualizing

Internet Standards
Email related standards

IMAP, POP, X.400, SMTP, CMC, MIME, binhex, uuencode http, CGI, html/xml/vrml/sgml X.500, LDAP http, FTP, telnet, gopher, wais H.320, H.323, Mpeg-1, Mpeg-2

Web related standards

Internet directory standards

Application standards

Videoconferencing standards

*Telecommunication Standards Organizations


International Telecommunications Union - Telecommunication
Standardization Sector (ITU-TSS). Formerly called the Consultative Committee on International Telegraph and Telephone (CCITT) International Organization for Standards (ISO). Member of the ITU, makes technical recommendations about data communications interfaces. American National Standards Institute (ANSI) Institute of Electrical and Electronics Engineers (IEEE) Internet Engineering Task Force (IETF) Electronic Industries Association (EIA) National Institute of Standards and Technology (NIST) National Exchange Carriers Association (NECA) Corporation for Open Systems (COS) Electronic Data Interchange -(EDI) of Electronic Data Interchange for Administration Commerce and Transport (EDIFACT).

*Internet Engineering Task Force


A protocol proposed by a vendor
IETF working group study the proposal

IETF issues a request for comment (RFC)


IETF reviews the comments IETF proposes an improved RFC The RFC becomes a proposed standard The proposed standard becomes a draft standard if two or more vendors adopt it

What is OSI?
Developed by the International Organization for
Standardization (ISO) in 1984 The primary architectural model for intercomputer communications. A conceptual model composed of seven layers, each specifying particular network functions. Describes how information from a software application in one computer moves through a network medium to a software application in another computer.

The model
Model that allows any two different systems
to communicate regardless of their underlying architecture. Purpose OSI: to open communicate between different systems without requiring changes to the logic of the underlying hardware and software OSI not protocol but a model Consist of seven separate but related layers, each of which defines a segment of the process of moving information across a network.

Why Study OSI?


Still an excellent model for
conceptualizing and understanding protocol architectures Key points:

Modular Hierarchical Boundaries between layers=interfaces

An Exchange Using the OSI Model

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Headers and Data

Interfaces between Layers


The passing of the data and network info
down through the layers of the sending machine and back up through the layers of the receiving machine is made possible by an interface between each pair of adjacent layers. Each interface defines what information and services a layer must provide for the layer above it. Well-defined interfaces and layer functions provide modularity to a network.

Organization of the layers


3 main subgroup Layer 1,2,3 hardware support layers. Deal
with the physical aspects of moving data from one device to another (such as electrical specification, physical connections, physical addressing, and transport timing and reliability). Layer 5, 6 and 7 can be thought of as the user support layers: they allow interoperability among unrelated software system. Layer 4? Core layer.

OSI Lower Layers


Physical Layer 1 Data Link Layer 2 Network Layer 3

OSI Physical Layer


Responsible for transmission of bits Always implemented through hardware Encompasses mechanical, electrical,
and functional interfaces e.g. RS-232

Physical Layer
Coordinate the functions required to
transmit a bit stream over a physical medium. It deals with the mechanical and electrical specifications of the interface and transmission medium. It also defines the procedures and functions that physical devices and interfaces have to perform for transmission to occur.

Physical Layer (cont.)


Define Physical characteristics of interfaces and media. Representation of bits. The physical layer data consist of a
stream of bits (sequence of 0s and 1s) without any interpretation. To be transmitted, bits must be encoded into signals electrical or optical. The physical layer defines the type of encoding (how 0s and 1s are changed to signals). Data rate. The physical layer defines the duration of a bit, which is how long it lasts. Synchronization of bits. The sender and receiver must be synchronized at the bit level. Sender and receiver clock must be synchronized Line configuration. Point-to-point config and multipoint config. Physical topology. PL defines how devices connected to make a network Transmission mode. Simplex mode, half-duplex and full-duplex.

Physical Layer

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

*Physical-layer Implementation

OSI Data Link Layer


Responsible for error-free, reliable
transmission of data Flow control, error correction e.g. HDLC

Data link layer transforms the PL, a raw transmission

Data Link Layer

facility, to a reliable and is responsible for node-to-node delivery. DLL makes the physical layer appear error free to the upper layer. SPECIFIC RESPONSIBILITIES of the DLL are the following: Framing. The DLL divides the stream of bits received from the n/w layer into manageable data units called frames Physical addressing. Adds a header to the frame to define the physical address of the sender (source address) and/ or receiver (destination address) of the frame.

Data Link Layer


Flow control. Concern overflow of data from sender
to receiver. Error control. The data link layer adds reliability to the physical layer by adding mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to prevent duplication of frames. Error ctrl is normally achieved through a trailer added to the end of the frame Access control. When two or more devices are connected to the same link, DLL protocols are necessary to determine which device has control over the link at any given time.

OSI Data Link Layer

IEEE has subdivided data link layer into two sub-layers.

Data Link Layer

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Data Link Layer Example

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

OSI Network Layer


Responsible for routing of messages
through network Concerned with type of switching used (circuit v. packet) Handles routing between networks, as well as through packet-switching networks

Network Layer
NL is responsible for the source-to-dest

delivery of a packet possibly across multiple n/w (links) Whereas the DL oversees the delivery of the packet between two systems on the same n/w, the n/w layer ensures that each packet gets from its point of origin to its final destination. Specific responsibilities

Logical addressing Routing

Network Layer

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Network Layer Example see trans

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Network Layer Example see trans

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

OSI Upper Layers


Transport Session Presentation Application

OSI Transport Layer


Isolates messages from lower and
upper layers Breaks down message size Monitors quality of communications channel Selects most efficient communication service necessary for a given transmission

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

Transport layer
The transport layer is responsible for source-todestination (end-to-end) delivery of the entire message. Whereas the NL oversees end-to-end delivery of individual packets, it doesnt recognize any relationship between those packets. It treats each one independently, as though each piece belonged to a separate message, whether or not it does. The transport layer, on the other hand, ensures that the whole message arrives intact and in order, overseeing both error control and flow control at the source-to-destination level.

Transport layer responsibilities


Service-point addressing. Computers often run
several programs at the same time. For this reason, source-to-destination delivery means delivery not only from one computer to the next but also from a specific process on one computer to a specific process on the other. The transport layer header therefore must include a type of address called a service-point address (or port address). The NL gets each packet to the correct computer; the transport layer gets the entire message to the correct process on that computer. Segmentation and reassembly. A message is divided into transmittable segments, each segment containing a sequence number.

Transport layer responsibilities


Connection control. The transport layer can be either
connectionless or connection-oriented. A connectionless transport layer treats each segment as an independent packet and delivers it to the transport layer at the destination machine. A connection-oriented transport layer makes a connection with the transport layer at the destination machine first before delivering the packets. After all the data are transferred, the connection is terminated. Flow control. Like the data link layer, the transport layer is responsible for flow control. However, flow control at this layer is performed end to end rather than across a single link. Error control. Like the DLL, the transport layer is responsible for error control. However, error control at this layer is performed end to end rather across a single link. The sending transport layer makes sure that the entire message arrives at the receiving transport layer without error. Error correction is usually achived through retransmission

OSI Session Layer


Establishes logical connections between
systems Manages log-ons, password exchange, log-offs Terminates connection at end of session

Specific responsibilities of the session layer


Dialog control. The session layer allows two systems
to enter into a dialog. It allows the communication between two processes to take place either in halfduplex or full-duplex. For e.g. the dialog between a terminal connected to a mainframe can be halfduplex Synchronization. The session layer allows a process to add checkpoints (synchronization points) into a stream of data. For e.g., if a system is sending a file of 2000 pages, it is advisable to insert checkpoints after every 100 pages to ensure that each 100-page unit is received and acknowledged independently. What happen if crash?

OSI Presentation Layer


Provides format and code conversion
services Examples

File conversion from ASCII to EBDIC Invoking character sequences to generate bold, italics, etc on a printer

Presentation layer
Concerned with the syntax and
semantics of the information exchanged between two systems. Responsibilities

Translation Encryption Compression

OSI Application Layer


Provides access to network for end-user Users capabilities are determined by
what items are available on this layer Logic needed to support various applications Each type of application (file transfer, remote access) requires different software on this layer

Application Layer
The application layer enables the user,
whether human or software, to access the network. It provides user interfaces and support for services such as electronic mail, remote file access and transfer, shared database management, and other types of distributed information services.

Summary of Layer Functions

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Application Viewpoint of a Network


Distributed data communications involves
three primary components:

Networks Computers Applications Network access layer Transport layer Application layer

Three corresponding layers


TCP/IP
Transmission control Protocol/Internet
Protocol Developed by DARPA No official protocol standard Can identify five layers

Application Host-to-Host (transport) Internet Network Access Physical

An OSI View of TCP/IP


TCP/IP Protocol Suite
Application (http, telnet, snmp, smtp, nfs, ftp) Transport (TCP, UDP)
Internet (IPv4/IPv6)

OSI Model

Network Access
Physical layer

(HDLC)

Sender
Application Layer
HTTP Request

Receiver
Application Layer
HTTP Request

Transport Layer

TCP HTTP

Request

Transport Layer

TCP HTTP

Request

Network Layer

IP

TCP HTTP

Request

Network Layer

IP

TCP HTTP

Request

Data Link Layer

Ethernet IP

TCP HTTP

Request

Data Link Layer

Ethernet IP

TCP HTTP

Request

Physical Layer

Physical Layer

http://en.wikipedia.org/wiki/Internet_Protocol_Suite

Another Internet Model Instantiations of the TCP/IP stack operating on two hosts each connected to its router on the Internet. Shown is the flow of user data through the layers used at each hop.

http://en.wikipedia.org/wiki/Internet_Protocol_Suite

Internet Protocol Suite Application Layer BGP DHCP DNS FTP HTTP IMAP IRC LDAP MGCP NNTP NTP POP RIP RPC RTP SIP SMTP SNMP SOCKS SSH Telnet TLS/SSL XMPP (more) Transport Layer

Another Internet Model

TCP UDP DCCP SCTP RSVP ECN (more) Internet Layer IP (IPv4, IPv6) ICMP ICMPv6 IGMP IPsec (more) Link Layer ARP/InARP NDP OSPF Tunnels (L2TP) PPP Media Access Control (Ethernet, DSL, ISDN, FDDI) (more)

http://en.wikipedia.org/wiki/Internet_Protocol_Suite
RFC 1122 [7] Tanenbaum Cisco Academy[8] Kurose[9] Forouzan [10] Comer[11] Kozierok[12] Stallings[13] Arpanet Reference Model 1982 (RFC 871)

Four layers [14] Four layers [15] Four layers

Five layers
"Five-layer Internet model" or "TCP/IP protocol suite" Application

Four+one layers
"TCP/IP 5layer reference model"

Five layers

Three layers

"Internet model"[citation
needed]

"TCP/IP reference model"[16]

"Internet model"

"TCP/IP model"

"Arpanet reference model"

Application
[14][17]

Application

Application

Application

Application Host-to-host or transport Internet Network access Physical

Application/Pr ocess

Transport [14] Internet [14] Link


[14]

Transport Internet Host-tonetwork

Transport Internetwork Network interface

Transport Network Data link Physical

Transport Internet Data link (Network interface) (Hardware)

Host-to-host

Network interface

Layer names and number of layers in the literature

TCP/IP Network Access Layer


Exchange of data between end system and

network Address of host and destination Prioritization of transmission Software at this layer depends on network (e.g. X.25 vs. Ethernet) Segregation means that no other software needs to be concerned about net specifics

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

TCP/IP Transport Layer


Also called host-to-host layer Reliable exchange of data between

applications Uses TCP protocols for transmission

TCP/IP Application Layer


Logic needed to support variety of
applications Separate module supports each type of application (e.g. file transfer)

FTP HTTP Telnet News SMTP

*TCP/IP
Application Presentation Session TELNET FTP SMTP DNS SNMP RIP RTP RTCP IGMP Network Internet Protocol Transmission Control Protocol User Datagram Protocol OSPF ICMP DHCP

Transport

ARP
Data link Physical

Ethernet

Token Bus

Token Ring

FDDI

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

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

Internetworking

Figure: e.g. overall simple 100 base T LAN infrastructure in a workplace

TCP Segment (TCP PDU)



Source port (16 bits) Destination port (16 bits) Sequence number (32 bits) Acknowledgment number (32 bits) Data Offset (4 bits) Reserved (6 bits) Flags (6 bits) : URG, ACK, PSH, RST, SYN, FIN Window (16 bits) Checksum (16 bits) Urgent Pointer (16 bits) Options (variable)

The size of TCP header is 192 bits = 24 byes.

IPv4 and IPv6


IP (IPv4) provides for 32-bit source and
destination addresses, using a 192-bit header IPv6 (1996 standard) provides for 128bit addresses, using a 320-bit header. Migration to IPv6 will be a very slow process

*History of IPng Effort


By the Winter of 1992 the Internet community had developed four
separate proposals for IPng. These were "CNAT", "IP Encaps", "Nimrod", and "Simple CLNP". By December 1992 three more proposals followed; "The P Internet Protocol" (PIP), "The Simple Internet Protocol" (SIP) and "TP/IX". In the Spring of 1992 the "Simple CLNP" evolved into "TCP and UDP with Bigger Addresses" (TUBA) and "IP Encaps" evolved into "IP Address Encapsulation" (IPAE). By the fall of 1993, IPAE merged with SIP while still maintaining the name SIP. This group later merged with PIP and the resulting working group called themselves "Simple Internet Protocol Plus" (SIPP). At about the same time the TP/IX Working Group changed its name to "Common Architecture for the Internet" (CATNIP). The IPng area directors made a recommendation for an IPng in July of 1994 [RFC 1752]. The formal name of IPng is IPv6

Why Need IPv6?


Internet Growth

Network numbers and size Traffic management

Quality of Services (QoS) Internet Transition


Routing Addressing

No question that an IPv6 is needed, but when

IP Packet version
IP4

1
1 2 3 4 5 6 7 8

7
4 bits 4 bits 8 bits 16 bits 16 bits 3 bits 13 bits 8 bits

8
9 10 11 12 13 14 15 16

10

11

12

13

14
8 bits 16 bits 32 bits 32 bits varies varies 24 bits 8 bits

Version number Header length Type of Service Total length Identifiers Flags Packet offset Hop limit IP6 1 15 4 16 8

Protocol CRC 16 Source address Destination Address Options User data Flow name Next header

11 (128 bits)

12 (128 bits)

14

IPv4 Header
Version (4 bits) Internet header length

(4 bits) Type of Service (8 bits) Total Length (16 bits) Identification (16 bits) Flags (3 bits Fragment Offset (13 bits)

Time to Live (8 bits) Protocol (8 bits Header Checksum (16


bits) Source Address ( 32 bits) Destination Address (32 bits) Options (variable) Padding (variable)

Anda mungkin juga menyukai