伊莉討論區
標題:
新手,不會連有線網路
[打印本頁]
作者:
weirdococo
時間:
2020-2-8 03:26 PM
標題:
新手,不會連有線網路
本帖最後由 weirdococo 於 2020-2-8 03:33 PM 編輯
最近要架設一台ubuntu電腦,在第一不連網路就卡關了.....感覺ping的到但是瀏覽器到webget或是apt-get update都不可用!
是固定ip的,61.220.248.114~126可用 ...
把設定檔改成這樣
auto lo
iface lo inet loopback
auto enp7s0
iface enp7s0 inet static
address 61.220.248.121
netmask 255.255.255.240
gateway 61.220.248.113
dns-nameservers 168.95.1.1
然後reboot
ifconfig訊息
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 61.220.248.121 netmask 255.255.255.240 broadcast 61.220.248.127
inet6 fe80::4a25:c8d9:d082:2dd8 prefixlen 64 scopeid 0x20<link>
ether 74:e6:e2:30:62:00 txqueuelen 1000 (Ethernet)
RX packets 2290 bytes 156082 (156.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 863 bytes 78432 (78.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1793 bytes 153622 (153.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1793 bytes 153622 (153.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ping ping看google
PING
www.google.com
(216.58.200.36) 56(84) bytes of data.
64 bytes from tsa01s08-in-f36.1e100.net (216.58.200.36): icmp_seq=1 ttl=55 time=22.9 ms
64 bytes from tsa01s08-in-f36.1e100.net (216.58.200.36): icmp_seq=2 ttl=55 time=22.4 ms
64 bytes from tsa01s08-in-f36.1e100.net (216.58.200.36): icmp_seq=3 ttl=55 time=23.8 ms
---
www.google.com
ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 22.405/23.089/23.888/0.610 ms
Kernel IP routing table
route
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 61.220.248.113 0.0.0.0 UG 20100 0 0 enp7s0
61.220.248.112 0.0.0.0 255.255.255.240 U 100 0 0 enp7s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp7s0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 61-220-248-113. 0.0.0.0 UG 20100 0 0 enp7s0
61.220.248.112 0.0.0.0 255.255.255.240 U 100 0 0 enp7s0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp7s0
dig看看
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>>
www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47338
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;
www.google.com.
IN A
;; ANSWER SECTION:
www.google.com.
75 IN A 216.58.200.36
;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sat Feb 08 15:08:25 CST 2020
;; MSG SIZE rcvd: 59
linux版本
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
作者:
kightaylor
時間:
2020-3-27 09:45 PM
提示:
作者被禁止或刪除 內容自動屏蔽
歡迎光臨 伊莉討論區 (https://attach1201.eyny.com/)
Powered by Discuz!