You are on page 1of 79

1

OSI Model

OSI means Open System Interconnect model. Developed by the International Organization for Standardization in 1974. It consists of seven layers. Each layer has a different but specific processing function.

OSI Model Layers

Layer - 7 Layer - 6 Layer - 5 Layer - 4 Layer - 3 Layer - 2 Layer - 1

Application Presentation Session Transport Network Data Link Physical

Advice Upper Layer Person or Software Layer Sales Take Not Lower Layer or Do Hardware Layer Please
3

Application Layer

Application Application Presentation Session Transport Network Data Link Physical

 Application Layer is responsible for providing Networking Services to user.  It also known as Desktop Layer.  Identification of Services is done using Port Numbers. This layer supports application and end-user processes. Communication partners are identified, quality of service is identified, user authentication and privacy are considered, and any constraints on data syntax are identified. Everything at this layer is application-specific. Tiered application architectures are part of this layer.

Ports are nothing but Socket i.e. Entry and Exit Point to the Layer Total No. Ports 0 65535 Reserved Ports 0 1023 Open Ports 1024 65535 4

Example of HTTP request


http://www.zoomgroup.com

Client

Web Server

Example of HTTP request

HTTP HTTP Reply Received Request http:// www.zoomgroup.com http://www.zoomgroup.com Webpage

HTTP Request Listen on Port 80 Sending HTTP Reply Webpage

Client

Web Server

Example of FTP request


ftp://ftp.microsoft.com

Client

FTP Server

Examples of Networking Services Service Port No.

HTTP

80

FTP SMTP TELNET TFTP

21 25 23 69
8

How data flows from Application Layer

Application
80 21 25 53 67 69

Data

Presentation Session Transport Network Data Link Physical


9

Presentation Layer

Application Presentation Session Transport Network Data Link Physical Encoding Decoding Encryption Decryption Compression Decompression
10

Presentation Layer is responsible for converting data into standard format. Examples : ASCII, EBCDIC, JPEG, MPEG, BMP, MIDI, WAV, MP3 Following tasks are perform at presentation layer :

How data flows from Presentation Layer Application Presentation Session Transport Network Data Link Physical
11

Data Data

Session Layer

Application Presentation Session Transport Network Data Link Physical

 Session Layer is responsible establishing, maintaining and terminating session.  Session ID also works at Session Layer.  Creates Virtual Circuit  Organize their communication by offering three different modes Simplex Half Duplex Full Duplex Examples : RPC Remote Procedure Call . SQL Structured Query language. NFS Network File System. PDU - Formatted Data
12

Half Duplex
It uses only one wire pair with a digital signal running in both directions on the wire. It also uses the CSMA/CD protocol to help prevent collisions and to permit retransmitting if a collision does occur. If a hub is attached to a switch, it must operate in halfduplex mode because the end stations must be able to detect collisions. Half-duplex Ethernet typically 10BaseT is only about 30 to 40 percent efficient because a large 10BaseT network will usually only give you 3 to 4Mbps at most.
13

Full Duplex
In a network that uses twisted-pair cabling, one pair is used to carry the transmitted signal from one node to the other node. A separate pair is used for the return or received signal. It is possible for signals to pass through both pairs simultaneously. The capability of communication in both directions at once is known as full duplex.

14

How data flows from Session Layer

Application Presentation Session Transport Network Data Link Physical

Data Data Data

15

Transport Layer

Application Presentation Session Transport Network Data Link Physical

Transport Layer is responsible for endto-end connectivity. It is also known as heart of OSI Layers. Following task are performed at Transport Layer : Identifying Service Multiplexing & De-multiplexing Segmentation Sequencing & Reassembling Flow Control Error Correction Acknowledgment PDU - Segments
16

Identifying Service

TCP Transmission Control Protocol Connection Oriented Acknowledgement Reliable Slower Port No. 6 e.g. HTTP, FTP, SMTP

UDP User Datagram Protocol

Connection Less No Acknowledgement Unreliable Faster Port No. 17 e.g. DNS, DHCP, TFTP
17

Multiplexing & De-multiplexing

