当前位置:网站首页>Network model and protocol
Network model and protocol
2022-07-26 03:24:00 【Pigs who love coriander】
A network model
One 、OSI Seven layer model
OSI Open System Interconnect Open Systems Interconnection model
effect : Reduce the complexity of network data communication , Easy troubleshooting
application layer
Providing applications / Software , The interface between people and the network
Provide data
The presentation layer
Responsible for data format conversion , Like compression / decompression 、 encryption 、 Decrypt
The session layer
Establish a conversation 、 Maintain conversation 、 Disconnect session
conversation : Identify the login identity of the client ( Log in )
Transport layer
Provide end-to-end communication , Identify different applications
Port number 1--65535
effect : Identify different programs
windows View the command of the port > netstat -an
The network layer
Typical equipment : Router
Provide network to network communication , The Internet --- Network segment
Provide routing , according to IP Address for routing
Data link layer
Typical equipment : Switch
Provide point-to-point communication
rely on MAC Address , Physical address
windows see MAC Address : ipconfig /all
Linux see MAC Address : ifconfig, ip addr show
The physical layer
Provide physical links
Two 、TCP/IP Five layer model
application layer 、 Transport layer 、 The network layer 、 Data link layer 、 The physical layer
3、 ... and 、 Typical protocol
application layer
1、http
Realization web The data transfer , Plaintext transmission
2、https
Realization web The data transfer , Ciphertext transmission
3、ftp
File transfer protocol , Implement data sharing
4、DNS
Realization IP Address 、 Host name resolution
5、ntp
Network time protocol , Time synchronization
6、snmp
Simple network management protocol , Implementation monitoring
7、ssh
Device remote connection , Ciphertext transmission ; Suitable for connecting to the server
8、telnet
Device remote connection , Plaintext transmission ; It is suitable for connecting network devices in LAN
Transport layer
One 、TCP Transmission control protocol
1、 Connection oriented protocol
Before sending data between hosts , Need to establish TCP Connect , After the connection is completed, the real data will be sent , After the data is sent , The connection between hosts will be disconnected
TCP The connection is two-way
Three handshakes , Establishing a connection
(a) host A Host computer B Send with SYN Logo data , Indicates a request to establish a connection
(b) host B Host computer A Send with ACK, SYN Logo data , Agree to establish a connection 、 towards A Send a connection request
(c) host A Host computer B Send with ACK Logo data , Consent and B Establishing a connection
2、 A reliable agreement
(a) Retransmission timer
(b) Sliding window mechanism , flow control , Avoid network congestion
Two 、UDP User datagram protocol
1、 No connection protocol
2、 An unreliable agreement
see TCP Protocol related ports
[[email protected] ~]# netstat -antp
see UDP Protocol related ports
[[email protected] ~]# netstat -anup
The network layer
One 、IP Internet Protocol Internet Protocol
Two 、ICMP agreement
Internet control message protocol , Test network connectivity ;
ping Tools
ping Tool use :
-c Appoint ping The number of times
-s Appoint ping Packet size
[[email protected] ~]# ping -s 4000 -c 5 192.168.65.1
3、 ... and 、IGMP agreement
Implement multicast
Four 、ARP agreement
Address resolution protocol
effect : according to IP The address for MAC Address
Four 、 Data encapsulation
application layer : Generate data
Transport layer : TCP/UDP Headlines
Source port , For requesting data , It's usually >1024 The random port of
Destination port
The network layer : IP Headlines
Source IP Address
Purpose IP Address
Data link layer : MAC Frame head
Source MAC Address
Purpose MAC Address
5、 ... and 、 Static routing
Add route
route add -net Destination segment gw Next hop address
[[email protected] ~]# route add -net 192.168.2.0/24 gw 192.168.3.2
[[email protected] ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 ens33
192.168.2.0 192.168.3.2 255.255.255.0 UG 0 0 0 ens37
192.168.3.0 0.0.0.0 255.255.255.0 U 100 0 0 ens37
Enable routing and forwarding
[[email protected] ~]# echo 1 > /proc/sys/net/ipv4/ip_forward
[[email protected] ~]# cat /proc/sys/net/ipv4/ip_forward
1
Set up Linux The host starts in character mode by default
[[email protected] ~]# systemctl set-default multi-user.target
边栏推荐
- 实现一个方法,找出数组中的第k大和第m大的数字相加之和
- Is the galaxy VIP account opened by qiniu safe?
- 【TensorFlow&PyTorch】图像数据增强API
- CMD CPM command summary
- [Yuri crack man] brings you easy understanding - deep copy and shallow copy
- Cloud native guide what is cloud native infrastructure
- tf.truncated_normal()用法
- DDD landing is called an advanced
- Offline data warehouse from 0 to 1-stage II software installation
- els 初始化窗口类
猜你喜欢

LeetCode·83双周赛·6128.最好的扑克手牌·模拟

There are a group of students in the class who have got the test results in Chinese and mathematics. Please select the students whose total score is the first

论文精读-YOLOv1:You Only Look Once:Unified, Real-Time Object Detection

PHP连接mysql数据库,数据库连接静态工具类,简化连接。

DDD landing is called an advanced

Digital commerce cloud DMS dealer management system solution: DMS system realizes business Omni channel and sales data collection

UDP和TCP可以使用同一个端口吗?

Implement a method to find the sum of the number k and m in the array

QT notes - temporary floating window

MPLS basic experiment configuration
随机推荐
Leetcode · daily question · sword finger offer | | 115. reconstruction sequence · topological sorting
Performance comparison of ext4, NTFS, XFS, Btrfs, ZFS, f2fs and ReiserFS
[stl] priority queue priority_ queue
Opencv报错:(parameter or structure field))Unrecognized or unsupported array type in functon ‘cvGetMat‘
canvas——绘制文本——饼图的修改
Summary of Huawei virtualization fusioncompute knowledge points
图解LeetCode——5. 最长回文子串(难度:中等)
经典面试问题——OOP语言的三大特征
CMD CPM command summary
Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)
2022-07-21 第四小组 修身课 学习笔记(every day)
ByteDance (Tiktok) software test monthly salary 23K post, technical two-sided interview questions are newly released
Etcdv3 actual combat (III) -prevkv description and related operations
ELS register window class, create window class, display window
使用VRRP技术实现网关设备冗余,附详细配置实验
Istio三之VirtualService、Gateway、DestinationRule配置使用
2022-07-21 group 4 polymorphism
Get twice the result with half the effort: learn the web performance test case design model
Use VRRP technology to realize gateway equipment redundancy, with detailed configuration experiments
UE4 how to render statically? 5 steps to generate static rendering