Chinaunix

标题: suselinux设置主机路由和缺省路由 [打印本页]

作者: jian040907    时间: 2014-09-22 19:37
标题: suselinux设置主机路由和缺省路由
求suselinux下设置主机路由和缺省路由的方法。
作者: qq58945591    时间: 2014-09-22 20:44
man route

       route add default gw mango-gw
              adds a default route (which will  be  used  if  no  other  route
              matches).   All  packets  using  this  route  will  be gatewayed
              through "mango-gw". The device which will actually be  used  for
              that  route  depends on how we can reach "mango-gw" - the static
              route to "mango-gw" will have to be set up before.

EXAMPLES 1
route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.254

EXAMPLES 2
route add default gw 192.168.0.254
作者: yestreenstars    时间: 2014-09-22 23:59
仅供参考:
http://blog.chinaunix.net/uid-26669282-id-3972445.html
作者: chenyx    时间: 2014-09-23 10:40
yast里面设置下不行吗
作者: jian040907    时间: 2014-09-23 10:43
不行,因为是要在程序中调用,所以只能用命令行方式
作者: chenyx    时间: 2014-09-23 15:16
命令行下修改配置文件还是直接用命令行设置网卡ip?




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2