O Beaglebone não consegue se conectar à Internet usando o cabo ethernet

0

Estou tentando fazer com que o meu Beaglebone Black se conecte à Internet usando um cabo ethernet conectado diretamente ao meu roteador Netgear. Eu tentei muitas coisas, mas nada funcionou até agora.

Aqui estão alguns resultados relevantes.

systemctl

# 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

endereço 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

rota 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 

host google.com

;; connection timed out; no servers could be reached

ping www.google.com

ping: www.google.com: Temporary failure in name resolution

ping 192.168.0.1 (roteador)

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 (meu computador, conectado ao mesmo roteador via ethernet)

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

Eu não tenho ideia de como consertar isso. Começou a trabalhar ontem quando comecei a escrever esta pergunta e começou a trabalhar misteriosamente. Eu reiniciei esta manhã e não está funcionando novamente.

    
por sscirrus 18.05.2018 / 21:55

1 resposta

0

Vá para /etc/network/interfaces e adicione:

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

Após a reinicialização, o Beaglebone pinga o Google com sucesso.

    
por 18.05.2018 / 22:39