Last active
December 15, 2015 00:49
-
-
Save haio/5175270 to your computer and use it in GitHub Desktop.
Network 配置文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ubuntu: | |
/etc/network/interfaces | |
auto lo$ | |
iface lo inet loopback$ | |
# The primary network interface$ | |
auto eth0$ | |
#iface eth0 inet dhcp$ | |
iface eth0 inet static$ | |
address 1.1.8.8$ | |
netmask 255.255.0.0$ | |
gateway 1.1.1.1$ | |
dns-nameservers 8.8.8.8 4.4.4.4. | |
/etc/init.d/networking restart | |
CentOS: | |
/etc/sysconfig/network-scripts/ifcfg-eth0 | |
/etc/init.d/network restart | |
EVICE="eth0" | |
BOOTPROTO="static" | |
IPADDR=1.1.8.12 | |
NETMASK=255.255.0.0 | |
HWADDR="00:0C:29:48:D8:92" | |
NM_CONTROLLED="yes" | |
ONBOOT="yes" | |
DNS1=8.8.8.8 | |
DNS2=4.4.4.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment