当前位置:网站首页>Hcip notes (1)
Hcip notes (1)
2022-07-18 02:57:00 【sysddyq】
OSI Seven layer reference model
machine language : use 0,1 To represent electrical signals
Abstract language : written words , voice , picture , Video and other things that human beings can understand
The conversion process : Abstract language ——> code ——> Binary system ——> Electrical signals
By adopting protocols ( A standard established ) Use a certain application to obtain a certain service
application layer Provide all kinds of services , Convert abstract language to coding , Provide human-computer interaction interface
The presentation layer Convert the encoding to binary , Unified format
The session layer Maintain session links between web applications and web servers —— There is no standard ( for example :qq Number , Game nicknames and so on )
The top three , Process parts of the data for the application , Collectively referred to as the data application layer , Write the program on the upper three levels
Transport layer Realize end-to-end communication ( Application to application communication , Differentiate applications )
Port number 16 Bit binary structure ,0~65535, True for 1~65535. among 1~1023 Indicates the port ( Static port ) Used to calibrate known application services ;1024-65535 Dynamic port , High port
When the terminal communicates with the server , Use the random high port to correspond to the local process number , Use the indicated static port to mark the specific service accessing the server . The core function of the port number is to distinguish the process of the local device and the specific services of the server
Some common port numbers
FTP File transfer protocol TCP 20( To transmit data , file )/21( Transmission command, etc )
SSH Telnet Protocol TCP 22
telnet Telnet Protocol TCP 23
DNS Domain name resolution protocol TCP/UDP 53
DHCP Dynamic Host Configuration Protocol UDP 67( Server port )/68( Client port )
TFTP Simple file transfer protocol UDP 69
HTTP Hypertext transfer protocol TCP 80
HTTPS HTTP+SSL( Secure encryption protocol )TLS TCP 443
Data segmentation
Data segmentation ( suffer MTU Limit ,MTU The data transmission unit is , Maximum 1500), Network transmission is intermittent , When data packets become continuous, it will affect other discontinuous packets , The delay gets higher , The packet is broken and needs to be retransmitted , The big bag needs to be segmented
The network layer Use IP Address to realize logical addressing between hosts
Get the target IP Methods
1, Know the server directly IP Address
2, Access the server through the domain name
3, Access the server through the application
4, Get... Via broadcast
IP Address
IPV4——32 Bit binary structure ( dotted decimal ) IPV6——128 Bit binary structure ( It's hexadecimal )
Distinguish between different broadcast domains
Network bit The network bits are the same , It means that it is in the same broadcast domain
Host bit In the same broadcast domain , Use the host bit to distinguish different hosts
Subnet mask to distinguish between network bits and host bits , Continuous 1 And continuous O form ,1 On behalf of network bit ,0 Represents the host bit
A,B,C For unicast address ( Can be source IP Or target IP)
A:255.0.0.0 B:255.255.0.0 C:255.255.255.0
D For multicast address ( As a goal IP)
E To keep the address
A:0XXX XXXX(0~127) 1~126 B:10XX XXXX(128-191) C:110X XXXX(192~223) D:1110 XXXX(224~239) E:1111 XXXX(140~255)
Unicast is one-to-one , Multicast is one to many ( The same multicast group ), Broadcast a bunch of all ( All in the broadcast domain )
stay IP In the address space , Part of it IP The address is called private IP Address ( The private network IP Address ), The rest is called public IP Address ( Public network IP Address )
A: 10.0.0.0 - 10.255.255.255 amount to 1 individual A Class segment
B: 172.16.0.0 - 172.31.255.255 amount to 16 individual B Class segment
c: 192.168.0.0 - 192.168.255.255 amount to 256 individual c Class segment
special IP Address
127.0.0.1 -127.255.255.254 Loopback address ( Test whether there is a problem at the software level )
255.255.255.255 Restricted broadcast address ( Restricted by router , Only as a target IP)
All the hosts 1 192.168.1.255/24 Direct address ( Only as a target IP)
All the hosts 0 192.168.1.0/24 Network segment
0.0.0.0 No, IP Address ; all IP Address
169.254.0.0/16 Local link address / Automatic private address
VLSM Variable length subnet mask
CIDR No inter domain routing
Take the same , Go different
HYPERNET The subnet mask is greater than the type subnet mask
Summary The subnet mask is smaller than the type subnet mask
Data link layer Control physical hardware , Convert binary to electrical signal , Need to pass through MAC Address for physical addressing ,48 Bit binary structure ( Global unity , use the same pattern )
Get the target MAC Address method (arp agreement ( Address resolution protocol )
positive ARP adopt IP The address for MAC Address
The host sends... In the form of broadcast ARP request , Based on the known IP Address , request MAC Address , All devices in the broadcast domain can receive request packets , All devices that receive packets will record the source in the packet IP Address and source MAC The correspondence of the address is related to the local ARP The cache table . after , Look at the request IP Address , If it's local IP Address , Will be performed ARP The reply , Local MAC Address inform . If it's not local IP Address , The packet will be discarded directly . after , When sending data again , Give priority to local ARP Cache table , If there are records in the table , Then the information will be sent directly according to the record , If there is no record , Then send ARP Request package acquisition MAC Address .
reverse ARP adopt MAC The address for IP Address
free ARP Use positive ARP How it works ask yourself IP Address ( Check for address conflicts and let others get their own IP Address )
The physical layer Process and transmit electrical signals
TCP/IP Model
CP/IP Protocol cluster ( The aggregation of rules . There is an agreement first , Then draw lessons from the idea of layering )
application layer
The network layer
The network layer
Network interface layer ( Data link layer , The physical layer )
TCP/IP The standard model —— Four layer model TCP/IP peer model —— Five layer model
PDU Protocol data unit
OSI in :L1PDU......L7PDU( From top to bottom )
TCP/IP in : The data packet , Data segment , Data packets , Data frame , Bit stream
Encapsulation and de encapsulation
application layer —— There is encapsulation in the application layer , Depending on the application
Transport layer —— Port number
The network layer ——IP Address
Data link layer —— Ethernet is MAC Address
The physical layer
TCP/IP Support cross layer encapsulation ,OSI Cross layer encapsulation is not supported
Cross four layer packaging Between routers OSPF(89)
Span three , Four layer package Between switches STP
Forerunner Frame header delimiter 802.2 Header and Data(LLC Logical link control layer ) contain DSAP( Indicate what protocol the upper layer of the device receiving the data frame uses to process the data ),SSAP( Indicates the protocol generated by the upper layer of the device that sends the data frame ),control(1. Connectionless mode 2. Connection oriented pattern . It can realize the segmentation and reorganization of data packets )
Generally, it is used to send information between devices connected directly at a short distance , It can improve forwarding efficiency
Generation conditions of direct route : Both physical level and protocol level UP; The interface must be configured IP Address
Get unknown route information of network segment
Static routing : Routing entries manually configured by the network administrator
Dynamic routing : All routers run the same routing protocol , after , Routers communicate with each other , Exchange and calculate the routing information of the unknown network segment .
Static routing
advantage : The choice of route is more reasonable ; safer ; No additional resources are required
shortcoming : Large amount of configuration ; Static routing cannot automatically converge based on changes in topology
Basic configuration
Method 1 :[r1]ip route-static 192.168.3.0 24 192.168.2.2---- You need to recursively find the interface
Method 2 :[r1]ip route-static 192.168.3.0 24 GigabitEthernet 0/0/1 --- Write the interface directly [r2-GigabitEthernet0/0/0]arp-proxy enable --- The activation agent ARP
After activation , The router will check the received ARP Request package , be based on ARP Requested IP Address view local routing table , If the local route can reach , Will pretend to be the other party's IP Address reply ARP The reply . To his own MAC Address reply , after , The data is sent to the router , The router forwards .
Method 3 :[r1]ip route-static 192.168.3.0 24 GigabitEthernet 0/0/1 192.168.2.2 Recursive lookup is not required
Static route expansion
Load balancing
When a router accesses the same target with multiple paths with similar overhead , You can split the traffic and take multiple paths at the same time , Play the effect of superimposing bandwidth .
Manual summary
When a router can access multiple consecutive subnets , If they all pass the same next jump , These network segments can be summarized and calculated , Directly write a static route to the summary network segment . You can reduce the number of routing table entries , Improve forwarding efficiency .
Routing black holes
In summary , If the network segment that does not actually exist in the network is included , It may cause the flow to have no return , Waste link resources . Reasonable division and aggregation can reduce the generation of routing black holes
Default route
A route that does not limit the destination . When looking up the table , If all routes do not match , The default route will be matched .
[r1]ip route-static 0.0.0.0 0 12.0.0.2
Empty interface routing
Empty interface routing ---- Prevent routing black holes and default routes from meeting and leaving the ring . 1,NULL 0 --- If the outgoing interface of a route entry points to an empty interface , The datagram matching this route information will be discarded 2, Matching principle of routing table --- The longest match principle ( The principle of exact match , Match the longest subnet mask )
[r1]ip route-static 192.168.0.0 22 NULL o
Floating static routing
By modifying the default priority of static routing , Achieve the effect of backup
[r2]ip route-static 192.168.0.0 22 21.0.0.1 preference 61
边栏推荐
- The No.1 port and shipping AI enterprise in the world integrates Feitong, port and shipping AI products are mature, standardized and applied on a large scale, and advanced core technologies greatly im
- 相關小知識點
- Ignore, on duplicate key update, delayed in MySQL
- 558. 四叉树交集 / 剑指 Offer II 118. 多余的边
- pygame快速入门
- 51nod 1413 权势二进制
- Mqtt--- connect connection
- Fragment (IV) common problems
- 数字格式化
- 基于eTS高效开发HarmonyOS课程类应用
猜你喜欢

How can im make enterprise telecommuting simpler and more efficient?

Adding an index by Oracle causes other users to lose their query permissions on this table

2022-04-21 unity entry 8 - sound system

HCIP回顾(2)

Zhiyuan community weekly 89: Yann Lecun and other writers responded to Marcus' symbolic reasoning debate; Zhu Songchun's new work of aligning AI value with science's official website headlines; Ma Yi,

Redis uses pipeline

Bc20 at command test

昇腾AI创新大赛两大赛道怎么选?拿好这篇攻略就够了!

03 按键控制LED

07 printf重定向
随机推荐
ESP32的串口通信(以中断和看门狗的方式进行)
umi 3.0模版
相關小知識點
第九十八期:Flutter学习(一)
How can im make enterprise telecommuting simpler and more efficient?
Valuing space over safety, Highlander and link 09, who do you choose
Alibaba cloud Internet of things platform construction
1、OLED简单驱动
Ignore, on duplicate key update, delayed in MySQL
顺序表
XPath Combat: climbing the learning ape land (Part 2)
第八十九期:对Pinia的简单思考
Envoyez votre code dans l'espace et développez "le plus grand travail" avec Huawei Cloud
昇腾AI创新大赛两大赛道怎么选?拿好这篇攻略就够了!
【流放之路-第一章】
torch.max()和numpy.max()使用辨析
BC20 AT指令测试
51nod 1102 面积最大的矩形
Google proposes the reliability machine learning model plex: let the large model put forward appropriate prediction results for out of distribution data
Bc20 at command test