Networking
在 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
那可能嗎?
我知道(因為我曾經這樣做過)如果我刪除並重新安裝網路管理器,我將能夠在家中瀏覽,但不能在辦公室瀏覽。我怎樣才能避免這種情況並一勞永逸地解決我的問題?
最終我解決了它
sudo dpkg-reconfigure resolvconf
看到這個了解更多資訊