Application Presentation Session


80 21 25 53 67 69

Transport
TCP - 6 UDP - 17

Network Data Link Physical


18

Segmentation

Hello! How are you ? Hello! How are you ? Hello! How Are You ?

19

Sequencing & Reassembling

you Hello! Hello! HowHow ? Are are you ? You Hello! Hello! How are How ? you ? You Hello! How ? Are Hello! How Are You ? are

20

Sequencing & Reassembling

Hello! Hello! How are you ? Hello! How are How are you ? Hello! How Are You ? you ?
1/5 2/5 3/5 4/5 5/5

You
4/5

Hello! How
1/5 2/5

?
5/5

Are
3/5

21

Error Correction

Segment Missing Hello! Hello! How are you ? Hello! How are How are you ? Hello! How Are You ? you ?
1/5 2/5 3/5 4/5 5/5

You
4/5

Hello! How
1/5 2/5

?
5/5

Are
3/5

22

Flow Control - Windowing

Ack. Sending 3 Received3-window Sending 4 5-window

PC-A can send 4 Segment at a time to PC-B Ack-RecReceived 3-window 4-window

23

How data flows from Transport Layer

Application Presentation Session Transport Network Data Link Physical

Data Data Data TH Segment Data

24

Layer 4 : Transport Layer


Transport

Distinguishes between upper-layer applications Establishes end-to-end connectivity between applications Defines flow control Provides reliable or unreliable services for data transfer

TCP

UDP

SPX

Network

IP

IPX

25

Reliable Service

Sender

Receiver

Synchronize Acknowledge, Synchronize Acknowledge Connection Established Data Transfer (Send Segments)
26

Network Layer

Application Presentation Session Transport Network Data Link Physical

Network Layer is responsible for providing best path to data to reach destination. Logical Addressing sits on this layer. Device working on Network Layer is Router. Sometimes referred to as the Cisco Layer. End to End Delivery Provide logical addressing that routers use for path determination Segments are encapsulated Internetwork Communication Packet forwarding Packet Filtering Makes Best Path Determination Fragmentation
PDU Packets IP/IPX
27

It is divided into two parts Routed Protocols e.g. IP, IPX, Apple Talk. Routing Protocols e.g. RIP, IGRP, OSPF, EIGRP

28

Routed Protocols

Segment

Hello! How are you ?

Source IP 192.168.1.1 Destination IP Segment 192.168.1.2

Hello! How are you ?

192.168.1.1

192.168.1.2

29

Routing Protocols

www.zoomgroup.com

30

How data flows from Network Layer

Application Presentation Session e.g. Router Transport Network Data Link Physical

Data Data Data Segment Packet NH Segment

31

Datalink Layer
Performs Physical Addressing This layer provides reliable transit of data across a physical link. Combines bits into bytes and bytes into frames Access to media using MAC address Error detection, not correction LLC and MAC Logical Link Control performs Link establishment MAC Performs Access method

Preamble

DMAC

SMAC

Data length

DATA

FCS
32

Datalink Layer

Application Presentation Session Transport Network Data Link Physical

Datalink Layer is two Sub Layers :

divided into

LLC Logical Link Control It talks about Wan protocols e.g. PPP, HDLC, Frame-relay MAC Media Access Control It talks about Physical Address. It is 48 bit Addressing i.e. 12 digit Hexadecimal No. It is also responsible for Error Detection. Device working on Data Link Layer is Switch, Bridge, NIC.
33

Error Detection CRC Check

Hello! How are you ?

PC-A CRC No. 33333 PC-B Source MAC 00-20-18-C0-07-71 CRC No. 11114 Error Detected 33333 11114 46323 99434 43434 99323 55434 89696 22222 32434 00000 Destination MAC Packet Error Detected 00-20-18-C0-07-72
B

Packet

For Error Correction Contact Source Transport layer

192.168.1.1 00-20-18-C0-07-71

192.168.1.2 00-20-18-C0-07-72

34

Error Detection CRC Check

Packet

Source MAC 00-20-18-C0-07-71 Destination MAC Packet 00-20-18-C0-07-72

