[Ccna]-02-osi Reference Model and the corresponding relationship of the device

Source: Internet
Author: User
Tags switches

Introduction

OSI (open System interconnect), which is open systems interconnection. Commonly called the OSI Reference Model, is the network interconnection model that the ISO (International Organization for Standardization) organization studied in 1985, which gives you an introduction to the OSI Reference model and how the device works under this reference model.

Article Directory

0x1.iso/osi Reference Model and device relationships
A. Physical layers (physical layer)
B. Data Link Layer
C. Networking layer (Network)
D. Transport layer (Transport layer)
E. Session layer
F. Presentation layers (Presentation layer)
G. Application tier (Application layer)

0x1.iso/osi Reference Model and device relationships

This is a standard OSI seven-layer reference model, from bottom to top: physical layer, Data link layer, network layer, transport layer, Session layer, presentation layer, application layer;

The following will explain in this reference model, what level of our equipment is running, and this knowledge will be very helpful for future study.

A. Physical layers (physical layer)

The typical question for the physical layer is how to send 1 and 0, the duration of a bit, whether it can be done at the same time, how the connection is built and how it is terminated.

The devices that work on the physical layer are:

Repeater (Repeater): Twisted pair (RJ-45 Interface network cable) The theoretical maximum transmission distance is 100M, more than 100M signal will decay, this time to use the repeater, it can amplify the signal to extend the role of transmission distance.

Hub: The hub is equivalent to a multi-port repeater, can also play a role in amplifying the signal, and the hub is half-duplex mode (simple to understand that at the same time only one direction of the data can be transmitted, the receipt of the time can not be sent, when the hair is not accepted), and in the network of the hub connection, Regardless of the number of hubs, there is only one broadcast domain and one conflict domain. Hubs works like this:

Because the hub is a physical layer device and cannot judge the MAC address of the data link layer and the IP address of the network layer, in the network connected by this hub, assuming that the PC0 encapsulated data is sent to PC1, the hub receives the data from the PC0 and forwards it directly to all ports except the receive port. At this time PC1/3/4 can receive this data, but according to the information of the MAC address of the Baotou department, only PC1 will handle it, PC3/4 will discard this packet, and if the PC3/4 run the packet analysis software, you can capture and analyze PC0 sent data, This network topology design will be very insecure.

B. Data Link Layer

The main function of the data link layer is to reliably transmit the data on the unreliable physical layer, encapsulate the user data into frames, perform CRC validation (cyclic redundancy validation), and prevent the high-speed sender's data from flooding the low-velocity side.

The devices that work on the data link layer are mainly:

Network card (NIC network Interface card): Also known as an adapter, a unique network node address (MAC address) is burned into its ROM at production time. The MAC address occupies 48 bits, the first 24 represents the manufacturer, and the last 24 bits are the device number. MAC addresses can be changed by some software devices, but only the display, the MAC address in the ROM cannot be changed unless it is re-burned. The Windows system enters "Ipconfig/all" in CMD to see the MAC address of the network card, and the Linux system can enter "Ifconfig" in the terminal to view;
Bridge: Bridges can connect two local area networks (LANs) and forward data frames according to their MAC address, as if they were a LAN, and now the bridges are mostly used for software. Working principle such as:


1) If the network Bridge has just been power-up, its MAC address cache is empty, assuming a to send the data to C, And a already know the MAC address of C (which involves an ARP to get the MAC address of the operation, here for the time being not discussed), a to encapsulate the data sent to HUB1,HUB1 is a physical layer device, It simply amplifies the signal from a port other than the receive port to send the data (to interface 1 of C and Bridge);

2) when the bridge receives the data from interface 1, it first adds the source MAC address of the data frame. Both a Mac (AAAAAAAAAAAA) and the corresponding port 1 added to their MAC address table, and then from their MAC address table to find the data frame destination C MAC address, but not found at this time, so the bridge to broadcast the data frame from the interface 2 sent out;

