Gateway problem

33 views
Skip to first unread message

massa...@gmail.com

unread,
Sep 17, 2019, 8:52:59 AM9/17/19
to BeagleBoard
Hi

I have a BeagleBone Black with a huge Problem

I i flashed the image Debian 9.5 2018-10-07 4GB SD IoT

I have one PC in Network 192.168.144.xxx Gateway 192.168.144.254
The Beaglebone is in network 192.168.143.xxx  Gateway 192.168.143.254

My interfaces file:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
# auto eth0
iface eth0 inet static
    address 192.168.143.207
    netmask 255.255.255.0
    gateway 192.168.143.254

# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE

##connman: ethX static config
#connmanctl services
#Using the appropriate ethernet service, tell connman to setup a static IP address for that service:
#sudo connmanctl config <service> --ipv4 manual <ip_addr> <netmask> <gateway> --nameservers <dns_server>

##connman: WiFi
#
#connmanctl
#connmanctl> tether wifi off
#connmanctl> enable wifi
#connmanctl> scan wifi
#connmanctl> services
#connmanctl> agent on
#connmanctl> connect wifi_*_managed_psk
#connmanctl> quit




# Ethernet/RNDIS gadget (g_ether)
# Used by: /opt/scripts/boot/autoconfigure_usb0.sh
iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252
    network 192.168.7.0
    gateway 192.168.7.1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

I can't ping the BeagleBone from the PC. It is possible to ping the Gateway in 192.168.143.xxx from PC and Beaglebone.

After booting the BeagleBone,  the "route" command shows:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         0.0.0.0         0.0.0.0         U     0      0        0 eth0
default         192.168.143.254 0.0.0.0         UG    0      0        0 eth0
link-local      0.0.0.0         255.255.0.0     U     0      0        0 eth0
192.168.6.0     0.0.0.0         255.255.255.252 U     0      0        0 usb1
192.168.7.0     0.0.0.0         255.255.255.252 U     0      0        0 usb0
192.168.143.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
There are two default routes!?!?!?!?!  WHY?

If i restart the network service, the first default route disappears and i can successfully ping the Beaglebone from the PC in the 192.168.144 network.
What did i wrong?

Dennis Lee Bieber

unread,
Sep 17, 2019, 1:48:59 PM9/17/19
to beagl...@googlegroups.com
On Tue, 17 Sep 2019 02:33:27 -0700 (PDT),
massa...@gmail.com declaimed the following:

>Hi
>
>I have a BeagleBone Black with a huge Problem
>
>I i flashed the image Debian 9.5 2018-10-07 4GB SD IoT
><https://debian.beagleboard.org/images/bone-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz>
>
>I have one PC in Network 192.168.144.xxx Gateway 192.168.144.254
>The Beaglebone is in network 192.168.143.xxx Gateway 192.168.143.254
>

Just a question: In the old days, 192.168.144.* and 192.168.143.* were
considered to be totally independent Class C networks. You'd need a router
(acting as a gateway) somewhere to cross from one to the other (but...
since the 192.168.*.* range is considered local/private networks, routers
normally do /not/ route them to other local/private nets).

The rest of my comments are musings, since I'm not fully acquainted
with the idiosyncrasies of setting up networks. All my devices use DHCP --
and if an IP needs to be "fixed" that is done in the DHCP router, which is
configured to always provide the same IP # to a host via MAC address (or
hostname -- not sure what that uVerse/Arris router uses).


># The primary network interface
># auto eth0
>iface eth0 inet static
> address 192.168.143.207
> netmask 255.255.255.0
> gateway 192.168.143.254
>

And here your netmask emphasizes that 192.168.144.* and 192.168.143.*
are separate networks.


>--------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>I can't ping the BeagleBone from the PC. It is possible to ping the Gateway
>in 192.168.143.xxx from PC and Beaglebone.
>

