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

Unix/Linux
Linux 开机程序之研讨
RedHat Linux口令恢复任我行
Linux简明系统维护手册(五)
Linux简明系统维护手册(一)
Linux简明系统维护手册(二)
Redhat9.0 下DNS配置笔记
在Linux下建立强大的FTP搜索引擎(二)
LINUX学习笔记--FTP服务器设置篇
Linux网络安全之经验谈(1)
Linux网络安全之经验谈(2)
Linux网络安全之经验谈(3)
Linux网络安全之经验谈(4)
Linux网络安全之经验谈(5)
制作Linux启动盘的四种方法
教你十种提高Linux系统安全性的招数
Linux/Unix环境下的make命令详解
Linux中轻松使用USB移动存储器
Linux上安装GCC编译器过程
Linux中文件查找方法大全
通过COM口管理Linux服务器

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 141 ::
收藏到网摘: 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