这个问题真是来得莫名其妙,突然就不能上网了。打不开任何网页,尝试着ping了一下百度,提示
|
1 2 |
ubuntu@mcj:/root$ ping www.baidu.com ping: unknown host www.baidu.com |
找了很多答案,都不适用于我这个,我这里有两个虚拟网卡eth0和eth1,平时都是用eth1连接,会不会跟这个有关系?
还有一个可能性,那就是mac地址,是不是现在的mac地址冲突?于是着手修改这两个地方,首先禁用eth0,然后修改mac地址
|
1 |
sudo vi /etc/network/interfaces |
先把eth0注释掉,然后加入网卡
|
1 2 3 4 5 6 7 8 9 10 11 12 |
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth1 iface eth1 inet dhcp hwaddress ether 00:01:04:1b:2C:1F #auto eth0 #iface eth0 inet dhcp |
重启一下容器,再次ping百度试试~~
|
1 2 3 4 5 |
ubuntu@mcj:/root$ ping www.baidu.com PING www.a.shifen.com (119.75.217.26) 56(84) bytes of data. ^C --- www.a.shifen.com ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2035ms |
这次就很完美啦~~






最新评论
站长您好,亚马逊云咨询推广资源,望建立联系,可邮件,谢谢。
换友情链接吗?
看你的站做的挺不错的
恭喜!!太强了,硕博连读啊
雁过留毛,人过留名。
看不懂但大受震撼
每天都在战争,希望2026和平.
ZeroTier 看过多篇帖子,目前群辉、飞牛os、win11 、安卓、ubuntu ≥18.04 顺利通过,这篇相对于简单 实用、特来感谢 🙄