【问题标题】:How to configure network on centoscentos上如何配置网络
【发布时间】:2016-11-03 11:53:20
【问题描述】:

我正在尝试设置使用cent OS 的go auto dial,我对cent OS 完全陌生,不知道如何在其上配置网络,并且没有网络我无法访问go auto CE 门户。

我尝试输入我的 WiFi IP 子网掩码和默认网关,但是当我尝试访问给定的 IP 时,它会显示:

【问题讨论】:

  • 您是否尝试通过命令ifconfig 检查您的配置?

标签: linux networking centos


【解决方案1】:

显示你所有的网络接口(检查你的接口名称,在下面的例子中是 eth0,替换 eth0 和你从下面命令的结果中读取的接口名称):

[root@localhost]# ifconfig -a

如果你使用 eth0 接口,你应该配置如下:

[root@localhost]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

## Configure eth0
#
# /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0" # interface name
NM_CONTROLLED="no"
ONBOOT=yes # launch network in Linux boot
HWADDR=AA:BB:CC:DD:EE:FF # your mac address
TYPE=Ethernet 
BOOTPROTO=static # static or dhcp
NAME="System eth0"
IPADDR=X.X.X.X # your ip address if static is chosen
NETMASK=255.255.255.0 # your netmask if static is chosen


[root@localhost]# vi /etc/sysconfig/network

## Configure Default Gateway
#
# /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=centos6
GATEWAY=192.168.1.1

重启网络接口

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

配置 DNS 服务器

[root@localhost]# vi /etc/resolv.conf

nameserver 8.8.8.8      # Replace with your nameserver ip
nameserver 8.8.4.4      # Replace with your nameserver ip

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-15
    • 1970-01-01
    • 2013-01-26
    • 2018-03-28
    相关资源
    最近更新 更多