作者:北南南北
来自:LinuxSir.Org

提要:本文主要介绍Fedora Core 系统中的网络配置工具system-config-network,帮助初学者如何学会配置网络,以及如何设置非路由adsl拔号等;


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
正文:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

操作环境:Fedora Core 4.0 ;


一、配置网络的工具system-config-network;

1、Fedora Core 网络配置工具system-config-network

本工具分为图形模式和文本命令模式

[root@localhost beinan]# rpm -qa |grep system-config-network
system-config-network-tui-1.3.26-1 注:这个是图形化的工具;
system-config-network-1.3.26-1   注:这个是文本化的工具;

首先查询一下看是否已经安装好这个软件包,如果没有安装,从安装盘中找出这两个包安装上;

[root@localhost beinan]#rpm -ivh system-config-network*

图形化工具主要是通过如下命令调用:

[root@localhost beinan]# /usr/bin/internet-druid  
[root@localhost beinan]# /usr/bin/neat
[root@localhost beinan]# /usr/bin/neat-control 注:网络设置控制器;是图形化的
[root@localhost beinan]# /usr/bin/system-config-network-druid
[root@localhost beinan]# /usr/bin/system-control-network
[root@localhost beinan]# /usr/sbin/internet-druid  注:这个是配置internet的工具;
[root@localhost beinan]# /usr/sbin/neat    注:neat 是配置网络的工具,包含量配置internet的工具比如ADSL等;
[root@localhost beinan]# /usr/sbin/system-config-network-druid 注:是neat的一部份
[root@localhost beinan]# /usr/sbin/system-config-network-gui  注:同neat

文本模式的调用:和图形界面的差不多;

[root@localhost beinan]# /usr/bin/system-config-network
[root@localhost beinan]# /usr/bin/system-config-network-cmd
[root@localhost beinan]# /usr/sbin/neat-tui
[root@localhost beinan]# /usr/sbin/system-config-network
[root@localhost beinan]# /usr/sbin/system-config-network-cmd
[root@localhost beinan]# /usr/sbin/system-config-network-tui

其实您用neat 工具,足可以把网络配置起来,这是图形界面的;如果您想用text模式来配置,应该用 system-config-network-tui;

2、如何用图形化网络配置工具;

[root@localhost beinan]#neat

在这里您可以添加网卡,也可以编辑现有的网络设备;也可以添加adsl的拔号等;看以下一系列的图;

您可以点击[新建]来添加设备;比如网卡和ADSL等;

如果您是通过路由器或者其它机器上网,并且是DHCP自动获取IP的,您可以选择DHCP;如果您是通过pppoe拔号上网的,您可以指定网卡的IP;但不要设置网关;

配置ADSL的用户名和密码:网络提供商应该给了;比如电信、网通或者铁通,至于提供商的名称可以我们自己来随便设置一个就行;用户名和密码要确保正确的;

配置好后,我们要先保存,然后激活您添加的设备;这一过程都是极为简单的;

二、一些与网络配置相关的文件和命令;

1、如果您在命令行下启动网络服务,应该是:

[root@localhost beinan]# /etc/init.d/network start
[root@localhost beinan]# /etc/init.d/network restart

2、网卡的配置文件在 /etc/sysconfig/network-scripts 目录中;比如eth0的配置文件是由 neat 添加网卡后生成的,文件是ifcfg-eth0;

3、网卡是不是被支持;

首先要学会用lspci -v ,查看网卡芯片组信息;用modprobe 内核驱动模块名 来加载网卡驱动;如果您的系统安装完成后找不到网卡,可能就要自己来modprobe 模块,或者自己安装网卡驱动;

内核的硬件设备模块存放在 /lib/modules/内核版本号,用tab键补齐就能看到了/kernel/drivers/
比如我的系统内核网卡驱动模块存放在 /lib/modules/2.6.11-1.1369_FC4/kernel/drivers/net/

用 lsmod 来查看是不是已经加载了驱动;如果没有就用 modprobe 命令来加载,比如加载8139网卡驱动:

[root@localhost beinan]# modprobe 8139too

