我的电脑连接了 2 个网络。无线连接用于连接互联网,有线连接用于 LAN (eth0),我还通过它共享我的电脑的互联网连接。(这连接到 ubuntu 服务器、xbox 和运行 mac 的笔记本电脑(不确定这是否有区别!))
在今天之前,我从未遇到过任何设置或连接共享问题。它开始不断连接和断开有线网络,但不影响无线连接。任何帮助解决此问题的帮助都将不胜感激!
另外,不确定它是否有助于解决问题,但这里是信息ifconfig
;
eth0 Link encap:Ethernet HWaddr 00:22:68:51:38:71
inet6 addr: fe80::222:68ff:fe51:3871/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1443 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:307663 (307.6 KB)
Interrupt:43
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:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1184 (1.1 KB) TX bytes:1184 (1.1 KB)
wlan0 Link encap:Ethernet HWaddr 00:60:b3:eb:9c:4e
inet addr:192.168.0.203 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::260:b3ff:feeb:9c4e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9058 errors:0 dropped:0 overruns:0 frame:0
TX packets:9780 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4498374 (4.4 MB) TX bytes:1282373 (1.2 MB)
结果ls -lrt /var/log
;
total 29924
drwxr-x--- 2 jetty adm 4096 2010-07-20 22:58 jetty
drwxr-xr-x 2 speech-dispatcher root 4096 2011-01-11 16:06 speech-dispatcher
drwxr-xr-x 2 root root 4096 2011-04-12 10:22 unattended-upgrades
drwxr-xr-x 2 root root 4096 2011-04-18 18:36 apparmor
drwxr-xr-x 2 root root 4096 2011-04-25 23:52 fsck
-rw-r----- 1 root adm 31 2011-04-25 23:52 boot
-rw-r--r-- 1 root root 0 2011-04-25 23:52 pycentral.log
-rw-r--r-- 1 root root 48382 2011-04-25 23:53 bootstrap.log
-rw-r----- 1 syslog adm 0 2011-08-18 14:49 ufw.log
-rw-r----- 1 syslog adm 0 2011-08-18 14:49 mail.log
drwxr-xr-x 2 root root 4096 2011-08-18 14:49 news
-rw-r----- 1 syslog adm 0 2011-08-18 14:49 mail.err
-rw-r--r-- 1 root root 101443 2011-08-18 15:37 Xorg.failsafe.log
-rw-r--r-- 1 root root 16888 2011-08-19 17:08 jockey.log.2.gz
-rw-r--r-- 1 root root 6223 2011-08-26 18:59 alternatives.log.3.gz
-rw-r--r-- 1 root root 115067 2011-08-29 22:32 dpkg.log.3.gz
-rw-r--r-- 1 root root 1684 2011-09-01 08:53 pm-powersave.log.3.gz
-rw-r--r-- 1 root root 2173 2011-09-13 00:02 pm-suspend.log.2.gz
-rw-r--r-- 1 root root 7271 2011-09-17 12:28 Xorg.2.log.old
-rw-r--r-- 1 root root 7271 2011-09-17 12:28 Xorg.3.log.old
-rw-r--r-- 1 root root 7271 2011-09-17 12:28 Xorg.4.log.old
-rw-r--r-- 1 root root 7271 2011-09-17 12:28 Xorg.5.log.old
-rw-r--r-- 1 root root 7271 2011-09-17 12:29 Xorg.2.log
-rw-r--r-- 1 root root 7271 2011-09-17 12:29 Xorg.3.log
-rw-r--r-- 1 root root 7271 2011-09-17 12:29 Xorg.4.log
-rw-r--r-- 1 root root 7271 2011-09-17 12:29 Xorg.5.log
-rw-r--r-- 1 root root 694 2011-09-26 11:55 alternatives.log.2.gz
-rw-r--r-- 1 root root 10622 2011-09-26 11:55 dpkg.log.2.gz
-rw-r--r-- 1 root root 2257 2011-10-01 09:53 pm-powersave.log.2.gz
-rw-rw---- 1 root utmp 149 2011-10-01 09:53 btmp.1.gz
-rw-rw-r-- 1 root utmp 11908 2011-10-01 09:53 wtmp.1.gz
-rw-rw---- 1 root utmp 384 2011-10-02 18:15 btmp.1
-rw-r--r-- 1 root root 5213 2011-10-11 21:04 pm-suspend.log.1
drwxrwx--T 2 root gdm 4096 2011-10-14 19:07 gdm
-rw-r----- 1 root adm 314 2011-10-15 02:54 apport.log.1
-rw-r--r-- 1 root root 2827 2011-10-15 03:15 fontconfig.log
-rw-r--r-- 1 root root 32032 2011-10-15 03:24 faillog
-rw-r----- 1 root adm 0 2011-10-15 03:24 apport.log
drwxr-xr-x 2 root root 4096 2011-10-15 03:26 installer
drwxr-xr-x 3 root root 4096 2011-10-15 03:35 dist-upgrade
-rw-r--r-- 1 root root 53608 2011-10-15 04:14 alternatives.log.1
-rw-r----- 1 syslog adm 850716 2011-10-23 13:56 kern.log.4.gz
-rw-r----- 1 syslog adm 6509 2011-10-23 14:17 auth.log.4.gz
-rw-r--r-- 1 root root 1921821 2011-10-25 16:53 dpkg.log.1
-rw-r----- 1 syslog adm 4824 2011-10-30 01:17 auth.log.3.gz
-rw-r----- 1 syslog adm 3258932 2011-10-30 01:26 kern.log.3.gz
-rw-r--r-- 1 root root 6933 2011-11-01 19:11 Xorg.1.log.old
-rw-r--r-- 1 root root 245934 2011-11-02 21:02 pm-powersave.log.1
-rw-rw-r-- 1 root utmp 401664 2011-11-02 21:02 wtmp.1
drwxr-xr-x 2 root root 4096 2011-11-02 21:26 apt
drwxr-xr-x 2 root root 4096 2011-11-02 21:26 ConsoleKit
-rw-rw---- 1 root utmp 0 2011-11-02 21:26 btmp
-rw-r----- 1 syslog adm 3698 2011-11-06 19:17 auth.log.2.gz
-rw-r----- 1 syslog adm 69516 2011-11-06 19:40 syslog.7.gz
-rw-r----- 1 syslog adm 1436902 2011-11-06 19:40 kern.log.2.gz
-rw-r----- 1 syslog adm 24744 2011-11-07 10:54 syslog.6.gz
-rw-r--r-- 1 root root 8368 2011-11-07 11:47 pm-suspend.log
-rw-r----- 1 syslog adm 328206 2011-11-08 12:40 syslog.5.gz
-rw-r----- 1 syslog adm 199507 2011-11-10 12:32 syslog.4.gz
drwxr-xr-x 2 root root 4096 2011-11-11 21:25 lightdm
-rw-r----- 1 syslog adm 29968 2011-11-11 21:36 syslog.3.gz
-rw-r----- 1 syslog adm 24734 2011-11-12 14:10 syslog.2.gz
-rw-rw-r-- 1 root utmp 292292 2011-11-12 19:12 lastlog
-rw-r--r-- 1 root root 6933 2011-11-12 23:01 Xorg.1.log
-rw-r----- 1 root adm 15597 2011-11-12 23:03 dmesg.4.gz
-rw-r--r-- 1 root root 41505 2011-11-13 01:03 alternatives.log
-rw-r----- 1 root adm 15540 2011-11-13 01:26 dmesg.3.gz
-rw-r----- 1 syslog adm 64541 2011-11-13 01:31 auth.log.1
drwxr-xr-x 2 root root 4096 2011-11-13 01:32 cups
-rw-r--r-- 1 root root 107678 2011-11-13 01:32 jockey.log.1
-rw-r--r-- 1 root root 0 2011-11-13 01:32 jockey.log
-rw-r----- 1 syslog adm 8895918 2011-11-13 01:32 syslog.1
-rw-r----- 1 syslog adm 7876245 2011-11-13 01:32 kern.log.1
drwxr-xr-x 3 root root 4096 2011-11-13 01:32 samba
-rw-r--r-- 1 root root 297066 2011-11-13 01:32 dpkg.log
-rw-r----- 1 root adm 14913 2011-11-13 01:34 dmesg.2.gz
-rw-r----- 1 root adm 15332 2011-11-13 02:56 dmesg.1.gz
-rw-r----- 1 root adm 66791 2011-11-13 13:29 dmesg.0
-rw-r--r-- 1 root root 57706 2011-11-13 13:34 Xorg.0.log.old
-rw-r--r-- 1 root root 855 2011-11-13 13:36 boot.log
-rw-r----- 1 root adm 61037 2011-11-13 13:36 dmesg
-rw-r--r-- 1 root root 347684 2011-11-13 13:36 udev
-rw-r--r-- 1 root root 105706 2011-11-13 13:36 pm-powersave.log
-rw-r----- 1 syslog adm 10133 2011-11-13 13:37 auth.log
-rw-r--r-- 1 root root 56540 2011-11-13 13:40 Xorg.0.log
-rw-rw-r-- 1 root utmp 155136 2011-11-13 13:47 wtmp
-rw-r----- 1 syslog adm 422140 2011-11-13 13:47 kern.log
-rw-r----- 1 syslog adm 2461489 2011-11-13 13:47 syslog
结果netstat -rn
;
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
10.42.43.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
结果ping -c 3 -I eth0 10.42.43.77
;
(10.42.43.77 是 Ubuntu 服务器的 IP 地址。)
PING 10.42.43.77 (10.42.43.77) from 10.42.43.1 eth0: 56(84) bytes of data.
64 bytes from 10.42.43.77: icmp_req=1 ttl=64 time=7.17 ms
--- 10.42.43.77 ping statistics ---
3 packets transmitted, 1 received, 66% packet loss, time 2009ms
rtt min/avg/max/mdev = 7.172/7.172/7.172/0.000 ms
答案1
这可能是 Avahi 的错误。我目前找不到它,但它与 IPv6 有关。尝试对两者使用相同的资源,或者其他什么。停用 IPv6 应该可以解决问题。
答案2
我有同样的问题,经过大量研究后得出的结论是,ubuntu 不喜欢通过无线互联网连接共享到 xbox(等)的有线连接,但可以做的是购买无线路由器并通过以太网电缆将 xbox 连接到该路由器,然后无线连接到您的笔记本电脑/个人电脑,这应该可行(我被告知)