鸿翔塑业 發表於 2019-6-30 12:14:00

Redhat/Fedora 或类似系统, 配置网络的工具介绍

<p>在Redhat早期的版本中, 有linuxconf 、redhat-config-network 、netconfig 等工具; 在Redhat/Fedora 最新的版本有 system-config-network-tui (文本模式的) 、system-config-network (图形模式的),netconfig(文本模式的)。</p>
<p>这些工具都会直接修改Linux系统中关于网络接口的配置文件;这是 Linux ifconfig 所不能比的; 其中 redhat-config-network 和system-config-network工具不仅仅是配置网卡的工具,还有配置ISDN和普通猫、ADSL的工具、网络硬件的添加、主机名字的配置、DNS各客户端的配置等。其实是一个工具组的集成;</p>
<p>这些工具比较简单,以root权限运行命令就能调用,比如:</p>
<ol>
<li>#&nbsp;/usr/sbin/system-config-network &nbsp;</li>
<li>#&nbsp;system-config-network&nbsp;&nbsp;</li>
</ol>
<p>如果您设置了可执行命令的环境变量,不用加路径就可以运行,但前提是您得安装这个网络管理工具; 不过值得一说的是netconfig 工具是一个在文本模式比较好的工具,推荐大家使用;理由是这个工具在文本模式下,也有一个简单的图形界面;还有命令模式;功能强着呢;</p>
<ol>
<li>#&nbsp;&nbsp;netconfig&nbsp;-d&nbsp;eth0&nbsp;&nbsp;注:配置eth0&nbsp; &nbsp;</li>
<li>#&nbsp;&nbsp;netconfig&nbsp;-d&nbsp;eth1&nbsp;&nbsp;注:配置eth1&nbsp;&nbsp;</li>
</ol>
<p>4.23 Redhat/Fedora系统中的netconfig 特别介绍;</p>
<p>netconfig这个工具,在Redhat/Fedora 或类似于它们的系统中都是存在的,这个工具比较强大。所以特别介绍一下。但在Slackware中netconfig是TEXT模式下有一个图形模式,但不能象Linux ifconfig一样用命令来操作网卡接口;</p>
<p>netconfig 的用法如下:</p>
<ol>
<li>#&nbsp;netconfig&nbsp;--help&nbsp;&nbsp;注:帮助; &nbsp;</li>
<li>&nbsp;&nbsp;--bootproto=(dhcp|bootp|none)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Boot&nbsp;protocol&nbsp;to&nbsp;use( &nbsp;</li>
<li>&nbsp;&nbsp;--gateway=STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Network&nbsp;gateway(指定网关) &nbsp;</li>
<li>&nbsp;&nbsp;--ip=STRING&nbsp;&nbsp;&nbsp;IP&nbsp;address(指定IP地址) &nbsp;</li>
<li>&nbsp;&nbsp;--nameserver=STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nameserver(指定DNS客户端) &nbsp;</li>
<li>&nbsp;&nbsp;--netmask=STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Netmask(指定网络掩码) &nbsp;</li>
<li>&nbsp;&nbsp;--hostname=STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hostname(&nbsp;指定主机名) &nbsp;</li>
<li>&nbsp;&nbsp;--domain=STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Domain&nbsp;name(指定域名) &nbsp;</li>
<li>&nbsp;&nbsp;-d,&nbsp;--device=STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Network&nbsp;device&nbsp;(指定网络设备) &nbsp;</li>
<li>10. &nbsp;&nbsp;--nodns&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No&nbsp;DNS&nbsp;lookups&nbsp;(没有DNS查询) &nbsp;</li>
<li>11. &nbsp;&nbsp;--hwaddr=STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ethernet&nbsp;hardware&nbsp;address&nbsp;(指定网卡的物理地址) &nbsp;</li>
<li>12. &nbsp;&nbsp;--description=STRING&nbsp;&nbsp;&nbsp;&nbsp;Description&nbsp;of&nbsp;the&nbsp;device&nbsp;(描述性文字) &nbsp;</li>
</ol>
<p>13. Help&nbsp;options:&nbsp;(帮助选项) &nbsp;</p>
<ol>
<li>14. &nbsp;&nbsp;-?,&nbsp;--help&nbsp;&nbsp;&nbsp;&nbsp;Show&nbsp;this&nbsp;help&nbsp;message &nbsp;</li>
<li>15. &nbsp;&nbsp;--usage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Display&nbsp;brief&nbsp;usage&nbsp;message&nbsp;&nbsp;</li>
</ol>
<p>实例一:设置网卡的DHCP模式自动获得IP # netconfig -d eth0 --bootproto=dhcp</p>
<p>实例一:手动设置网卡的IP等 # netconfig -d eth0 --ip=192.168.1.33 --netmask=255.255.255.0&nbsp; --gateway=192.168.1.1</p><br><br>
来源:https://www.cnblogs.com/fanweisheng/p/11109309.html
頁: [1]
查看完整版本: Redhat/Fedora 或类似系统, 配置网络的工具介绍