Chinaunix首页 | 论坛 | 博客
  • 博客访问: 16890
  • 博文数量: 11
  • 博客积分: 410
  • 博客等级: 下士
  • 技术积分: 105
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-04 21:16
文章分类

全部博文(11)

文章存档

2011年(1)

2008年(10)

我的朋友
最近访客

分类: LINUX

2008-05-07 12:14:20

除了通用的ifconfig外,对于Redhat/Fedora发行版,有专用的配置工具-netconfig。比较而言,netconfig可以设置IP获取方式(静态或者DHCP获取)等。
netconfig --help
Usage: netconfig [OPTION...]
  --bootproto=(dhcp|bootp|none)     Boot protocol to use
  --gateway=STRING                  Network gateway
  --ip=STRING                       IP address
  --nameserver=STRING               Nameserver
  --netmask=STRING                  Netmask
  --hostname=STRING                 Hostname
  --domain=STRING                   Domain name
  -d, --device=STRING               Network device
  --nodns                           No DNS lookups
  --hwaddr=STRING                   Ethernet hardware address
  --description=STRING              Description of the device
Help options:
  -?, --help                        Show this help message
  --usage                           Display brief usage message

实例一:设置网卡的DHCP模式自动获得IP
[root@localhost ~]# netconfig -d eth0 --bootproto=dhcp
实例一:手动设置网卡的IP等
[root@localhost ~]# netconfig -d eth0 --ip=192.168.1.33 --netmask=255.255.255.0  --gateway=192.168.1.1
阅读(329) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~