当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > linux命令行(文本模式)下配置网络

Unix/Linux
ubuntu与windows远程连接的方法
在Ubuntu系统中文件进行加密传输
Unix 操作系统中处理字符串问题的简单方式
UNIX 操作系统复杂的关机过程
fedora phpMyAdmin 安装方法及介绍
Red Hat Enterprise Linux 4+Nginx 0.7.47+PHP5.2+MYSQL5.0+Memcache+eAccelerator收
CENTOS 系统的配置
CentOS 挂载NTFS分区的两种方法
CentOS Tomcat 的启动服务脚本
Centos5.2配置LAMP与Centos5.3配置LAMP
从技术产品市场角度阐述Linux操作系统的发展
rar for linux程序基本命令
LIDS功能:建立一个安全的Linux系统
如何来清除Linux系统命令的历史记录

Unix/Linux 中的 linux命令行(文本模式)下配置网络


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 62 ::
收藏到网摘: n/a

除了通用的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