Hello! How are you ?

20202 11114 46323 99434 43434 99323 55434 89696 22222 32434 00000

192.168.1.1 00-20-18-C0-07-71

192.168.1.2 00-20-18-C0-07-72

35

How data flows from Data Link Layer

Application Presentation Session Transport e.g. Switch Network Data Link Physical

Data Data Data Segment Packet


DH Frame DT Packet

36

Layer 2
MAC Layer802.3
Number of Bytes

6
Destination Address

6
Source Address

2 Length

Variable Data

4 FCS

Preamble

0000.0C IEEE Assigned

xx.xxxx Vendor Assigned

Ethernet II uses Type here and does not use 802.2.

MAC Address
synchronize senders and receivers
37

Ethernet frame
Ethernet CSMA /CD - Carrier Sense Multiple Access / Collision Detection local area network A broadcast network - all frames that cross a segment can be heard by all machines on the segment All machines have equal access, they wait for a quiet time to transmit, collisions occur when two machines transmit at the same time. When a collision occurs both the machines apply a back off time that prevents them from colliding again Services both the Physical and Data Link layers

Ethernet frame (read right to left)

FSC

Data

Type

Source

Destination

SOF

Preambl e

Frame Check Sequence

Data to be handed to the upper layer protocol

Defines which upper layer protocol will receive the packet

MAC Address

MAC Address

Start of Frame

Beginnin g of the frame

4 bytes

46-1500 bytes

2 bytes

6 bytes

6 bytes

1 byte

38 7 bytes

Devices On Layer 2 (Switches & Bridges)


Data-Link

OR

Each segment has its own collision domain. All segments are in the same broadcast domain.
39

Token ring frame


Data / Control Frame (read right to left) Frame Status End Delimi ter Sour ce Destina tion Frame Contro l Access Control FCS Data Start Delimiter

Can relay 2 statuses Frame copied or address recogniz ed

Indicat es end of frame

Error checking , used in CRC calculatio ns

All data that is to be encapsulated. length is determined by how long the station can hold a token

Pack et's addre ss

Packet's address

Info Regard ing Frame Control

Assigns Priority to the frame, distinguis hes frame type

Alerts each station that the frame is Data/Control Frame

1 byte

1 byte

1 byte

varies

6 bytes

6 bytes

1 byte

1 byte

1 byte 40

Switches

Switch
Memory

Each segment is its own collision domain. Broadcasts are forwarded to all segments.

41

Physical Layer

Application Presentation Session Transport Network Data Link Physical

Physical Layer is responsible for electrical, mechanical or procedural checks. Data will be converted in Binary that is 0s & 1s. Data will be in the form of electrical pulses if it is Coaxial or Twisted Pair cable and in the form of Light if it is Fiber Optic Cable. Devices working at Physical Layer are Hubs, Repeaters, Cables, Modems etc.

42

Physical Layer Example

Frame

Hello! How are you ?


1010101010101010
Frame

0101011010101010101010101 1010101101010101010101010 0101011010101010101010101

43

How data flows from Physical Layer

Application Presentation Session Transport Network e.g. Hub Data Link Physical

Data Data Data Segment Packet Frame Bits


44

Data Encapsulation & De-capsulation

A
Application Presentation Session Transport Network Data Link Physical
Data Data

B
Application Presentation Session Transport TH Network NH Data Link DTD H Physical
45

Data

Data

Data

Data

TH Data Segment
Packet NH Segment Packet DHFrameDT

Segment Data TH Packet NH Segment Packet Packet DTFrameDH

Bits

Bits

Comparing OSI with TCP/IP Layers

OSI Layers Application Presentation Session Transport Network Data Link Physical

TCP/IP Layers

Application

Transport Internet Network Access


46

Physical Layer
Defines
Media type Connector type Signaling type
Physical 802.3

02.3 is responsible for LANs based on the carrier sense multiple access collision detect (CSMA/CD) access methodology. Ethernet is an example of a CSMA/CD network.
47

Physical Layer: Ethernet/802.3


