您的位置:首页 > 理论基础 > 计算机网络

ubuntu修改ip地址重启网络

2015-03-16 16:07 246 查看
Ubuntu修改网卡配置文件:

vim /etc/network/interfaces<pre name="code" class="plain">cat /etc/network/interfaces


auto eth0
iface eth0 inet static
address 192.168.1.41
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameserver 114.114.114.114



然后重启网卡:

ifdown eth0
ifup eth0


VMware下安装的Linux虚拟机ping网关和baidu.com出现下面情况:

64 bytes from 192.168.20.254: icmp_seq=1 ttl=128 time=2460 ms (DUP!)
64 bytes from 192.168.20.254: icmp_seq=1 ttl=128 time=2460 ms (DUP!)
重启VMware的网络:VMnet1 和VMnet8以后解决了问题

ubuntu安装开启启动管理软件:
apt-get install sysv-rc-conf
<span class="pln" style="line-height: 28px; font-family: monospace; font-size: 16px; white-space: pre-wrap;">sysv</span><span class="pun" style="line-height: 28px; color: rgb(102, 102, 0); font-family: monospace; font-size: 16px; white-space: pre-wrap;">-</span><span class="pln" style="line-height: 28px; font-family: monospace; font-size: 16px; white-space: pre-wrap;">rc</span><span class="pun" style="line-height: 28px; color: rgb(102, 102, 0); font-family: monospace; font-size: 16px; white-space: pre-wrap;">-</span><span class="pln" style="line-height: 28px; font-family: monospace; font-size: 16px; white-space: pre-wrap;">conf </span>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: