码迷,mamicode.com
首页 > Web开发 > 详细

Debian Redhat network config

时间:2015-10-06 15:32:08      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:debian redhat network config


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

标签:debian redhat network config

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!