大佬教程收集整理的这篇文章主要介绍了Linux网卡配置,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
202.102.224.68
202.102.227.68
阿里DNS:
223.5.5.5
电信:
222.85.85.85
CentOS7网卡配置:
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="772475e4-5aeb-426b-8e42-3b918d25d8e6"
DEVICE="ens33"
ONBOOT="yes"
Ipaddr=192.168.123.171
NETMASK=255.255.255.0
GATEWAY=192.168.123.1
CentOS7路由配置
[[email protected] ~]# cat /etc/resolv.conf
#Generated by NetworkManager
search stu.mc
nameserver 222.85.85.85
nameserver 223.5.5.5
CentOS6网卡配置:
[[email protected] ~]#cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=2bd086a4-d50d-4491-bd63-94bb7a0560b8
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
HWADDR=00:0C:29:B2:E8:00
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
Ipaddr=192.168.123.161
NETMASK=255.255.255.0
GATEWAY=192.168.123.1
CentOS6路由配置:
[[email protected] ~]#cat /etc/resolv.conf
#Generated by NetworkManager
search stu.mc
#No nameservers found; try putTing DNS servers into your
#ifcfg files in /etc/sysconfig/network-scripts like so:
#DNS1=xxx.xxx.xxx.xxx
#DNS2=xxx.xxx.xxx.xxx
#DOMAIN=lab.foo.com bar.foo.com
nameserver 222.85.85.85
nameserver 223.5.5.5
关闭防火墙:
CentOS6:
service iptables stop
chkconfig iptables off
CentOS7:
systemctl stop firewalld
systemctl disable firewalld
SELinux
临时关闭:setenforce 0
[[email protected] ~]#cat /etc/selinux/config
#This file controls the state of SELinux on the system.
#SELINUX= can take one of these three values:
#enforcing - SELinux security policy is enforced.
#permissive - SELinux prints warnings instead of enforcing.
#disabled - No SELinux policy is loaded.
SELINUX=enforcing
#SELINUXTYPE= can take one of these two values:
#targeted - Targeted processes are protected,
#mls - Multi Level Security protection.
SELINUXTYPE=targeted
以上是大佬教程为你收集整理的Linux网卡配置全部内容,希望文章能够帮你解决Linux网卡配置所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。