首页 > Web开发 > 详细

Debian Redhat network config

时间:2015-10-06 15:29:37      阅读:235      评论:0      收藏:0      [点我收藏+]


For  Debian Linux


# dhcp
auto eth0
iface eth0 inet dhcp

# static
auto eth0
iface eth0 inet static
address 10.16.3.99
netmask 255.255.255.0
network 10.16.3.0
broadcast 10.16.3.255
gateway 10.16.3.1

/etc/init.d/networking restart





For Redhat Linux

临时修改网卡IP
ifconfig eth0 172..16.0.5/16 up

添加网关 
route add default gw 172.16.0.111

临时修改默认的DNS
vim /etc/resolv.conf
vim /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:0C:29:36:**:**
TYPE=Ethernet
UUID=7eaffa26-ee97-4d23-a333-a84da8341***
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=172.16.0.103
NETMASK=255.255.255.0
GATEWAY=172.16.0.111
DNS1=114.114.114.114
DNS2=8.8.8.8


Debian Redhat network config

原文:http://990487026.blog.51cto.com/10133282/1700359

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!