10Base2Thin Ethernet 10Base5Thick Ethernet

Host Hub Hosts


10BaseTTwisted Pair

48

Device Used At Layer 1


Physical

All devices are in the same collision domain. All devices are in the same broadcast domain. Devices share the same bandwidth.
49

Hubs & Collision Domains


More end stations means more collisions. CSMA/CD is used.

50

Data Encapsulation
Application Presentation Upper-Layer Data TCP Header Upper-Layer Data Session

PDU Segment Packet

Transport Network

IP Header

Data

LLC Header

Data

FCS

Data-Link

Frame

MAC Header

Data

FCS

0101110101001000010

Physical

Bits
51

Data Encapsulation

52

OSI Model Analogy Application Layer - Source Host

After riding your new bicycle a few times in Bangalore, you decide that you want to give it to a friend who lives in DADAR, 53 Mumbai.

OSI Model Analogy Presentation Layer - Source Host

Make sure you have the proper directions to disassemble and reassemble the bicycle. 54

OSI Model Analogy Session Layer - Source Host

Call your friend and make sure you have his correct address.
55

OSI Model Analogy Transport Layer - Source Host

Disassemble the bicycle and put different pieces in different boxes. The boxes are labeled 56 1 of 3, 2 of 3, and 3 of 3.

OSI Model Analogy Data Link Layer Source Host

Bangalore post office takes possession of the boxes.


57

OSI Model Analogy Physical Layer - Media

The boxes are flown from Bangalore to Mumbai.


58

OSI Model Analogy Network Layer - Destination

Upon examining the destination address, Dadar post office determines that your boxes should be delivered to your written home 59 address.

OSI Model Analogy Transport Layer - Destination

Your friend calls you and tells you he got all 3 boxes and he is having another friend named BOB reassemble the 60 bicycle.

OSI Model Analogy Session Layer - Destination

Your friend hangs up because he is done talking to you.


61

OSI Model Analogy Presentation Layer - Destination

BOB is finished and presents the bicycle to your friend. Another way to say it is that your friend is finally getting 62 him present.

OSI Model Analogy Application Layer - Destination

Your friend enjoys riding his new bicycle in Dadar.


63

Data Flow Through a Network

64

Type of Transmission
Unicast Multicast Broadcast

65

Broadcast Domain
A group of devices receiving broadcast frames initiating from any device within the group Routers do not forward broadcast frames, broadcast domains are not forwarded from one broadcast to another.

66

Collision
The effect of two nodes sending transmissions simultaneously in Ethernet. When they meet on the physical media, the frames from each node collide and are damaged.

67

Collision Domain
The network area in Ethernet over which frames that have collided will be detected. Collisions are propagated by hubs and repeaters Collisions are Not propagated by switches, routers, or bridges

68

Layer 3 : Network Layer


Defines logical source and destination addresses associated with a specific protocol Defines paths through network
Network IP, IPX

Data-Link

802.2

Physical

802.3

EIA/TIA-232 V.35
69

Layer 3 : (cont.)
Network Layer End-Station Packet
IP Header Source Address Destination Address Data

Logical Address

172.15.1.1
Network Node

Route determination occurs at this layer, so a packet must include a source and destination address. Network-layer addresses have two components: a network component for internetwork routing, and a node number for a device-specific address. The example in the figure is an example of an IP packet and 70 address.

Layer 3 (cont.)
Address Mask

172.16.122.204 255.255.0.0
172 16 122 204

Binary Address Binary Mask

10101100
255

00010000
255

01111010
0

11001100
0

11111111

11111111
Network

00000000

00000000
Host
71

Device On Layer 3 Router


Broadcast control Multicast control Optimal path determination Traffic management Logical addressing Connects to WAN services

72

How They Operate


Hub Bridge Switch Router

Collision Domains: 1 4 Broadcast Domains: 1 1 4 1 4 4


73

Application layer protocols


FTP (File transfer protocol)
Port no: 20, 21 Which allows systems on the large size of files, that is called

TFTP (Trivial file transfer protocol)


Port no: 69 Which allows systems on the small size of files, that is called To exchange the data one LAN to another LAN

