route management
2010-07-05 11:30
99 查看
Note : All these command are executed on Command Prompt
View the IP routing table:
route print
Add a static IP route:
route add destination mask subnetmask gateway metric costmetric if interface
. . . . ..
. . . .
. . . ....................
. . .
. . .........................................
. .
. .........................................................
.
.................................................................................
destination : Specifies either an IP address or host name for the network or host.
subnetmask : Specifies a subnet mask to be associated with this route entry. If subnetmask is not specified, 255.255.255.255 is used.
gatway : Specifies either an IP address or host name for the gateway or router to use when forwarding.
costmetric : Assigns an integer cost metric (ranging from 1 through 9,999) to be used in calculating the fastest, most reliable, and/or least expensive routes. If costmetric is not specified, 1 is used.
interface : Specifies the interface to be used for the route that uses the interface number. If an interface is not specified, the interface to be used for the route is determined from the gateway IP address.
Remove a static route:
route delete destination
.
...... specifies either an IP address or network name for the remote TCP/IP host computer or network.
Examples:
Double NIC--- one is wireless which can connect to intenet and another is wired which connect to another local area network
route print
# you may see tow destination like 0.0.0.0 which is the default router nomally the computer can choose the one whos metric is smaller to your destination(like www.google.com or 138.138.1.48) but you can assign it exactly by follow bat script.
@echo off
rem filename : setRoute.bat
rem author : bydgod
rem date : 20100705
rem version : v0.0
rem remove the two default route
route delete 0.0.0.0
rem add a default route which connect to the internet (wireless NIC)
route add 0.0.0.0 mask 0.0.0.0 172.172.0.254
rem add a route to one IP(IP like 172.172.0.100 for example ) in your local area network (wired NIC) gateway is 192.168.1.1
route add 172.172.0.100 mask 255.255.255.255 192.168.1.1
cls & echo route set suc:-)
echo. & pause
View the IP routing table:
route print
Add a static IP route:
route add destination mask subnetmask gateway metric costmetric if interface
. . . . ..
. . . .
. . . ....................
. . .
. . .........................................
. .
. .........................................................
.
.................................................................................
destination : Specifies either an IP address or host name for the network or host.
subnetmask : Specifies a subnet mask to be associated with this route entry. If subnetmask is not specified, 255.255.255.255 is used.
gatway : Specifies either an IP address or host name for the gateway or router to use when forwarding.
costmetric : Assigns an integer cost metric (ranging from 1 through 9,999) to be used in calculating the fastest, most reliable, and/or least expensive routes. If costmetric is not specified, 1 is used.
interface : Specifies the interface to be used for the route that uses the interface number. If an interface is not specified, the interface to be used for the route is determined from the gateway IP address.
Remove a static route:
route delete destination
.
...... specifies either an IP address or network name for the remote TCP/IP host computer or network.
Examples:
Double NIC--- one is wireless which can connect to intenet and another is wired which connect to another local area network
route print
# you may see tow destination like 0.0.0.0 which is the default router nomally the computer can choose the one whos metric is smaller to your destination(like www.google.com or 138.138.1.48) but you can assign it exactly by follow bat script.
@echo off
rem filename : setRoute.bat
rem author : bydgod
rem date : 20100705
rem version : v0.0
rem remove the two default route
route delete 0.0.0.0
rem add a default route which connect to the internet (wireless NIC)
route add 0.0.0.0 mask 0.0.0.0 172.172.0.254
rem add a route to one IP(IP like 172.172.0.100 for example ) in your local area network (wired NIC) gateway is 192.168.1.1
route add 172.172.0.100 mask 255.255.255.255 192.168.1.1
cls & echo route set suc:-)
echo. & pause
相关文章推荐
- Route 53 Cloud DNS Management Tool: DNS30
- IP Route Management-超好文章
- linux ip-route - routing table management
- IP Route Management-超好文章
- Project Euler:Problem 86 Cuboid route
- 深入浅出之-route命令实战使用指南
- Business Rule Management With Drools
- HDU 2680 Choose the best route 超级起点 多源起点dijkstra
- hdu2680 Choose the best route 最短路,超级起点(多源Dijkstra算法,)
- hdoj 1599 find the mincost route【floyd+最小环】
- HDU 2680:Choose the best route【Dijkstra & SPFA】
- hdu-2680-Choose the best route(dijkstra)
- HDU 2680 Choose the best route <迪杰斯特拉算法>
- HDUOJ_2680(Choose the best route )(dijkstra)
- hdu 1599 find the mincost route(floyd 最小环)
- hdoj 1599 find the mincost route 【floyd + 最小环】
- ASP.NET MVC路由配置(转载自http://www.cnblogs.com/zeusro/p/RouteConfig.html )
- SharePoint 2013 IT Professional——New Feature(Work Management Service)
- angularjs ui-route
- Linux下常用的配置IP及route的命令汇编