how osi 7 layer model works

Upload: ranjit-singh

Post on 07-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 How OSI 7 Layer Model Works

    1/9

    How OSI 7 Layer Model Works? Understanding OSI Layers

    How OSI 7 Layer Model Works? Understanding OSI Layers by AnujTyagi

    This article aims to study the 7 layers of OSI model used by Computer system, whencommunicating with any other system in same/ different network.

    Note: This article is not about understanding OSI layers. It is a practical approach for howOSI layers works & used by our computer system.

    Application Layer: Application Layer provides user interface i.e. user directly interacts with thislayer. The most common examples of applications which enable us to communicate throughdifferent protocols are :

    FTP (Eg. Filezilla Server Application)

    http/https (Eg. Firefox or any other Web-browser)

    SMTP ( via any email client like IBM LOTUS or Microsoft Outlook or WebBrowser)

    Telnet ( shell interpretaors like Command Prompt in windows/ terminal in linux distro)

    As all of these applications accessed through computer .

    Presentation Layer: This layer gets name from its purpose . This layer responsibility includes :

    Presents data to application layer and responsible for data translation and formatting. Eg.Translation of data we enter into browser to be converted into web language codes with

    http://www.amarjit.info/2011/08/how-osi-7-layer-model-works.htmlhttp://lh6.ggpht.com/-HujuOZ2Dmak/TjZbtT5-QcI/AAAAAAAAGUA/yIzCkKOyLYM/s1600-h/image%25255B13%25255D.pnghttp://www.amarjit.info/2011/08/how-osi-7-layer-model-works.html
  • 8/4/2019 How OSI 7 Layer Model Works

    2/9

    different tags . Also it takes care of data which has been sent should be understood bybrowser to present it on user-interface .

    Compression and encryption of data .

    I tried to capture a packet forPING REQUEST towww.google.com and on capturing packets gotthis in packets.

    For compression, take an example of browser which uses HTTP Compression to save transferdata volume and speeds ups Web page load time. Firefox uses Gzip encoding to send data .

    We proved that presentation layer also used by & within computer system .

    Session Layer : Session layer establish, maintain and terminates sessions between enddevices. We can check current sessions in the system using netstatcommand and output willlook like this :

    http://www.google.com/http://www.google.com/http://lh5.ggpht.com/-M5OVoV7Wgcs/TjZbwEIG_SI/AAAAAAAAGUI/jBASVTY0094/s1600-h/image%25255B23%25255D.pnghttp://www.google.com/
  • 8/4/2019 How OSI 7 Layer Model Works

    3/9

    This command is common for windows/Linux OS.

    Transport Layer : This layer is concerned with reliability of data transfer .

    It is of two types :

    1. Connection Oriented (TCP)2. Connectionless (UDP)

    It is easy to find if connection is establish is in TCP/UDP state. Look at the above figure in which

    first column defines whether connection is established as TCP/UDP. This process is Protocoldependent .

    It also take care of other responsibilities like :

    Flow Control (windows) : Which find how much data should be send in one packet duringtransfer to minimize the data loss due to buffer overflow. It doesnt send data but Segment intosmaller pieces and size of which is defined through windowing feature. To show this in practicalmanner, I started to upload a file on mediafire.com .

    http://lh3.ggpht.com/-2tRvx272mU4/TjZbyLBghKI/AAAAAAAAGUQ/4jJ4yPUNklQ/s1600-h/image%25255B28%25255D.png
  • 8/4/2019 How OSI 7 Layer Model Works

    4/9

    By ping , we got ip address ofmediafire.com .its 205.196.120.8 .

    And Now I started to sniff the packets using wireshark on my pc. So, its easy to confirm thatbelow captured packets are those during transfer from mediafire. .

    So, what do we learn from above image ?

    Source address: 205.196.120.8

    Destination address: 192.168.1.3

    Protocol type: TCP (connection oriented )

    Win (window size ): 66240 bytes = 65 KB approx .

    Source address is mediafire server as we are uploading data.

    So, what conclusion it makes ? Data is being split up into 66240 bytes each and after reachingdestination it being re-ordered.

    The segments which are delivered are acknowledged back to the sender upon their reception.

    Network Layer: Network layer works on Logical address which is IP addresses. A computersystem understand IP addresses and communication and identification also takes place incomputer system.

    http://lh3.ggpht.com/-d7fx4g2Iv6o/TjZb3_SB-hI/AAAAAAAAGUg/rhkUocgTeSo/s1600-h/image%25255B36%25255D.pnghttp://lh3.ggpht.com/-mW-Wq7uA1EA/TjZb1mU-L9I/AAAAAAAAGUY/u4awDBoWTMs/s1600-h/image%25255B32%25255D.png
  • 8/4/2019 How OSI 7 Layer Model Works

    5/9

    Any device which use ip-address for communication

    Data Link Layer : The main focus of data link layer on use of MAC address. Whenever dataflows through the LAN , communication takes place through MAC address .

    So, to find if MAC address is being used during data transfer in lan or not ?

    I start capturing again using wireshark .

    Which shows Destination MAC address : 00:26:5e:ff:c5:fc for 192.168.1.3

    Source MAC address: 00:26:5e:fc:10:Se for 192.168.1.2 .

    http://lh4.ggpht.com/--pQc2dzX0n4/TjZb9nxHZ2I/AAAAAAAAGUw/rUJHZCSu698/s1600-h/image%25255B44%25255D.pnghttp://lh3.ggpht.com/-W4Ht-uTa_0Y/TjZb5qqmNwI/AAAAAAAAGUo/58m6BUOX0Wc/s1600-h/image%25255B40%25255D.png
  • 8/4/2019 How OSI 7 Layer Model Works

    6/9

    Physical Layer :

    This layer conveys the bit stream through the network at the electrical and mechanical level. Itprovides the hardware means of sending and receiving data on a carrier.

    The Physical Layer defines electrical and physical specifications for devices. In particular, itdefines the relationship between a device and a transmission medium, such as a copper oroptical cable.

    http://lh4.ggpht.com/-yKFZqVzmKLI/TjZcA1-2bFI/AAAAAAAAGU4/MZS-IeN-8ro/s1600-h/image%25255B49%25255D.png
  • 8/4/2019 How OSI 7 Layer Model Works

    7/9

    The major functions and services performed by the Physical Layer are:

    Establishment and termination of a connection to a communications medium.

    Participation in the process whereby the communication resources are effectively sharedamong multiple users. For example, contention resolution and flow control.

    Modulation, or conversion between the representation of digital data in user equipment

    and the corresponding signals transmitted over a communications channel.

    In short, Computer translates the signal and instructions into Binary language (0 or 1). Hardwaredevices understand Binary language (including computer device components , connectingcables)

    http://lh4.ggpht.com/-tGn7Y2G2LGo/TjZcED_9HKI/AAAAAAAAGVA/KnogrG80R1k/s1600-h/image%25255B68%25255D.png
  • 8/4/2019 How OSI 7 Layer Model Works

    8/9

    So, during transfer of data, various instructions and signals executed whichch converted intobinary language . Similarly, when we transfer data from our system to any other then transfertakes place through various components and leave through cable.

    Related Posts : General Awareness, General Discussion, Network and LAN Hacking

    Cyber Crime: Things You should know

    How OSI 7 Layer Model Works? Understanding OSI Layers

    I support Anna Hazare & Lokpal Bill Proposed by civil society. DO YOU ??

    What is CEF- Cisco Express Forwarding: Load-Balancing with Static Routing

    How Routing will be done in between RIPv1 & RIPv2 Routing Protocols

    How LSA Works with/without OSPF AREA 0 | Running OSPF without AREA 0 By Anuj

    Tyagi: Case Study

    OSPF LSA: OSPF LSA Types | Link-State Advertisement Basics

    What is OSPF Routing Protocol? OSPF Hidden FACTS Revealed

    How to configure Static VRRP over Cisco router

    Configure OSPF without AREA 0: CCNP OSPF Case Study

    http://www.amarjit.info/2010/11/cyber-crime-things-you-should-know_13.htmlhttp://www.amarjit.info/2010/11/cyber-crime-things-you-should-know_13.htmlhttp://www.amarjit.info/2011/08/how-osi-7-layer-model-works.htmlhttp://www.amarjit.info/2011/08/i-support-anna-hazare-lokpal-bill.htmlhttp://www.amarjit.info/2011/08/what-is-cef-cisco-express-forwarding.htmlhttp://www.amarjit.info/2011/07/how-routing-will-be-done-in-between.htmlhttp://www.amarjit.info/2011/07/how-lsa-works-withwithout-ospf-area-0.htmlhttp://www.amarjit.info/2011/07/how-lsa-works-withwithout-ospf-area-0.htmlhttp://www.amarjit.info/2011/07/ospf-lsa-ospf-lsa-types-link-state.htmlhttp://www.amarjit.info/2011/07/what-is-ospf-routing-protocol-ospf.htmlhttp://www.amarjit.info/2011/08/how-to-configure-static-vrrp-over-cisco.htmlhttp://www.amarjit.info/2011/07/configure-ospf-without-area-0-ccnp-ospf.htmlhttp://lh5.ggpht.com/-3KxcIua9Lkg/TjZcHGCeu9I/AAAAAAAAGVI/d8FT4uqblLY/s1600-h/image%25255B72%25255D.pnghttp://www.amarjit.info/2010/11/cyber-crime-things-you-should-know_13.htmlhttp://www.amarjit.info/2011/08/how-osi-7-layer-model-works.htmlhttp://www.amarjit.info/2011/08/i-support-anna-hazare-lokpal-bill.htmlhttp://www.amarjit.info/2011/08/what-is-cef-cisco-express-forwarding.htmlhttp://www.amarjit.info/2011/07/how-routing-will-be-done-in-between.htmlhttp://www.amarjit.info/2011/07/how-lsa-works-withwithout-ospf-area-0.htmlhttp://www.amarjit.info/2011/07/how-lsa-works-withwithout-ospf-area-0.htmlhttp://www.amarjit.info/2011/07/ospf-lsa-ospf-lsa-types-link-state.htmlhttp://www.amarjit.info/2011/07/what-is-ospf-routing-protocol-ospf.htmlhttp://www.amarjit.info/2011/08/how-to-configure-static-vrrp-over-cisco.htmlhttp://www.amarjit.info/2011/07/configure-ospf-without-area-0-ccnp-ospf.html
  • 8/4/2019 How OSI 7 Layer Model Works

    9/9

    Static Routing when point to point interfaces are on different subnet: Case Study

    What is SSL VPN Technology & How it Works: Basics of UTM & Corporate Security

    What is Hacker Emblem? A Universal Hacker Emblem: The Glider Emblem

    Want More Blog Traffic! Submit Your New Blog Here For Free

    Top Indian Hackers List: Indian Hackers Facts | Real Truth Revealed

    Website Defacement Proves You are Impotent

    Beware, Cyber Frauds are On Rise: How to Report & File a Complaint Against Hacker for

    Online Fraud & Scams

    Protect Your Mail from Spammers: How Spammers Get Your Email Address?

    What is Cloud Computing: Cloud Computing Basics Information

    Related Posts Widget[?]

    http://www.amarjit.info/2011/07/static-routing-when-point-to-point.htmlhttp://www.amarjit.info/2011/09/what-is-ssl-vpn-technology-how-it-works.htmlhttp://www.amarjit.info/2011/05/what-is-hacker-emblem-universal-hacker.htmlhttp://www.amarjit.info/2011/03/want-more-blog-traffic-submit-your-new.htmlhttp://www.amarjit.info/2011/04/real-hackers-of-india-indian-hackers.htmlhttp://www.amarjit.info/2011/04/website-defacement-proves-you-are.htmlhttp://www.amarjit.info/2010/12/beware-cyber-frauds-are-on-rise-how-to.htmlhttp://www.amarjit.info/2010/12/beware-cyber-frauds-are-on-rise-how-to.htmlhttp://www.amarjit.info/2011/04/protect-your-mail-from-spammers-how.htmlhttp://www.amarjit.info/2010/11/what-is-cloud-computing-cloud-computing_16.htmlhttp://widgetsforfree.blogspot.com/2009/01/related-posts-widget-for-blogger.htmlhttp://www.amarjit.info/2011/07/static-routing-when-point-to-point.htmlhttp://www.amarjit.info/2011/09/what-is-ssl-vpn-technology-how-it-works.htmlhttp://www.amarjit.info/2011/05/what-is-hacker-emblem-universal-hacker.htmlhttp://www.amarjit.info/2011/03/want-more-blog-traffic-submit-your-new.htmlhttp://www.amarjit.info/2011/04/real-hackers-of-india-indian-hackers.htmlhttp://www.amarjit.info/2011/04/website-defacement-proves-you-are.htmlhttp://www.amarjit.info/2010/12/beware-cyber-frauds-are-on-rise-how-to.htmlhttp://www.amarjit.info/2010/12/beware-cyber-frauds-are-on-rise-how-to.htmlhttp://www.amarjit.info/2011/04/protect-your-mail-from-spammers-how.htmlhttp://www.amarjit.info/2010/11/what-is-cloud-computing-cloud-computing_16.htmlhttp://widgetsforfree.blogspot.com/2009/01/related-posts-widget-for-blogger.html