What IS this gateway machine? Is it configured to route between the two
networks? What does ITS routing table look like?
https://www.thegeekstuff.com/2012/04/route-examples/
(see section II, subsection #5)

>After booting the BeagleBone, the "route" command shows:
>--------------------------------------------------------------------------------------------------------------------------------------------------------------------
>Kernel IP routing table
>Destination Gateway Genmask Flags Metric Ref Use
>Iface
>default 0.0.0.0 0.0.0.0 U 0 0 0 eth0
>default 192.168.143.254 0.0.0.0 UG 0 0 0 eth0
>link-local 0.0.0.0 255.255.0.0 U 0 0 0 eth0
>192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0 usb1
>192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0 usb0
>192.168.143.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>--------------------------------------------------------------------------------------------------------------------------------------------------------------------
>There are two default routes!?!?!?!?! WHY?
>
>If i restart the network service, the first default route disappears and i
>can successfully ping the Beaglebone from the PC in the 192.168.144 network.
>What did i wrong?

Out of curiosity, what does ifconfig show for the eth0 (before and
after your restart of the network)

The use of a static IP could possibly be conflicting with a router
trying to assign a DHCP IP? Or there is some config file defining routes
that you need to modify which is being processed during a cold boot, but
not during a network restart.



--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

amf

unread,
Sep 17, 2019, 2:25:20 PM9/17/19
to BeagleBoard

Is this a typo? should be 'wifi on'
#connmanctl> tether wifi off

The 'auto eth0' should not be commented out, unless you are not using a connected ethernet cable
# auto eth0
iface eth0 inet static

Also, I don't see a 'wlan0' in your 'route' output, are your trying to connect via wifi or usb0?
more info might help

I'm using an Edimax wifi dongle and connected Ethernet cable, the image is the same that you posted

For 'route' this is what I get
debian@beaglebone:~$ route

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.3.1     0.0.0.0         UG    0      0        0 eth0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
192.168.2.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlan0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.3.1     0.0.0.0         255.255.255.255 UH    0      0        0 eth0

192.168.6.0     0.0.0.0         255.255.255.252 U     0      0        0 usb1

Dennis Lee Bieber

unread,
Sep 17, 2019, 5:17:33 PM9/17/19
to beagl...@googlegroups.com
On Tue, 17 Sep 2019 11:25:20 -0700 (PDT), amf
<fitte...@gmail.com> declaimed the
following:

>
>Is this a typo? should be 'wifi on'
>#connmanctl> tether wifi off
>
The OP stated "BeagleBone Black" -- the base BBB does not have WiFi

>The 'auto eth0' should not be commented out, unless you are not using a
>connected ethernet cable
># auto eth0
>iface eth0 inet static
>
And my BBB shows:

debian@beaglebone:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp
# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE

IE: both lines for eth0 are commented out -- works fine with a DHCP router
(which is why I'm suspicious of setting a static mode in the file; like
something is set up before the file is processed)

debian@beaglebone:~$ ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 192.168.1.69 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2600:1700:e630:890:d239:72ff:fe18:3ee5 prefixlen 64 scopeid
0x0<global>
inet6 fe80::d239:72ff:fe18:3ee5 prefixlen 64 scopeid 0x20<link>
inet6 2600:1700:e630:890::44 prefixlen 64 scopeid 0x0<global>
ether d0:39:72:18:3e:e5 txqueuelen 1000 (Ethernet)
RX packets 103 bytes 19904 (19.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 145 bytes 20821 (20.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 55

amf

unread,
Sep 18, 2019, 1:03:05 PM9/18/19
to BeagleBoard


On Tuesday, September 17, 2019 at 4:17:33 PM UTC-5, Dennis Lee Bieber wrote:
On Tue, 17 Sep 2019 11:25:20 -0700 (PDT), amf
<fitte...@gmail.com> declaimed the
following:

>
>Is this a typo? should be 'wifi on'
>#connmanctl> tether wifi off
>
Under stood, but why is he using connmanctl for eth0?

Dennis Lee Bieber

unread,
Sep 18, 2019, 1:55:06 PM9/18/19
to beagl...@googlegroups.com
On Wed, 18 Sep 2019 10:03:05 -0700 (PDT), amf
<fitte...@gmail.com> declaimed the
following:

>
>
>On Tuesday, September 17, 2019 at 4:17:33 PM UTC-5, Dennis Lee Bieber wrote:
>>
>> On Tue, 17 Sep 2019 11:25:20 -0700 (PDT), amf
>> <fitte...@gmail.com <javascript:>> declaimed the
>> following:
>>
>> >
>> >Is this a typo? should be 'wifi on'
>> >#connmanctl> tether wifi off
>> >
>>
>Under stood, but why is he using connmanctl for eth0?

So far as I can tell, he isn't... All the connmanctl lines in his file
are COMMENTS. And exist as such in my stock install too.
Reply all
Reply to author
Forward
0 new messages