Method for adding soft routes in Linux:
route add -net 172.16.6.0 netmask 255.255.255.0 gw 172.16.2.254 dev eth0/*
Add a network 172.16.6.0/24 After 172.16.2.254 eth0 *//* -net increase network -host increase host, netmask subnet mask, gw gateway, dev device, device, here is your network card name */route del gw 172.16.2.254 /* delete Default gateway 172.16.2.254 */route del -net 172.16.86.0/24 /* Delete the default network 172.16.86.0 */route /* Display the current routing table */commonly used this way, but sometimes you are deleting or a soft Routing will not work, what will be prompted: SIOCADDRT: can not contact the network, so this method can be used as follows.
Method 2 for adding soft routes in Linux:
The function is the same as above
ip route add 172.16.6.0/24 via 172.16.2.254 dev eth0 ip route Del gw 172.16.2.254 ip route del 172.16.6.0/24 dev eth0ip route
Method of deletion: Add route:
Here is the code snippet:
route add -net 10.0.0.0 netmask 255.0.0.0 dev eth0
Deleting Routes:
The following is a code snippet:
route del -net 10.0.0.0 netmask 255.0.0.0 dev eth0
Add default route:
Here is the code snippet
route add default gw 10.0.0.1
Delete default route:
Here is the code Fragment:
route del default gw 10.0.0.1
or
Here is the code snippet:
route del default
under linux Method of adding a route:
Adding a route using the route command
Adding a route using the route command, restarting the machine or restarting the network card By default, the method:
The following is a code snippet:
//Adding a route to the host
# route add –host 192.168.168.110 dev eth0
# route add –host 192.168.168.119 gw 192.168.168.1
//Adding routes to the network
# route add –net IP netmask MASK eth0
# Route add –net IP netmask MASK gw IP
# route add –net IP/24 eth1
//Add default gateway
# route add default gw IP
//Delete route
# route del –host 192.168.168.110 dev eth0
Set permanent route method under linux:
1. In /etc/Add
to rc.local The following is a code snippet:
route add -net 192.168.3.0/24 dev eth0 route add -net 192.168.2.0/24 gw 192.168.3.254
2. Add to the end of /etc/sysconfig/network
Method: GATEWAY=gw-ip or GATEWAY=gw-dev
3./etc/sysconfig/static-router :
Here is Code Snippet:
any net x.x.x.x/24 gw y.y.y.y
The method of adding soft routing in Linux should be able to master and understand, and we will continue to sort out relevant content for your reference.
Running live55 under linux shows the figure: not getting ip: ip is 0.0.0.0 live555 does not know th
6. Sfdisk & ndash; backup partition table If you install multiple systems, it can easily lead to
The use of X capacitors and Y capacitors, and their differences: 1. DC blocking 2. Bypass 3. Coupl
The most popular Linux operating system distribution is Ubuntu. But this time we are running ASP.N
Add a password to the Apache directory under the Linux operating system
The difference between tty and console and terminal
Linux.tar .gz .tgz .bz2 .bz and other solutions, pressure pack command detailed
Remote login to Windows XP desktop
WindowsXP shutdown failure full contact, Window XP operating system tutorial
The program does not have MySQL reports on the Linux server. Error
Linux system management and maintenance -gzip/gunzip command
How to install Perl scripting language under Linux operating system
Linux system management and maintenance -bzip2/bunzip2 command
Redistribution of IP addresses in Linux systems
17 new compatible apps for embedded Windows 7
LOL Musou Jiji Metal Equipment Series Skin Effects Show and Introduction
What should I do when Win7 runs the program to prevent the running window?
How to use the tray to mount quickly
Why does the computer always pop up the MacDrice 9 Pro installer
How Windows 7 Improves Nehalem Utilization
Win7 visual effects best set tutorial
Win8 can not connect to Microsoft account when switching accounts