3) Hub 2 receives this data frame, it sends the data frame from the other than the receive port, send out, D and B have received the data frame, d and B to check the data frame to find the destination MAC address is not the same as the MAC address of their network card, computer D and B dropped the data frame;

4) in the 1th step c also received this data frame, c check the destination MAC address when found, and the same, C receive this packet, and send back the packet to a to confirm, C package a source address for their MAC address, The destination address is a MAC address of the data frame sent to the Hub 1, the hub sends this data frame to the bridge interface 1 and A;

5) The bridge receives this data frame, it first adds C's Mac and corresponding interface 1 to its own MAC address table, Then query the Address table when the MAC address of A is also in the interface 1, the bridge will no longer send this data frame from the interface 2, nor will the data frame again from the interface 1 sent back;

6) A received the acknowledgement of C sent back, communication success;

7) in this form, Finally, the bridge learns the MAC address and interface of all the computers in this simple LAN. As follows:

MAC Address Port
Aaaaaaaaaaaa 1
bbbbbbbbbbbb 2
Cccccccccccc 1
Dddddddddddd 2

A network bridge contains two conflict domains, one broadcast domain, and the conflict domain is the range that is affected by sending a unicast, and the broadcast domain is the range that is affected by sending a broadcast.

Note: The network bridge does not have the characteristics of the three-layer device, which means that if the network Bridge to connect two different network segments of the LAN, the two LAN is unable to communicate, unless the default route in which to point to a three-tier device, this three-tier device needs to go to these two network segments of the route, Otherwise, when the computer sends data to other network segments, because the local routing table does not have a route for this segment, and no default route is configured, the data is discarded directly on the sending side.

Switch: You can simply view the switch as a multi-port bridge, because it also learns based on the source address of the received data frame, and also according to the Destination Address table in the MAC address, but the switch has the following points to note, see:

If this switch learns the MAC address table as follows:

MAC Address Port
Aaaaaaaaaaaa 1
bbbbbbbbbbbb 2
Cccccccccccc 3

One: The switch to the known unicast frame, only to the corresponding port, such as a to B, the switch to learn B's Mac, then directly to Port 2;
Second: The switch to the unknown unicast frame, the flood forwarding (that is, send to all ports except the receive port), such as C send a unicast frame to D, the data frame reached the switch, the switch Mac table has not learned to D's Mac, the switch will this data frame from 1, 2, 4 port;
Three: The switch floods all broadcasts and multicast (i.e., to all ports except the receive port);

Switches can be divided into the following three categories:

Traditional switch: belong to the link layer, a broadcast domain, each interface is a conflict domain;
VLAN switch: Belong to the link layer, can be managed type, can divide multiple VLANs, each VLAN is a broadcast domain, each interface is a conflict domain, and can configure IP address;
Layer three switch: more than VLAN-type switch routing function, can be understood as switch + router, belonging to the OSI model Network layer;

C. Networking layer (Network)

Routers and layer three switches are network-layer devices that are applied to devices between different network segments, and each port of the router belongs to a separate broadcast domain and is a separate conflict domain.

D. Transport layer (Transport layer)

The transport layer realizes the end-to-end communication between user processes (End-to-end), and the transport layer related protocols are TCP, UDP and so on. We will often see these two protocol names appear in the "Netstat-ano" command of Windows CMD, under Linux you can enter "NETSTAT-NAUTP" in the terminal to view these ports.

E. Session layer

The primary services provided by the session layer are session control, synchronization, retransmission, and so on.

F. Presentation layers (Presentation layer)

The main services provided by the presentation layer are encoding, compressing, encrypting and decrypting data.

G. Application tier (Application layer)

Application layer contains a large number of protocol applications, the most common are: Http-tcp80, Ftp-tcp21, Smtp-tcp25, pop3-tcp110, dns-tcp/udp53, telnet-tcp23 and so on.

[Ccna]-02-osi Reference Model and the corresponding relationship of the device

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.