CCNA learning: OSI

ISO:  International Organization for Standardization
OSI: open system interconnection
7 Layer advantage:
1. Promote Standard Work, let different provider do develop;
2. Every layer is seperate to each other, divide the network into module, decrease the complex
3. Flexible, one layer change will not impact on others
4. Every layer has one port to communicate with other layers
7 Layer:
Application Layer         应用层:User Port, such as: Telnet, HTTP, FTP, SMTP
Presentation Layer       表示层:Encryption and Code Mode, such as: ASCII, JPEG, EBCDIC
Session Layer                会话层:Define the type of data stream, such as: Operation system
Transport Layer             传输层:Reliable or Unreliable Data Transfer Method, Error Correction, Such as: TCP, UDP, SPX
Network Layer               网络层:Choose the logical path, such as: IP, IPX
Data Link Layer             数据链路层:Combine the bit stream byte then, flame, MAC into physical address, Error detection, Such as: 802.3, 802.2
Physical Layer                物理层:Generate bit stream, Port type, such as: RJ45
all people seem to need data processing: A / P / S / T / N / D / P
please do not tell sales people anything: P / D / N / T / S / P / A

PDU: protocol data unit
Top Three layer: message
Transport layer: segment
Network layer: packet
Data-link layer: frame
Physical layer: bit
Transfer Process in 7 layers:
From bottem to top: Encapsulation封装
Example:
Top three layers: message
Transport layer:     TCP + message                                            segment
Network layer:       IP + TCP + message                                    packet
Data-link layer:     MAC + LLC + IP + TCP + message + FCS   frame
Physical layer:       0001010111101111                                     
From top to bottem: Unencapsulation
Physical Layer
Media type, Connect type, Signal type
Device: Hub,  Repeater(Enlarge signal)
Hub: (30% - 40% network bandwidth can be used by users)
all devices in same collision domain and broadcast domain,
all devices share same bandwidth
More devices, more collisions happened.
Collision: two points transfer data at the same time. the data met in physical device. both data destroy.
Collision domain: one range which allow share device;
Broadcast domain: the network range which broadcast frame can be transfered (always be controlled by router, router will not transfer broadcast signal)
ISO define collision: If collision happen, the source of the data which make collision will be baned for some time. 
After that, they will be allowed to send data again.
CSMA/CD:
Due to collisions, Ethernet network use CSMA/CD(carrier sense multiple access/collision detect) to solve the problem
Process:
Before device start to send out signal, it will check whether other devices are transfering signal.
If other devices are transfering signal, it will wait some time.
Otherwise, it will send out signal.
During sending out signal, it will also detect the network. If found other signal, it will send jam block signal.
Using CSMA/CD, the Ethernet is half duplex
Full duplex:two direction, each direction two lanes;
Half duplex:one direction, two lanes;
Simplex:one direction, one lane;
Data-link Layer
Source physical address;
Service Access Point;
Network Topo;
Frame Order;
Flow control;
Two sub layer:
MAC sub layer:
MAC: media access control
MAC Visit Control Method:
1. Competition: CSMA/CD; FCFS (first come, first service) --> reduce collision, still have
2. In turn: TOKEN                                                                  --> no collision
MAC Protocol:
802.3, 802.5, FDDI(fiber distributed data port)
LLC sub layer
LLC: logical link control
LLC Protocol: 802.2
SAP(Service Access Point) recognize the protocol of data from upper layer
Switcher and Bridge(software switcher)
(80% network bandwidth can be used by users)
Each device has own collision domain
All devices are in same broadcast domain
Network Layer
logical address;
define network path; IP/IPX
Router table: target network, port, distance
Router
broadcast control
multipoint message control
path optimization
devide the network 
flow control
logical address detection
WAN connection
Transport Layer
recognize upper application; 
establish port to port connection for application level;
flow control;
provide reliable(TCP) or unreliable(UDP) data transport method
Reliable data transport method
3-way handshake:
1. sending TCP SYN
2. sending TCP SYN ACK
3. sending TCP SYN
4. connected
Unreliable data transport method
connect without 3-way handshake
Differenct between devices
                                  HUB vs Bridge vs Switcher vs Router
Collision Domain      1            4                4                4
Broadcast Domain    1            1                1                4
Data Transferm Mode
Application Layer  --> Example: Get http://www.weibo.com
Presentation Layer -->Example: 0101101110..... (change the command into 01010...)
Session Layer         --> Example: Add session information
Transport Layer      --> Example: Add port of source computer and destination computer
Network Layer        --> Example: Add ip address of source computer and destination computer
Data Link Layer       --> Example: Add mac address of source computer and gateway computer

Comments

Popular posts from this blog

Nginx Proxy & Load Balance & LNMP

Snort+barnyard2+Snorby CentOS 6.5_64 Installation

ORACLE Error