连接到 Trendnet 以太网交换机时断网

连接到 Trendnet 以太网交换机时断网

我刚刚在高中计算机实验室的大约 30 台计算机上安装了 Ubuntu 12.10(并删除了 Win XP 和 Win 7)。我现在遇到的问题是,我们无法通过网络访问互联网。

学校有一个 aDSL 路由器和一条以太网电缆,通向计算机实验室。该电缆连接到 24 端口 Trendnet 以太网交换机。一半的计算机连接到此交换机。另一条以太网电缆从此交换机连接到实验室另一台相同的交换机,为另一半计算机提供互联网访问。我没有以这种方式设置网络,但以前在计算机上加载 Windows 时它可以工作。安装 ubuntu 后,我们不再通过网络进行互联网连接。

当我将以太网电缆从 aDSL 路由器直接连接到其中一台计算机时,互联网可以正常工作,但是当我将其连接到交换机时,我们什么也得不到。当设置为自动 DHCP 时,Ubuntu 甚至不会为计算机分配本地 ip 地址。我尝试设置 DHCP 范围之外的手动 ip 地址:我将 ip 地址设置为 192.168.1.101 到 192.168.1.130。我将网关设置为 192.168.1.1,子网掩码设置为 255.255.255.0,DNS 路由器设置为 192.168.1.1。后来我将 DNS 路由器切换为 opendns 的 ip 地址。

手动设置 IP 地址确实允许我 ping 本地网络上的计算机,只要它们在同一个交换机上。如果计算机在另一个交换机上或它们在本地网络之外,则将超时,并且仍然无法访问互联网。

我也尝试重新启动路由器和交换机,但没有成功。

有人对如何通过我们的本地网络访问互联网以及如何通过两个交换机将计算机联网有什么建议吗?

编辑:

以下是系统日志提供的信息:

