Chinaunix首页 | 论坛 | 博客
  • 博客访问: 104339
  • 博文数量: 15
  • 博客积分: 384
  • 博客等级: 一等列兵
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-02 13:28
文章分类

全部博文(15)

文章存档

2012年(3)

2011年(12)

我的朋友

分类: 系统运维

2011-06-02 13:14:51

配置网卡IP:
ifconfig   <网卡名称>   <子网掩码>
ifconfig   <网卡名称>   down  //关闭网卡
ifconfig   <网卡名称>   up       //启动网卡
示例:
ifconfig  em1  192.168.1.2  255.255.255.0
ifconfig  em1  down
ifconfig  em1  up
配置路由:
route  add  网络号/掩码  网关
示例:
route  add 192.168.2.0/24  192.168.1.1
开启自启动配置:
vi /etc/rc.conf
   ifconfig_em1="inet" 192.168.1.2 netmask 255.255.255.0
   route add 192.168.2.0/24 192.168.1.1
   defaultrouter= “ 192.168.1.254 ”         //默认路由
删除路由配置:
route delete default                               //删除默认路由
 netstat -r                                                //查看本机路由表 
阅读(1264) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:DNS服务器维护命令

给主人留下些什么吧!~~