在Redhat早期的版本中, 有linuxconf 、redhat-config-network 、netconfig 等工具;
在Redhat/Fedora 最新的版本有 system-config-network-tui (文本模式的) 、system-config-network (圖形模式的),netconfig(文本模式的)。
這些工具都會直接修改Linux系統中關于網絡接口的配置文件;這是 ifconfig 所不能比的;
其中 redhat-config-network 和system-config-network工具不僅僅是配置網卡的工具,還有配置ISDN和普通貓、ADSL的工具、網絡硬件的添加、主機名字的配置、DNS各客戶端的配置等。其實是一個工具組的集成;
這些工具比較簡單,以root權限運行命令就能調用,比如:
[root@localhost]# /usr/sbin/system-config-network
[root@localhost]# system-config-network
netconfig 工具是一個在文本模式比較好的工具,推薦大家使用;理由是這個工具在文本模式下,也有一個簡單的圖形界面;還有命令模式;
[root@localhost]# netconfig -d eth0 注:配置eth0
[root@localhost]# netconfig -d eth1 注:配置eth1
netconfig 的用法如下:
[root@localhost]# netconfig --help 注:幫助;
--bootproto=(dhcp|bootp|none) Boot protocol to use(
--gateway=STRING Network gateway(指定網關)
--ip=STRING IP address(指定IP地址)
--nameserver=STRING Nameserver(指定DNS客戶端)
--netmask=STRING Netmask(指定網絡掩碼)
--hostname=STRING Hostname( 指定主機名)
--domain=STRING Domain name(指定域名)
-d, --device=STRING Network device (指定網絡設備)
--nodns No DNS lookups (沒有DNS查詢)
--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