Вы находитесь на странице: 1из 33

What Each Layer Does

2Cisco

Academy Program Semester 1

Application Layer
Gives end-user applications access to network resources Where is it on my computer?
Workstation or Server Service in MS Windows
3

3Graphic

courtesy of http://www.hawkclan.com/zxonly/iso/slide2.html

Presentation Layer
Provides common data formatting between communicating devices Components make sure the receiving station can read the transferred data
3

3Graphic

courtesy of http://www.hawkclan.com/zxonly/iso/slide2.html

Session Layer
Allows applications to maintain an ongoing session Example NetBIOS Where is it on my computer?
Workstation and Server Service (MS) Windows Client for NetWare (NetWare)
3

3Graphic

courtesy of http://www.hawkclan.com/zxonly/iso/slide2.html

Transport Layer
Provides reliable data delivery Its the TCP in TCP/IP Receives info from upper layers and segments it into packets Can provide error detection and correction
3

3Graphic

courtesy of http://www.hawkclan.com/zxonly/iso/slide2.html

Network Layer
Provides networkwide addressing and a mechanism to move packets between networks (routing) Responsibilities:
Network addressing Routing

Examples:
IP from TCP/IP IPX from IPX/SPX
3Graphic

courtesy of http://www.hawkclan.com/zxonly/iso/slide2.html

Network Addresses
Network-wide addresses Used to transfer data across subnets Used by routers for packet forwarding Example:
IP Address

Where is it on my computer?
TCP/IP Software

Data Link Layer


Places data and retrieves it from the physical layer and provides error detection capabilities

3Graphic

courtesy of http://www.hawkclan.com/zxonly/iso/slide2.html

Sub-layers of the Data Link Layer


MAC (Media Access Control)
Gives data to the NIC Controls access to the media through: CSMA/CD Carrier Sense Multiple Access/Collision Detection Token passing

LLC (Logical Link Layer)


Manages the data link interface (or Service Access Points (SAPs)) Can detect some transmission errors using a Cyclic Redundancy Check (CRC). If the packet is bad the LLC will request the sender to resend that particular packet.

Physical Layer
Determines the specs for all physical components
Cabling Interconnect methods (topology / devices) Data encoding (bits to waves) Electrical properties

Examples:
Ethernet (IEEE 802.3) Token Ring (IEEE 802.5) Wireless (IEEE 802.11b)

3Graphic

courtesy of http://www.hawkclan.com/zxonly/iso/slide2.html

Physical Layer (contd)


What are the Physical Layer components on my computer? NIC
Network Interface Card Has a unique 12 character Hexadecimal number permanently burned into it at the manufacturer. The number is the MAC Address/Physical address of a computer

Cabling
Twister Pair Fiber Optic Coax Cable

How Does It All Work Together


Each layer contains a Protocol Data Unit (PDU)
PDUs are used for peer-topeer contact between corresponding layers. Data is handled by the top three layers, then Segmented by the Transport layer. The Network layer places it into packets and the Data Link frames the packets for transmission. Physical layer coverts it to bits and sends it out over the 2 media. The receiving computer 2Cisco Academy Program Semester 1 reverses the process using the

Evolution of the 7-Layers


Single Layer Model - First Communication Between Computer Devices
Dedicated copper wire or radio link Hardware & software inextricably intertwined Single specification for all aspects of communication

Hardware & Software

Hardware & Software

DEVICE A

DEVICE B

http://www.howtheosimodelworks.com/

Evolution of the 7-Layers (2)


Two Layer Model
Problem: Applications were being developed to run over ever-increasing number of media/signaling systems. Solution: Separate application aspects from technical (signaling and routing) aspects Application Layer: Concerned with user interface, file access and file transfer
Application Application

Technical Standards

Technical Standards
1

http://www.howtheosimodelworks.com/

Evolution of the 7-Layers (3)


Four Layer Model - Network connectivity inherently requires travel over intermediate devices (nodes) Technical Standards Level divided into Network, Datalink and Physical Layers

Application

Application

Network
Data-Link Physical

Network
Data-Link Physical
1

http://www.howtheosimodelworks.com/

Evolution of the 7-Layers (3) cont.


Physical Layer
Describes physical aspects of network: cards, wires, etc Specifies interconnect topologies and devices

Network Layer
Defines a standard method for operating between nodes Address scheme is defined (IP) Accounts for varying topologies

Data-Link
Works with Network Layer to translate logical addresses (IP) into hardware addresses (MAC) for transmission

Defines a single link protocol for transfer between two nodes

Evolution of the 7-Layers (4)


