centos6配置网络常见问题

1. 启用网卡

 查看网卡模块: lsmod

 移除网卡:modprobe -r e1000 

 装载网卡: modprobe e1000

2. 配置网络

 vim /etc/sysconfig/network-scripts/ifcfg-eth0

 修改后重启网络:  

  方法有:1. ifconfig eth0 down;ifconfig eth0 up

      2. service network restart

      3. /etc/rc.d/init.d/network restart

常见问题:

    1. 激活连接失败:Failed to determine connection’s virtual interface name

  解决方法:

    首先停止NetworkManager 守护进程

       # chkconfig NetworkManager off

       # service NetworkManager stop

    启动网卡

         # ifup eth0

         # ifup bridge0

       # ifconfig

      2.ssh远程连接失败

   解决方法:

    1.查看网络配置文件中的IP有没有改变

            2.检查sshd服务的状态以及端口是否正常。

       查看sshd状态:# netstat -npl | grep :22

       重启sshd服务:# /etc/init.d/sshd restart

    3.检查防火墙是否开启

      关闭防火墙:# chkconfig iptables off

      确认是否关闭:# /etc/init.d/iptables status

            4.检查SELinux是否关闭

      查看状态:getenforce

      如果开启则关闭:

        /etc/selinux/config 中改为 SELinux=disabled

        /boot/grub/menu.lst 中b quiet 后面加上selinux=0

    至此就可以连接了

猜你喜欢

转载自www.cnblogs.com/ckh2014/p/10628950.html