linux 默认网关自动消失,route add default gw 添加默认网关,重起后消失
this.p={ m:2,
b:2,
loftPermalink:'',
id:'fks_081065084081084068086094085095086085083071085081086',
blogTitle:'route add default gw 添加默认网关,重起后消失',
blogAbstract:'
在SUSE 下,我们可以很方便的使用YAST命令配置IP,默认网关DNS等.但在CENTOS下是没有YAST命令的,在使用route add default gw 添加默认网关重启服务器后,配置信息会消失.有两种解决的办法\r\n
1.写到/etc/rc.local中(这个文件是个链接文件,实际上是/etc/rc.d/rc.local
route add default gw 192.168.1.2
2.写到网卡的配置文件里[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
加入
GATEWAY=192.168.1.2',
blogTag:'route,add,default,gw,默认网关消失,配置信息消失',
blogUrl:'blog/static/23241702010622114140935',
isPublished:1,
istop:false,
type:0,
modifyTime:0,
publishTime:1279813300935,
permalink:'blog/static/23241702010622114140935',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
vote:{},
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
mcon:'',
srk:-100,
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:true,
hostIntro:'激情成就梦想',
hmcon:'0',
selfRecomBlogCount:'0',
lofter_single:''
}
{list a as x}
{if !!x}
{if x.visitorName==visitor.userName}
{else}
{/if}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
{/if}
${fn(x.visitorNickname,8)|escape}
{/if}
{/list}
{if !!a}
${fn(a.nickname,8)|escape}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{/if}
{list a as x}
{if !!x}
推荐过这篇日志的人:
{list a as x}
{if !!x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
{if !!y}
{/if}
{list a as x}
{if !!x}
{list a as x}
{if !!x}
{list a as x}
{if !!x}
{list a as x}
{if x_index>4}{break}{/if}
{if !!x}
${fn1(x.title,60)|escape}${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{/if}
{/list}
{list a as x}
{if !!x}
{if !!(blogDetail.preBlogPermalink)}
网易新闻
${headlines.title|escape}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
被推荐日志
最新日志
该作者的其他文章
博主推荐
随机阅读
首页推荐
{list a as x}
{if !!x}
${x.nickName|escape} 投票给
{var first_option = true;}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if} “${b[voteToOption_index]}”
{/if}
{/list}
{if (x.role!="-1") },“我是${c[x.role]}” {/if}
${fn1(x.voteTime)}
{if x.userName==''}{/if}
{/if}
{/list}
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)