Five Layer Model Increase Quality of Service (QOS)
Variable levels of data integrity in network Additional data exchanges to ensure connectivity over worst conditions Became the Transport Layer

Application

Application

Transport Network Data-Link Physical

Transport Network Data-Link Physical


1

http://www.howtheosimodelworks.com/

Evolution of the 7-Layers (5)


Six Layer Model Dialogue Control and Dialogue Separation
Means of synchronizing transfer of data packets Allows for checkpointing to see if data arrives (at nodes and end stations) Became Session Layer Application Application

Session Transport Network

Session Transport Network

Data-Link
Physical

Data-Link
Physical
1

http://www.howtheosimodelworks.com/

Evolution of the 7-Layers (6)


The Seven Layer OSI Model - Addition of Management and Security
Standardizing notation or syntax for application messages (abstract syntax) Set of encoding rules (transfer syntax) Became the Presentation Layer

Application Presentation Session Transport Network Data-Link Physical

Application Presentation Session Transport Network Data-Link Physical


1

http://www.howtheosimodelworks.com/

Layers of software
Applications and services RMI Sockets and APIs; marshalling UDP and TCP

IP

The Internet protocol


Every computer on the Internet has a unique identifier, its Internet address (IP address) The Internet protocol (IP) routes packets from one computer to another
A router is a special-purpose computer which acts as an intermediary between a pair of communicating computers

An IP packet includes:
The identity of the sender machine i.e. its IP address The identity of the machine to which the packet should be delivered The packet contents application data

The maximum size permitted for an IP packet is 64Kb


In practice, this is too much for many networks to deliver in one chunk and the IP packet must be broken down into fragments The IP protocol takes care of disassembling a packet into fragments and subsequently

The Internet is a packet-switching network. Packets sent between two computers do not necessarily follow the same path.

IP as a basis for a communication channel


Performance
Depends on the underlying networks used

Reliability
No validity guarantees
Where an incoming message buffer is full (at the destination computer or any intermediate router), the packet will be dropped

No integrity guarantees
Packets may be corrupted as they travel through the network; any packet may arrive more than once at the destination

Ordering
No ordering guarantees a sequence of packets may take different routes, incurring different transmission times

Synchronicity
Over a public network (e.g. the Internet) , asynchronous For a closed network, synchronous is possible

TCP communication
TCP socket

Virtual connection

Application TCP IP

Application TCP IP

The TCP layer adds significant overhead to provide reliable communication

Issues for TCP


Outstanding issues for TCP communication include:
Matching of data items
Two processes connected by a stream must agree on the contents and ordering of data transmitted over the stream
E.g. where one process writes an int followed by a double, the other process must read an int and then a double

Where the two processes do not cooperate correctly, the receiving process is likely to experience errors

Blocking
The receiver process blocks until sufficient data is present in the stream The sender process can be blocked by TCPs flow control mechanism

Ports
A port serves as a message source or destination
With the Internet protocols, messages are sent to (Internet address, port) pairs
Web browser Port

Agreed (destination) port


Web browser Web server Mail server Internet address

A local port can be bound to no more than one process Processes may use multiple ports

138.37.94.248

Sockets
A socket is a programming abstraction which provides an endpoint for communication The receiver process socket must be bound to a local port and the Internet address of the computer on which the receiver runs Messages sent to a particular Internet address and port number can be received only by a process whose socket is bound to that Internet address and port number A socket is associated with a transport protocol either TCP or UDP browser

Socket bound to (138.37.94.248, 80)

Port 80

Web server
138.37.94.248

browser

Winsock Server/Client Communication Procedure


Datagram service - UDP, connectionless

29

Stream service - TCP, connection-oriented.


Server

Client

Communication Networks Research (CNR) Lab. EECS, KAIST

30

Winsock API and Class


Winsock API Datagram service (UDP) API
Function name socket bind connect sendto recvfrom closesockt Operation Create a socket Assign a name to the created socket. Connect to a server Transmit datagram Receive datagram from winsock and save the address of client Close the socket host Client/Server Server Client Client/Server Client/Server Client/Server

Stream Service (TCP) API


Function name socket bind listen connect accept send recv closesockt Operation Create a socket Assign a name to the created socket Wait for a client's connection Connect to a server Accept the client's connection Transmit data by winsock Receive datagram from winsock Close the socket host Client/Server Server Server Client Server Client/Server Client/Server Client/Server

Other Winsock API


Function name setsockopt WSAStartup WSAAsyncSelect WSACancelBlockingCall Operations Set up the winsock option Initialize the winsock Set up the winsock in asynchronous mode Cancel calling the blocking winsock function

Вам также может понравиться