저는 Netgear 라우터에 직접 연결된 이더넷 케이블을 사용하여 Beaglebone Black을 인터넷에 연결하려고 했습니다. 나는 많은 것을 시도했지만 지금까지 아무것도 효과가 없었습니다.
다음은 관련 출력입니다.
시스템 제어
# Yesterday, internet not working
● networking.service loaded failed failed Raise network interfaces
# Today after reflashing beaglebone, internet still not working
networking.service loaded active exited Raise network interfaces
IP 주소
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
link/can
3: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
link/can
4: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether a0:f6:fd:8a:ec:7e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.10/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.0.123/24 brd 192.168.0.255 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 2600:8806:502:b00:a2f6:fdff:fe8a:ec7e/64 scope global mngtmpaddr dynamic
valid_lft 86390sec preferred_lft 86390sec
inet6 fe80::a2f6:fdff:fe8a:ec7e/64 scope link
valid_lft forever preferred_lft forever
IP 라우팅
default via 192.168.0.1 dev eth0
68.105.28.11 via 192.168.0.1 dev eth0
68.105.28.12 via 192.168.0.1 dev eth0
68.105.29.11 via 192.168.0.1 dev eth0
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.10
192.168.0.1 dev eth0 scope link
192.168.6.0/30 dev usb1 proto kernel scope link src 192.168.6.2 linkdown
192.168.7.0/30 dev usb0 proto kernel scope link src 192.168.7.2 linkdown
212.227.81.55 via 192.168.0.1 dev eth0
google.com 호스팅
;; connection timed out; no servers could be reached
핑 www.google.com
ping: www.google.com: Temporary failure in name resolution
핑 192.168.0.1 (라우터)
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
--- 192.168.0.1 ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 8199ms
ping 192.168.0.39 (이더넷을 통해 동일한 라우터에 연결된 내 컴퓨터)
PING 192.168.0.39 (192.168.0.39) 56(84) bytes of data.
64 bytes from 192.168.0.39: icmp_seq=1 ttl=64 time=0.432 ms
64 bytes from 192.168.0.39: icmp_seq=2 ttl=64 time=0.324 ms
64 bytes from 192.168.0.39: icmp_seq=3 ttl=64 time=0.389 ms
64 bytes from 192.168.0.39: icmp_seq=4 ttl=64 time=0.387 ms
--- 192.168.0.39 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 0.324/0.383/0.432/0.038 ms
이 문제를 해결하는 방법을 모르겠습니다. 이 질문을 쓰기 시작했을 때 어제 작동하기 시작했는데, 이상하게 작동하기 시작했습니다. 오늘 아침에 재부팅했는데 다시 작동하지 않더군요.
답변1
다음으로 이동하여 /etc/network/interfaces
추가하세요.
auto eth0
iface eth0 inet static
address 192.168.0.100 # or whatever static IP you want
netmask 255.255.255.0
gateway 192.168.0.1
재부팅 후 Beaglebone은 Google에 성공적으로 핑을 보낼 수 있습니다.