ubuntu网络设置mark
ubuntu网络设置mark
ubuntu网络设置mark
悲催的这次ubuntu竟然上不了外网了,但是内网ip都能ping通,网关能ping通,dns能ping通。
排查了下,应该是dns没有配置上去。
sudo gedit /etc/resolv.conf 下竟然真的么有配置nameserver.好吧,老老实实加上
nameserver 192.168.xxx.xxx
顺便记录下配置ip:
sudo gedit /etc/network/interfaces
1
auto lo
2
iface lo inet loopback
3
4
auto eth0
5
iface eth0 inet static
6
address 192.168.21.188
7
gateway 192.168.21.1
8
netmask 255.255.255.0
这个可以全局保持静态的ip,不用开机每次去设置ip了
评论暂时关闭