HTTP (hyper text transfer protocol) Port no =80 Used to transfer HTML documents across the internet To using to access the web page SNMP (Simple network management protocol) Port no: 161 It enables you to monitor a network from a single workstation called SNMP manager You can make inquires to another network device running an SNMP agent SMTP (simple mail transfer protocol) Port no = 25 Used to send the email NNTP (Network News transfer protocol) Port no = 119 I t is used for sending news ESMTP (enhanced simple mail transfer protocol)
Used to send the email

NET BIOS (Network Basic Input Output system) Port no = Used to resolve the machine name to IP address

Application layer protocols (contd.)


DNS (Domain Name Service) Port no = 53 Used to resolve machine name to IP address and IP address to machine name DHCP (Dynamic Host Configure Protocol) Port no = 67,68 To assign IP address automatically RLOGON (remote logon) It is old version It is used for logon remotely TELNET (telnet emulation network) Port no: 23 It is used for logon remotely A user on one system on the internet can access and logon into another system POP (Post office protocol) It is receiving mails It is commonly used in LAN POP-3(Post office protocol) Port no: 110 It is mail server protocol It is commonly used on the internet It provides a message store that holds incoming E-Mails until users logon and downloads it IMAP To used to receiving mails from particular mails only NFS (Network file system) To Sharing the information] RPC (remote procedure call) It is used for sending mail

TRANSPORT layer protocols (contd.)


IPX/SPX (Internet work Packet Exchange/Sequenced Packet Exchange) Used to connect novel Netware OS with Microsoft Operating System IPX / SPX = Novel Netware + Microsoft IP address, generating automatically, but IP address visible to see TCP It is reliable connection oriented protocol. This is also called process to process protocol It gets acknowledgement from destination It provides services like full-duplex (sending and receiving at same time) The TCP enables applications to send streams of data from one host to another. Unlike IP and UDP, TCP is a connection-oriented protocol. Before hosts exchange data via TCP, a session is initiated. The session provides error control by such means as sequence-checking of the discrete messages that compose the data stream. Creating a session and performing error-checking and recovery entails some overhead; consequently, TCP is preferred over UDP only when these considerations are important. UDP It is UN reliable connection oriented protocol. It checking only port address only It is alternative on TCP protocol It does not get acknowledgement from destination That offers a limited amount of service when messages are exchange between systems in a network that uses the internet protocol The UDP enables applications to send finite-length messages from one host to another. Like IP, UDP is a connectionless, unreliable protocol. Its main virtue is low overhead, which makes it suitable for short, infrequent host-tohost interactions and interactions in which dropping a message now and again is less important than sending data quickly. When error detection and recovery are needed, TCP is used.

network layer protocols (contd.)


IP (Internet protocol)
It provides the specifications that show routing defragments and reassembly to occure. It provides connectionless protocol, non guaranteed delivery of transport layer packets The IP protocol is responsible for the routing and delivery of data. It is a connectionless protocol, meaning that no handshake occurs between hosts before an exchange of data occurs. The IP protocol is called an unreliable protocol. This doesnt mean that it cannot be trusted to deliver data. It merely refers to IPs lack of error detection and recovery mechanisms. These functions are not missing from TCP/IP; they are provided by transport layer protocols.

network layer protocols (contd.)


ARP (address resolution protocol) It is find the MAC address from known IPAddress RARP (Reverse address resolution protocol) It is find the IP Address from known MAC address PPP (point to point protocol) It is used for least line connection It is get IP Security IGMP Sending the messages to group of systems Simultaneously transmission of message into group of recipient ICMP It works with IP to provide internet work error and other control information to tcp and other upper layer protocols The ICMP protocol passes control messages from host to host. These control messages perform the following functions:
_ They regulate the flow of data, so that a receiving host is not overwhelmed. _ They inform the sending hosts of unreachable destinations. _ They inform hosts of new and closed routes. _ They enable hosts to check the status of remote hosts.

SLIP (serial inline interface protocol)


It like has point to point protocol It does not get IP Security To allow to get connection to all the systems

79