ubuntu网络简单设置

//打开网络配置文件
# pico /etc/network/interfaces 


//可以用类似于如下的配置来手动指定eth0的网址
auth eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254


//eth1使用dhcp自动获取网址
auto eth1
iface eth1 inet dhcp

//做如上配置后,可根据提示,ctrl+O,回车,保存配置,ctrl+X退出配置文件


//域名服务器配置
pico /etc/resolv.conf


//可用如下类似的配置指定网络的域名服务器IP
nameserver xxx.xxx.xxx.xxx

//做如上配置后,可根据提示,ctrl+O,回车,保存配置,ctrl+X退出配置文件



//重新启动网络
/etc/init.d/networkding restart

你可能感兴趣的:(网络,ubuntu,服务器)