应该查看 /etc/modprobe.conf ;
比如我用的是8139的网卡,应该在 /etc/modprobe.conf 中有一行;

alias eth0 8139too

如果有第二个网卡eth0,还是要加一行;alias eth1 8139too ;当然与您的网卡芯片有关,8139芯片组的网卡,就是内核对应的驱动模块 8139too支持;

4、ifconfig 和ifup ifdown 的应用

[root@localhost beinan]# ifconfig eth0 on  注:激活网卡eth0
[root@localhost beinan]# ifconfig eth9 down 注:断开网卡eth0
[root@localhost beinan]# ifup eth0  注:激活网卡eth0
[root@localhost beinan]# ifdown eth0 注:激活网卡eth0
[root@localhost beinan]# ifconfig -a 注:看是否激活了网络设备;

ifconfig 还能配置网卡的IP等;是一个命令行的配置工具;以后介绍;

5、adsl 拔号软件命令行配置工具rp-pppoe;(如果您的ADSL不带路由功能,可以用rp-pppoe来拔号)

注:用neat 完全可以实现此添加adsl拔号上网的功能,请看前面的图;

如果您用的是usb接口的ADSL ,要先把驱动安装上,对USB ADSL的支持Linux是有点麻烦;如果是乙太口的,所有的都支持;adsl如果是用pppoe 拔号的也可以用 adsl-setup 来配置;

当然您要把网卡的IP配置好,然后再来设置ADSL配置;

比如您的网卡eth0可以设置成

ip:192.168.0.1
netmask:255.255.255.0

网关不要配置:

然后来运行adsl-setup

[root@LinuxSir02 root]# adsl-setup

Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...

LOGIN NAME

Enter your Login Name (default root): ADSL提供商给的用户名,写在这里

INTERFACE

Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0): eth0这是ADSL通过第一台机器的第一张网卡eth0提供上网

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no):在这里按一下回车就行了。

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here: 202.96.134.133 这是DSN,最好用你本地电信给的
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
Enter the secondary DNS server address here: 202.96.168.68这是第二个DNS,也是电信给的。

PASSWORD

Please enter your Password:在这里把 ADSL提供商给的密码写上
Please re-enter your Password:确认密码

USERCTRL

Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): yes

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2): 2

Start this connection at boot time

Do you want to start this connection at boot time?
Please enter no or yes (default no):yes

** Summary of what you entered **

Ethernet Interface: eth0
User name: ADSL用户名
Activate-on-demand: No
Primary DNS: 202.96.134.133
Secondary DNS: 202.96.168.68
Firewalling: MASQUERADE
User Control: yes
Accept these settings and adjust configuration files (y/n)?y

激活 adsl拔号;用 ifup ppp0 或者 adsl-start ;

[root@localhost beinan]# adsl-start

6、resolv.conf 文件;

/etc/resolv.conf 文件,只访问要是用来解析域名的;如果您只能ip访问或者能ping 通IP ,但不能域名访问,请编辑这个件;如果您是通过DHCP自动获取IP的, 这个文件不用改动;

如果您是指定IP的,可能忘记了加DNS,要在这个文件添加上,这个文件的内容类似如下的:

nameserver 202.96.128.68
nameserver 202.96.134.188
nameserver 211.64.144.130
nameserver 202.96.134.133

resolv.conf 内容,每行以 nameserver 开头,然后加上DNS,最好找一个自己城市的DNS,上面的这些也是可以用的;复制上去就行了;


后记:

只是简单的介绍了一下,有时间我好好整理一篇关于网络配置工具的详细介绍性的;祝大家好运;