computer8 dbus[835]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: init!
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: update_system_hostname
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPluginIfupdown: management mode: unmanaged
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:05.0/0000:02:00.0/net/eth0, iface: eth0)
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:05.0/0000:02:00.0/net/eth0, iface: eth0): no ifupdown configuration found.
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/lo, iface: lo)
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/lo, iface: lo): no ifupdown configuration found.
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: end _init.
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> Loaded plugin ifupdown: (C) 2008 Canonical Ltd.  To report bugs please use the NetworkManager mailing list.
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> Loaded plugin keyfile: (c) 2007 - 2010 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
Feb 19 16:18:59 computer8 NetworkManager[902]:    Ifupdown: get unmanaged devices count: 0
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: (-1240455032) ... get_connections.
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: (-1240455032) ... get_connections (managed=false): return empty list.
Feb 19 16:18:59 computer8 NetworkManager[902]:    keyfile: parsing Wired connection 1 ... 
Feb 19 16:18:59 computer8 NetworkManager[902]:    keyfile:     read connection 'Wired connection 1'
Feb 19 16:18:59 computer8 NetworkManager[902]:    Ifupdown: get unmanaged devices count: 0
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> modem-manager is now available
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> monitoring kernel firmware directory '/lib/firmware'.
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> WiFi enabled by radio killswitch; enabled by state file
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> WWAN enabled by radio killswitch; enabled by state file
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> WiMAX enabled by radio killswitch; enabled by state file
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> Networking is enabled by state file
Feb 19 16:18:59 computer8 NetworkManager[902]: <warn> failed to allocate link cache: (-10) Operation not supported
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): carrier is OFF
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): new Ethernet device (driver: 'r8169' ifindex: 2)
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): exported as /org/freedesktop/NetworkManager/Devices/0
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): now managed
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): bringing up device.
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): preparing device.
Feb 19 16:18:59 computer8 NetworkManager[902]: <info> (eth0): deactivating device (reason 'managed') [2]
Feb 19 16:18:59 computer8 NetworkManager[902]: <warn> /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
Feb 19 16:18:59 computer8 NetworkManager[902]: <warn> /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
Feb 19 16:18:59 computer8 kernel: [   15.621206] r8169 0000:02:00.0: >eth0: link down
Feb 19 16:18:59 computer8 kernel: [   15.621396] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Feb 19 16:18:59 computer8 kernel: [   15.621674] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Feb 19 16:18:59 computer8 avahi-daemon[905]: Network interface enumeration completed.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Registering HINFO record with values 'I686'/'LINUX'.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Server startup complete. Host name is computer8.local. Local service cookie is 2464504904.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Service "computer8" (/services/udisks.service) successfully established.
Feb 19 16:18:59 computer8 anacron[996]: Anacron 2.3 started on 2013-02-19
Feb 19 16:18:59 computer8 acpid: starting up with proc fs
Feb 19 16:18:59 computer8 cron[966]: (CRON) INFO (pidfile fd = 3)
Feb 19 16:18:59 computer8 kernel: [   15.777742] Bridge firewalling registered
Feb 19 16:18:59 computer8 avahi-daemon[905]: Joining mDNS multicast group on interface lxcbr0.IPv4 with address 10.0.3.1.
Feb 19 16:18:59 computer8 avahi-daemon[905]: New relevant interface lxcbr0.IPv4 for mDNS.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Registering new address record for 10.0.3.1 on lxcbr0.IPv4.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Withdrawing address record for 10.0.3.1 on lxcbr0.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Leaving mDNS multicast group on interface lxcbr0.IPv4 with address 10.0.3.1.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Interface lxcbr0.IPv4 no longer relevant for mDNS.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Joining mDNS multicast group on interface lxcbr0.IPv4 with address 10.0.3.1.
Feb 19 16:18:59 computer8 avahi-daemon[905]: New relevant interface lxcbr0.IPv4 for mDNS.
Feb 19 16:18:59 computer8 avahi-daemon[905]: Registering new address record for 10.0.3.1 on lxcbr0.IPv4.
Feb 19 16:18:59 computer8 NetworkManager[902]: <warn> /sys/devices/virtual/net/lxcbr0: couldn't determine device driver; ignoring...
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/lxcbr0, iface: lxcbr0)
Feb 19 16:18:59 computer8 NetworkManager[902]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/lxcbr0, iface: lxcbr0): no ifupdown configuration found.
Feb 19 16:19:00 computer8 cron[1048]: (CRON) STARTUP (fork ok)
Feb 19 16:19:00 computer8 cron[1048]: (CRON) INFO (Running @reboot jobs)
Feb 19 16:19:00 computer8 ntpdate[1051]: Can't find host ntp.ubuntu.com: Name or service not known (-2)
Feb 19 16:19:00 computer8 ntpdate[1051]: no servers can be used, exiting
Feb 19 16:19:00 computer8 kernel: [   15.855197] ip_tables: (C) 2000-2006 Netfilter Core Team
Feb 19 16:19:00 computer8 kernel: [   15.865021] nf_conntrack version 0.5.0 (11983 buckets, 47932 max)
Feb 19 16:19:00 computer8 dnsmasq[1073]: started, version 2.63rc6 cachesize 150
Feb 19 16:19:00 computer8 dnsmasq[1073]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack
Feb 19 16:19:00 computer8 dnsmasq-dhcp[1073]: DHCP, IP range 10.0.3.2 -- 10.0.3.254, lease time 1h
Feb 19 16:19:00 computer8 dnsmasq[1073]: no servers found in /etc/resolv.conf, will  retry
Feb 19 16:19:00 computer8 dnsmasq[1073]: read /etc/hosts - 7 addresses
Feb 19 16:19:00 computer8 anacron[996]: Will run job `cron.daily' in 5 min.
Feb 19 16:19:00 computer8 anacron[996]: Jobs will be executed sequentially
Feb 19 16:19:00 computer8 dbus[835]: [system] Activating service name='org.freedesktop.Accounts' (using servicehelper)
Feb 19 16:19:00 computer8 accounts-daemon[1094]: started daemon version 0.6.21
Feb 19 16:19:00 computer8 dbus[835]: [system] Successfully activated service 'org.freedesktop.Accounts'
Feb 19 16:19:00 computer8 dbus[835]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)
Feb 19 16:19:00 computer8 dbus[835]: [system] Successfully activated service 'org.freedesktop.ConsoleKit'
Feb 19 16:19:01 computer8 kernel: [   17.130284] r8169 0000:02:00.0: >eth0: link up
Feb 19 16:19:01 computer8 kernel: [   17.130497] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> (eth0): carrier now ON (device state 20)
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Auto-activating connection 'Wired connection 1'.
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) starting connection 'Wired connection 1'
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Beginning IP6 addrconf.
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Feb 19 16:19:01 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Commit) started...
Feb 19 16:19:01 computer8 avahi-daemon[905]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.108.
Feb 19 16:19:01 computer8 avahi-daemon[905]: New relevant interface eth0.IPv4 for mDNS.
Feb 19 16:19:01 computer8 avahi-daemon[905]: Registering new address record for 192.168.1.108 on eth0.IPv4.
Feb 19 16:19:01 computer8 acpid: 33 rules loaded
Feb 19 16:19:01 computer8 acpid: waiting for events: event logging is off
Feb 19 16:19:01 computer8 acpid: client connected from 1067[0:0]
Feb 19 16:19:01 computer8 acpid: 1 client rule loaded
Feb 19 16:19:01 computer8 avahi-daemon[905]: Joining mDNS multicast group on interface lxcbr0.IPv6 with address fe80::ac67:41ff:fe66:c671.
Feb 19 16:19:01 computer8 avahi-daemon[905]: New relevant interface lxcbr0.IPv6 for mDNS.
Feb 19 16:19:01 computer8 avahi-daemon[905]: Registering new address record for fe80::ac67:41ff:fe66:c671 on lxcbr0.*.
Feb 19 16:19:01 computer8 dbus[835]: [system] Activating service name='org.freedesktop.UPower' (using servicehelper)
Feb 19 16:19:01 computer8 dbus[835]: [system] Successfully activated service 'org.freedesktop.UPower'
Feb 19 16:19:02 computer8 avahi-daemon[905]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::224:21ff:fea0:cfd0.
Feb 19 16:19:02 computer8 avahi-daemon[905]: New relevant interface eth0.IPv6 for mDNS.
Feb 19 16:19:02 computer8 avahi-daemon[905]: Registering new address record for fe80::224:21ff:fea0:cfd0 on eth0.*.
Feb 19 16:19:02 computer8 kernel: [   17.856246] IPv6: eth0: IPv6 duplicate address fe80::224:21ff:fea0:cfd0 detected!
Feb 19 16:19:02 computer8 NetworkManager[902]: <info> (eth0): device state change: ip-config -> activated (reason 'none') [70 100 0]
Feb 19 16:19:02 computer8 NetworkManager[902]: <info> DNS: starting dnsmasq...
Feb 19 16:19:02 computer8 NetworkManager[902]: <error> [1361251142.663612] [nm-dns-dnsmasq.c:390] update(): dnsmasq not available on the bus, can't update servers.
Feb 19 16:19:02 computer8 NetworkManager[902]: <error> [1361251142.663656] [nm-dns-dnsmasq.c:392] update(): dnsmasq owner not found on bus: Could not get owner of name 'org.freedesktop.NetworkManager.dnsmasq': no such name
Feb 19 16:19:02 computer8 NetworkManager[902]: <warn> DNS: plugin dnsmasq update failed
Feb 19 16:19:02 computer8 NetworkManager[902]: <info> ((null)): writing resolv.conf to /sbin/resolvconf
Feb 19 16:19:02 computer8 NetworkManager[902]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Feb 19 16:19:02 computer8 NetworkManager[902]: <info> Activation (eth0) successful, device activated.
Feb 19 16:19:02 computer8 NetworkManager[902]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Commit) complete.
Feb 19 16:19:02 computer8 dbus[835]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Feb 19 16:19:02 computer8 dbus[835]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Feb 19 16:19:02 computer8 NetworkManager[902]: <warn> dnsmasq appeared on DBus: :1.22
Feb 19 16:19:02 computer8 dnsmasq[1506]: started, version 2.63rc6 cache disabled
Feb 19 16:19:02 computer8 dnsmasq[1506]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack
Feb 19 16:19:02 computer8 dnsmasq[1506]: DBus support enabled: connected to system bus
Feb 19 16:19:02 computer8 dnsmasq[1506]: warning: no upstream servers configured
Feb 19 16:19:02 computer8 NetworkManager[902]: <info> ((null)): writing resolv.conf to /sbin/resolvconf
Feb 19 16:19:02 computer8 dnsmasq[1506]: setting upstream servers from DBus
Feb 19 16:19:02 computer8 dnsmasq[1506]: using nameserver 208.67.220.220#53
Feb 19 16:19:02 computer8 dnsmasq[1506]: using nameserver 208.67.222.222#53

这是 ifconfig 给我的

eth0      Link encap:Ethernet  HWaddr 00:24:21:a0:cf:d0  
      inet addr:192.168.1.108  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::224:21ff:fea0:cfd0/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:1039910 errors:0 dropped:0 overruns:0 frame:0
      TX packets:199 errors:0 dropped:47 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:68572248 (68.5 MB)  TX bytes:16079 (16.0 KB)

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:176 errors:0 dropped:0 overruns:0 frame:0
      TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:13122 (13.1 KB)  TX bytes:13122 (13.1 KB)

lxcbr0    Link encap:Ethernet  HWaddr ae:67:41:66:c6:71  
      inet addr:10.0.3.1  Bcast:10.0.3.255  Mask:255.255.255.0
      inet6 addr: fe80::ac67:41ff:fe66:c671/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:0 (0.0 B)  TX bytes:7989 (7.9 KB)

答案1

听起来路由器没有正确设置以转发 DHCP 请求。您可以检查日志以查看计算机是否正确发送了请求吗?(应该在日志查看器 -> 系统日志中可见)

相关内容