Table of Contents
Windows adds and deletes temporary routes and permanent routes
Home System Tutorial Windows Series How to add temporary and permanent routes in Windows

How to add temporary and permanent routes in Windows

Feb 29, 2024 pm 12:01 PM
windows Temporary routing permanent routing

php editor Baicao will introduce you in detail how to add temporary routes and permanent routes in Windows systems. In network configuration, routing settings are a very important part, which can help us realize network data transmission and access control. In Windows systems, we can add temporary routes and permanent routes through the command line or graphical interface to meet different network needs. Next, let’s learn how to do it!

Windows adds and deletes temporary routes and permanent routes

1. Use the route command to add temporary routes

1、查看自己电脑IP地址(记录子网掩码和默认网关)   例:子网掩码:255.255.255.0    默认网关:192.168.50.1 2、将需要添加路由的地址套入该命令中   route add -p IP地址 mask 子网掩码 默认网关   例:route add -p 192.168.50.0 mask 255.255.255.0 192.168.50.13、以管理员身份运行CMD命令
Copy after login

How to add temporary and permanent routes in Windows

2. Use the route command to add Permanent routing

仿照以上步骤,临时路由命令中去掉“-P”,永久路由命令中保留“-P”例:route add 192.168.50.0 mask 255.255.255.0 192.168.50.1
Copy after login

How to add temporary and permanent routes in Windows

3. Use the route command to delete the route

仿照以上步骤,命令为route delete 192.168.50.0 mask 255.255.255.0 192.168.50.1
Copy after login

How to add temporary and permanent routes in Windows

4. Add static routing

First, enter "cmd" in the taskbar search box, then right-click "Command Prompt" in the options that appear, and select "Run as administrator".

In the command prompt window that opens, use the command in the following format to add a static route:

How to add temporary and permanent routes in Windows

For example, if the target network IP that needs to be added is 192.168 .1.0, the subnet mask is 255.255.255.0, and the gateway is 192.168.0.1, the command you need to enter is:

If you need a permanent static route, you need to add " after the above command -p" parameter, for example:

Note: These values ​​need to be replaced according to your actual network environment.

After entering the command, press the "Enter" key. If no error message appears, the static route was added successfully.

5. Query the routing table

You can query the routing table information through the command route print

C:\Users\Administrator>route print===========================================================================接口列表 11...00 ff a5 91 f3 9f ......Array Networks TAP-Windows Adapter  5...04 d9 f5 21 63 a2 ......Realtek PCIe GBE Family Controller  4...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1  6...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8  1...........................Software Loopback Interface 1===========================================================================IPv4 路由表===========================================================================活动路由:网络目标        网络掩码          网关       接口   跃点数          0.0.0.0          0.0.0.0    192.168.188.2   192.168.188.12    291          0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.8     35        127.0.0.0        255.0.0.0            在链路上         127.0.0.1    331        127.0.0.1  255.255.255.255            在链路上         127.0.0.1    331  127.255.255.255  255.255.255.255            在链路上         127.0.0.1    331
Copy after login

The above is the detailed content of How to add temporary and permanent routes in Windows. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I do if Beyond Compare fails to case sensitivity when synchronizing Windows and Linux files? What should I do if Beyond Compare fails to case sensitivity when synchronizing Windows and Linux files? Apr 01, 2025 am 08:06 AM

The problem of comparing and synchronizing BeyondCompare files: Case sensitivity failure when using Beyond...

Four ways to implement multithreading in C language Four ways to implement multithreading in C language Apr 03, 2025 pm 03:00 PM

Multithreading in the language can greatly improve program efficiency. There are four main ways to implement multithreading in C language: Create independent processes: Create multiple independently running processes, each process has its own memory space. Pseudo-multithreading: Create multiple execution streams in a process that share the same memory space and execute alternately. Multi-threaded library: Use multi-threaded libraries such as pthreads to create and manage threads, providing rich thread operation functions. Coroutine: A lightweight multi-threaded implementation that divides tasks into small subtasks and executes them in turn.

How to avoid third-party interfaces returning 403 errors in Node environment? How to avoid third-party interfaces returning 403 errors in Node environment? Apr 01, 2025 pm 02:03 PM

How to avoid the third-party interface returning 403 error in the Node environment. When calling the third-party website interface using Node.js, you sometimes encounter the problem of returning 403 error. �...

Where to download Python .whl files under Windows? Where to download Python .whl files under Windows? Apr 01, 2025 pm 08:18 PM

Python binary library (.whl) download method explores the difficulties many Python developers encounter when installing certain libraries on Windows systems. A common solution...

Why can't my code get the data returned by the API? How to solve this problem? Why can't my code get the data returned by the API? How to solve this problem? Apr 01, 2025 pm 08:09 PM

Why can't my code get the data returned by the API? In programming, we often encounter the problem of returning null values ​​when API calls, which is not only confusing...

How to efficiently read Windows system logs and get only information from the last few days? How to efficiently read Windows system logs and get only information from the last few days? Apr 01, 2025 pm 11:21 PM

Efficient reading of Windows system logs: Reversely traverse Evtx files When using Python to process Windows system log files (.evtx), direct reading will be from the earliest...

How to speed up the loading speed of PS? How to speed up the loading speed of PS? Apr 06, 2025 pm 06:27 PM

Solving the problem of slow Photoshop startup requires a multi-pronged approach, including: upgrading hardware (memory, solid-state drive, CPU); uninstalling outdated or incompatible plug-ins; cleaning up system garbage and excessive background programs regularly; closing irrelevant programs with caution; avoiding opening a large number of files during startup.

See all articles