网络管理 之 Fedora Core 网络配置工具system-config-network介绍相关推荐

  1. 10.6 ip:网络配置工具

    ip命令是iproute软件包中的一个强大的网络配置工具,用于显示或管理Linux系统的路由.网络设备.策略路由和隧道. ip [option] [object] [command] ip [选项] ...

  2. Linux网络配置及”Job for network.service failed“错误解决

    Linux centos7版本配置网络服务及常见问题的解决 配置环境:cat /etc/redhat-release 1.Red Hat Enterprise Linux Server release ...

  3. linux 无线网络配置工具wpa_supplicant与wireless-tools

    内容: 介绍 WPA Supplicant Wireless Tools 针对每个ESSID的网络配置 4.a. 介绍 目前您可以使用我们提供的wireless-tools 或wpa_supplica ...

  4. linux无线网络密码修改,linux无线网络配置工具----iwconfig

    wconfig iwconfig是Linux Wireless Extensions(LWE)的用户层配置工具之一.LWE是Linux下对无线网络配置的工具,包括内核的支持.用户层配置工具和驱动接口的 ...

  5. Ifconfig网络配置工具详解

    Linux命令:ifconfig 语法 ifconfig [网络设备][down up -allmulti -arp -promisc][add<地址>][del<地址>][& ...

  6. linux 网络冲浪,命令行下的网络冲浪工具命令行浏览器介绍

    Linux命令行是强大的工具,命令行是我们的日常工作,命令行更是我们日常生活.之前虫虫给大家写过一些命令的的介绍,命令行的工具,命令行下的开发.实际上命令行也是我们不可或缺的生活.本文我们来介绍一下命 ...

  7. linux centos7 NetworkManager 命令行网络配置工具 nmcli 简介

    目录 nmcli命令与配置文件对应关系 修改配置文件的主机名 查看网卡信息 显示具体的网络接口信息 显示所有设配状态 修改配置文件执行生效 显示所有活动连接 删除一个网卡连接 添加一个网卡连接 网络接 ...

  8. Fedora下网络配置及相关命令

    网络参数配置 1.Fedora网络设置IP地址 查看你使用的IP网卡 ifconfig -a 找到你要Fedora 网络使用的网卡 vi /etc/sysconfig/network-scripts/ ...

  9. Fedora Core 4配置本地yum源

    说明: 最近了解到还有人使用旧版32位的FC4系统,当想帮助他解决rpm包安装依赖问题时,发现网上很少有相关配置本地yum源的文章,所以自己在虚拟机上安装了FC4系统,折腾记录了相关步骤以供参考. 系 ...

最新文章

  1. 前沿资讯|Spring Native 0.11.2、Spring Authorization Server 0.2.2 发布
  2. python画饼图-python使用Matplotlib画饼图
  3. postman发送json请求,使用案例
  4. [整理]zepto的初次使用
  5. Java 散点图 数据库 代码_java – 来自数据库的jfreechart中的散点图
  6. C++Saddleback search鞍背搜索的实现算法(附完整源码)
  7. copy a random link
  8. 四大招让无处不在的工作空间成为可能?揭秘Ivanti 的战略布局
  9. Web前端Javascript笔记(8)Ajax前后端交互
  10. shell之for循环的3个简单脚本
  11. 现在企业编程用java还是python_想转行做程序员,是学习 Java 还是 Python 更好?
  12. 第十三次CCF CSP认证(2018年3月)真题URL映射
  13. java进销存系统--采购入库
  14. 2009中国情爱报告:超4成未婚女性担心嫁不出去
  15. 用计算机弹音乐的歌谱《奇迹再现》,奇迹再现曲谱_奇迹再现的歌谱
  16. 千兆路由器怎么设置网速最快_tp无线路由器怎么设置网速最快
  17. 情感充沛,去体悟生活
  18. 用GUI自动控制键盘和鼠标
  19. 宏基因组分箱CheckM评估结果的提取
  20. 比 Redis 还快,更省内存,开源,惊爆了!

热门文章

  1. (四)Maven构建多模块项目
  2. nyoj 56 阶乘中素数的个数
  3. [转载] 七龙珠第一部——第112话 能恢复年轻吗 比克大魔王
  4. IP地址子网掩码位数换算方法及解释子网掩码的作用
  5. 在线黑客帝国文字效果生成工具
  6. JVM程序计数器,虚拟机栈,本地方法栈
  7. android studio获取数字签名,Android应用开发Android Studio数字签名打包apk图文步骤教程...
  8. SOA面向服务架构简述
  9. input file reader
  10. Python程序-打印单词的菱形字符图案