在ubuntu中设置网络管理器dns

在ubuntu中设置网络管理器dns

我有 Ubuntu 14.10。当我工作时,我可以毫无问题地浏览互联网。现在我在家,可以连接,但无法浏览网页。

一些信息:

ifconfig 的输出:

marcosh@marcoshstudio:~$ ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:227 errors:0 dropped:0 overruns:0 frame:0
          TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:24638 (24.6 KB)  TX bytes:24638 (24.6 KB)

wlan0     Link encap:Ethernet  HWaddr 80:19:34:7d:8e:99  
          inet addr:192.168.1.66  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::8219:34ff:fe7d:8e99/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:769 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2001 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:87556 (87.5 KB)  TX bytes:234860 (234.8 KB)

我正在使用网络管理器,这是 nm-tool 的输出:

marcosh@marcoshstudio:~$ nm-tool

NetworkManager Tool

State: connected (global)

- Device: wlan0  [TNCAPC29DB1] -------------------------------------------------
  Type:              802.11 WiFi
  Driver:            iwlwifi
  State:             connected
  Default:           yes
  HW Address:        80:19:34:7D:8E:99

  Capabilities:
    Speed:           2 Mb/s

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    ReeKoWLAN:       Infra, 90:94:E4:75:78:B2, Freq 2412 MHz, Rate 54 Mb/s, Strength 34     WPA WPA2
    TISCALI:         Infra, 9C:97:26:9C:9F:7B, Freq 2462 MHz, Rate 54 Mb/s, Strength 90
    *TNCAPC29DB1:    Infra, 58:98:35:C2:9D:B1, Freq 2437 MHz, Rate 54 Mb/s, Strength 58    WPA WPA2
    InfostradaWiFi-408829: Infra, 40:CB:A8:8E:EC:C8, Freq 2417 MHz, Rate 54 Mb/s, Strength   45 WPA WPA2

  IPv4 Settings:
    Address:         192.168.1.66
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.1.254

    DNS:             192.168.1.254
    DNS:             8.8.8.8 

我担心文件 /etc/resolv.conf 中的设置会产生干扰:

marcosh@marcoshstudio:~$ cat /etc/resolv.conf
domain mva.local
search mva.local
nameserver 192.168.242.1

那可能吗?

我知道(因为我另一次这样做了),如果我删除并重新安装网络管理器,我将能够从家里浏览,但不能从办公室浏览。我怎样才能避免这种情况并一次性解决我的问题?

答案1

最终我使用解决了它

sudo dpkg-reconfigure resolvconf

了解更多信息

相关内容