当前位置:网站首页>Detailed explanation of IP address and preparation of DOS basic commands and batch processing
Detailed explanation of IP address and preparation of DOS basic commands and batch processing
2022-07-05 13:54:00 【Cwxh0125】
One . LAN
LAN : It's commonly known as the intranet
The composition of simple LAN : Switch , Ethernet cable ,pc
Switch : Set up the LAN equipment of the intranet
Router : Connect external network and internal network
Two .IP Address
IP An address is a unique identifier , It's a network code ( Binary system ), from 32 A composition .
After converting to dotted decimal : x.x.x.x x The scope of the 0-255
3、 ... and . Subnet mask
Yes IP There must be a subnet mask One IP The address must have a subnet mask
LAN communication rules : In the same LAN , all IP You must be in the same network segment to communicate
IP The composition of the address ; Network bit + Host bit ( The network bits are the same IP The address of is the same network segment )
Subnet mask : Used to determine IP Network bit of address
How the subnet mask determines the network bit : And 255 The corresponding number is network bit , And 0 The corresponding host bit
255.0.0.0
255.255.0.0
255.255.255.0
for example 10.1.1.1 255.255.0.0 Belong to 10.1.0.0 Network segment Name is .1.1.1 Network segment broadcast address :10.1.255.255
( When all host bits are set 0 Represents the network segment , Set all 255 Represents the broadcast address of the network segment )
What cannot be used here is that the host bits cannot be all 0 Or all 255, For example, if the subnet mask is 255.255.0.0 Words , that IP The address can be 10.1.1.255 perhaps 10.1.1.0, But not for 10.1.255.255 perhaps 10.1.0.0. Remember that with the subnet mask 0 The corresponding host bit .
International standards organization ISO Define address classification : Five categories
Four . How to match IP
Network properties ----> Internet agreement
Automatically acquired IP( Will change )
Manually configured IP( It won't change )
5、 ... and . gateway
gateway : An exit to the network Usually on the router
If several PC The device is in the same network segment , Even if the gateway is not configured ( Remove the gateway ), These devices can still communicate , But if you want to communicate with devices in the Internet , Then the gateway must be configured .
6、 ... and .DNS
Detailed see :
ping The goal is IP Address # Test network connectivity You can communicate if you go back and forth
ping -t The goal is IP Address # constantly ping
ping -n Numbers Destination address # modify ping The number of bags
Resolve the domain name manually
nslookup
-------------------------------------------------------------- Demarcation line ----------------------------------------------------------
basic DOS command
1. command :colorf0
help :color? effect : Change the background and font color
2. command :cls effect : Clear the screen
3. command :dir effect : Browse the contents of the current folder ( belt <dir> The identified folder is , Otherwise it's a document )
Other uses :dir Specify the path dird:\dird:\picdir/a# Browse everything , Including hidden content
4. command : Disk character : effect : Switch partitions , Such as :c:d:e:
5. command :cd.. effect : Exit the first level directory
6. command :cd Folder name function : Enter folder
7.Tab key : Complete the path function
8. command :cd\ effect : Go straight back to the root directory
9. command :md Folder [ Folder folder ...........]
10. command :rd Folder [ Folder folder ...........] effect : Delete empty folder command :rd Folder /s/q effect : Silent deletion of non empty folders
11. route : Relative paths : Valid for current path , Such as :...\456
Absolute path : Write the path from the root , Such as :\123\345
12. How to create a file :echo character string >>[ route \] file name . Extension
13. command :type file name . The extension works : Browse the contents of a file
14. command :del file name . The extension works : Delete file
del*.txt # Delete all txt Final document
del*.* # Delete all files
del*.*/s/q # Delete all files without prompting
15. Modify file or folder hidden attribute command :attrib+h Full file name / Folder name
# Hide files or folders
attrib+s+h Full file name / Folder name # Promoted to a file protected by the system
16.
copy route \ file name route \ file name : Copy a file to another place .
Moving files
move route \ file name route \ file name : Move a file ( It's cutting + Copy ) To another place .
17
Automatic shutdown command
Shutdown -s -t 60: Express 60 Turn off automatically in seconds
shutdown -a : Can cancel timed shutdown
Shutdown -r -t 60: Express 60 Automatic restart in seconds
shudowm -l : Cancellation
----------------------------------------------------- Demarcation line ----------------------------------------------------------------
Batch write
1. Batch processing is used to process each command in batches from top to bottom , Until the last one ( Whether the command is executed successfully or not The following commands will still be executed )
2. How to create a batch
Extension :.bat
Create method : Create a new notepad file , Then change the extension to .bat
Basic grammar
pause Pause
@echo off Close back display The execution process is not displayed
title effect : Set the title for the batch script
: and goto
: Define tag names goto Realize jump
A simple virus
Keep executing open cmd until CPU completely fill
边栏推荐
- PHP generate Poster
- Multi person cooperation project to see how many lines of code each person has written
- Hide Chinese name
- ETCD数据库源码分析——集群间网络层客户端peerRt
- 【云资源】云资源安全管理用什么软件好?为什么?
- Laravel framework operation error: no application encryption key has been specified
- PHP basic syntax
- Anchor navigation demo
- [South China University of technology] information sharing of postgraduate entrance examination and re examination
- Kafaka log collection
猜你喜欢
Can graduate students not learn English? As long as the score of postgraduate entrance examination English or CET-6 is high!
ELFK部署
昆仑太科冲刺科创板:年营收1.3亿拟募资5亿 电科太极持股40%
常见问题之PHP——Fatal error: Allowed memory size of 314572800 bytes exhausted...
What about data leakage? " Watson k'7 moves to eliminate security threats
Attack and defense world crypto WP
Interviewer soul torture: why does the code specification require SQL statements not to have too many joins?
Could not set property 'ID' of 'class xx' with value 'XX' argument type mismatch solution
【云资源】云资源安全管理用什么软件好?为什么?
锚点导航小demo
随机推荐
::ffff:192.168.31.101 是一个什么地址?
asp.net 读取txt文件
Solve the problem of "unable to open source file" xx.h "in the custom header file on vs from the source
Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications
Apicloud studio3 WiFi real machine synchronization and WiFi real machine preview instructions
Recommendation number | what are interesting people looking at?
LeetCode_67(二进制求和)
Resttemplate details
牛客网:拦截导弹
Jetpack compose introduction to mastery
Internal JSON-RPC error. {"code":-32000, "message": "execution reverted"} solve the error
Laravel generate entity
Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
UE源码阅读[1]---由问题入手UE中的延迟渲染
Why do I support bat to dismantle "AI research institute"
:: ffff:192.168.31.101 what address is it?
Controller in laravel framework
When there are too many input boxes such as input transmitted at one time in the form, the post data is intercepted
Solution to the prompt of could not close zip file during phpword use
网络安全-HSRP协议