MISTer Ethernet (not so) strange behaviour

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

MISTer Ethernet (not so) strange behaviour

Postby Asmith » Sun Oct 14, 2018 10:36 pm

Hi,

New MISTer owner here, very happy with it what a huge step forward compared to the MIST i used to have.

Globally everything is working for me except one thing : the ethernet connection.
I plugged the Mister on my network where there is a DHCP server, i look on the core menu and it's displaying the ip , try to ssh on it : no answer , try to ping : no answer.
I connect through the console port , with an ifconfig i can see that the ip is correct , From the mister i can ping his own ip but not my gateway or any other machine .
Looking on my dhcp server i see that there are two bindings for the Mister :

IP address Session Id Hardware address Expires State Interface
192.168.0.107 50 02:03:04:05:06:07 84779 BOUND vlan.101
192.168.0.108 51 02:03:04:05:06:07 84779 BOUND vlan.101

i'm Clearing the bindings

ifconfig eth0 down/up on the mister and once again 2 addresses :

IP address Session Id Hardware address Expires State Interface
192.168.0.109 52 02:03:04:05:06:07 86388 BOUND vlan.101
192.168.0.110 53 02:03:04:05:06:07 86389 BOUND vlan.101

From the mister i can ping these 2 addresses

The content of /var/log/messages during the renew :

Jan 1 00:28:19 MiSTer user.info kernel: [ 1699.533090] socfpga-dwmac ff702000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Jan 1 00:28:19 MiSTer daemon.info dhcpcd[953]: eth0: IAID 04:05:06:07
Jan 1 00:28:19 MiSTer daemon.warn connmand[903]: ipconfig state 3 ipconfig method 1
Jan 1 00:28:20 MiSTer daemon.info dhcpcd[953]: eth0: rebinding lease of 192.168.0.101
Jan 1 00:28:20 MiSTer daemon.warn dhcpcd[953]: eth0: NAK: from 192.168.0.254
Jan 1 00:28:20 MiSTer daemon.info dhcpcd[953]: eth0: soliciting a DHCP lease
Jan 1 00:28:20 MiSTer daemon.info dhcpcd[953]: eth0: offered 192.168.0.110 from 192.168.0.254
Jan 1 00:28:20 MiSTer daemon.info connmand[903]: eth0 {add} address 192.168.0.109/24 label eth0 family 2
Jan 1 00:28:20 MiSTer daemon.info connmand[903]: eth0 {add} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
Jan 1 00:28:20 MiSTer daemon.info connmand[903]: eth0 {add} route 192.168.0.254 gw 0.0.0.0 scope 253 <LINK>
Jan 1 00:28:20 MiSTer daemon.info connmand[903]: eth0 {add} route 8.8.8.8 gw 192.168.0.254 scope 0 <UNIVERSE>
Jan 1 00:28:20 MiSTer daemon.info connmand[903]: eth0 {add} route 0.0.0.0 gw 192.168.0.254 scope 0 <UNIVERSE>
Jan 1 00:28:21 MiSTer daemon.info dhcpcd[953]: eth0: probing address 192.168.0.110/24
Jan 1 00:28:22 MiSTer daemon.info ntpd[909]: Listen normally on 4 eth0 192.168.0.109:123
Jan 1 00:28:25 MiSTer daemon.info dhcpcd[953]: eth0: leased 192.168.0.110 for 86400 seconds
Jan 1 00:28:25 MiSTer daemon.info dhcpcd[953]: eth0: adding route to 192.168.0.0/24
Jan 1 00:28:25 MiSTer daemon.info dhcpcd[953]: eth0: adding default route via 192.168.0.254
Jan 1 00:28:25 MiSTer daemon.info connmand[903]: eth0 {add} address 192.168.0.110/24 label eth0 family 2
Jan 1 00:28:25 MiSTer daemon.info connmand[903]: eth0 {add} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
Jan 1 00:28:25 MiSTer daemon.info connmand[903]: eth0 {del} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
Jan 1 00:28:25 MiSTer daemon.info connmand[903]: eth0 {add} route 0.0.0.0 gw 192.168.0.254 scope 0 <UNIVERSE>
Jan 1 00:28:25 MiSTer daemon.info connmand[903]: eth0 {del} route 0.0.0.0 gw 192.168.0.254 scope 0 <UNIVERSE>
Jan 1 00:28:25 MiSTer daemon.info connmand[903]: eth0 {add} route 0.0.0.0 gw 192.168.0.254 scope 0 <UNIVERSE>
Jan 1 00:28:26 MiSTer daemon.warn connmand[903]: Online check failed for 0xc4290 Wired
Jan 1 00:28:27 MiSTer daemon.info ntpd[909]: Listen normally on 5 eth0 192.168.0.110:123

Looked on the forum/github and didn't see something similar mentioned , i'm not a linux expert and this pb seems out of my league :oops: , any advice ?

Thanks in advance,

A_s
Last edited by Asmith on Thu Oct 18, 2018 7:29 pm, edited 1 time in total.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2909
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Ethernet strange behaviour

Postby Sorgelig » Sun Oct 14, 2018 10:54 pm

Try ifconfig without parameters in MiSTer console.
This will show what IP address MiSTer get and gateway IP.

Basically it should work without any special settings. Is there only one MiSTer connected to the LAN? DE10-nano has no EEPROM with MAC address, so bootloader sets the fixed MAC address 02:03:04:05:06:07 on every MiSTer. So 2 MiSTers will fight to each other on the same LAN segment.

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

Re: MISTer Ethernet strange behaviour

Postby Asmith » Mon Oct 15, 2018 6:32 am

Hi Sorgelig and thanks for your answer,

>Try ifconfig without parameters in MiSTer console
doing a ifconfig give me one address , let say .100 , but , on the dhcp server i see that the mister was given a secondary ip by the dhcp server for example 101.

And this ip is responding locally to ping , from the mister only , as the other one .

I configure manualy an ip address :
- ifconfig eth0 192.168.0.110 netmask 255.255.255.0
- clear the binding on the dhcp server
- shut/no shut the interface :
ifconfig eth0 down
ifconfig eth0 up

the ifconfig will show the .110 , but the mister will ask for two new dhcp addresses , and theses 3 ip will be 'ping-able" only from the mister ...

>Is there only one MiSTer connected to the LAN
Yes.

What process is requesting the ip adresses for the Mister ? , i killed Dhcpd it's still requesting IP , on the /network/interface there is no configuration for the eth0 either .


A_s

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2909
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Ethernet strange behaviour

Postby Sorgelig » Mon Oct 15, 2018 9:59 am

probably something wrong in your dhcp server setting. Make sure your dhcp server reserves lease for some time like at least 1hr for the same MAC address.
Another way is to manually reserve IP on dhcp server for specific MAC (MAC of MiSTer).

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

Re: MISTer Ethernet strange behaviour

Postby Asmith » Mon Oct 15, 2018 11:07 am

The lease on my dhcp server by default is for one day , and is working like a charm since the begining for my pc , console , TV , NAS (dhcp managed by a hardware firewall by the way).
I also forced one specific IP to the mac@ 02:03:04:05:06:07 , it was correctly assigned to the Mister (verified in ipconfig) but it didn't stopped him to ask for 2 new addresses .
I will try to use a new dhcp server and wireshark to see what's going in and out of the Mister

A_s

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2909
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Ethernet strange behaviour

Postby Sorgelig » Mon Oct 15, 2018 1:03 pm

I have no idea what it can be.
I think only you can find what's the problem as you are the first one with this problem.

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

Re: MISTer Ethernet strange behaviour

Postby Asmith » Mon Oct 15, 2018 1:37 pm

>I think only you can find what's the problem as you are the first one with this problem.
Great :D , Will try the Linux core , that will give me more tools to debug and eliminate the possibility of a de-10 hardware problem

A_s

Doozer
Atariator
Atariator
Posts: 21
Joined: Fri Apr 22, 2016 12:26 pm

Re: MISTer Ethernet strange behaviour

Postby Doozer » Tue Oct 16, 2018 3:00 pm

Sorgelig wrote:Try ifconfig without parameters in MiSTer console.
This will show what IP address MiSTer get and gateway IP.

Basically it should work without any special settings. Is there only one MiSTer connected to the LAN? DE10-nano has no EEPROM with MAC address, so bootloader sets the fixed MAC address 02:03:04:05:06:07 on every MiSTer. So 2 MiSTers will fight to each other on the same LAN segment.


Just wanted to share my experience to have two Misters (or more) running on the same LAN.

@Sorgelig, I agree the exposed solution is only a quick workaround to have more than one Mister on the same LAN. Unfortunately, without nand access to store the uboot configuration it is the easiest quick fix. Overriding MAC address from linux kernel command line could also be an option.

The sed command is replacing the embedded MAC (uboot configuration) on existing binary. This way, it is possible to have different MAC for each HW.

Change the MAC assignment inside the uboot binary file

Code: Select all

sed -i 's/02:03:04:05:06:07/02:03:04:05:06:08/' /media/fat/linux/uboot.img


Update the uboot boot partition on the installed SD card

Code: Select all

/media/fat/linux/updateboot

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2909
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Ethernet strange behaviour

Postby Sorgelig » Tue Oct 16, 2018 3:40 pm

no need to re-invent the wheel.

enter the u-boot command line (keep ESC in console while booting MiSTer)
then in command line enter:

Code: Select all

setenv ethaddr 02:03:04:05:06:08

then

Code: Select all

saveenv


reboot the MiSTer and enjoy the different MAC address.

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

Re: MISTer Ethernet strange behaviour

Postby Asmith » Tue Oct 16, 2018 6:33 pm

Hi,

Just for the record , ran wireshark to see the paquets going in and out.
Fun fact : the mister send ARP request, the other hosts on the network answer to this request with their Mac address and the Mister seems just seems to ignore it ... : so no entries in the arp table -> mister is unreachable.
Tried the Linux core , tried the terasic distrib , same results , so i fear a hardware problem ... :( , dropped a mail to terasic support : no answer .
In the meantime i used a wifi usb adapter and yes i've got some connectivity but not the way i would like. :evil:

A_s

Sefirosu
Retro freak
Retro freak
Posts: 10
Joined: Sat Jun 23, 2018 5:35 pm

Re: MISTer Ethernet strange behaviour

Postby Sefirosu » Wed Oct 17, 2018 9:44 pm

I have a somewhat similar thing. Device gets two IPs from DHCP even if I have reserved one in the server.

root@SRX> show dhcp server binding
IP address Session Id Hardware address Expires State Interface
10.0.28.13 30 02:03:04:05:06:07 3580 BOUND ge-0/0/2.100 <= DHCP reserved IP
10.0.26.2 31 02:03:04:05:06:07 3580 BOUND ge-0/0/2.100 <= Second IP obtained

And they both work, however. (PING isn't always a good test but SSH works on both IPs as well)

root@SRX> ping 10.0.26.2
PING 10.0.26.2 (10.0.26.2): 56 data bytes
64 bytes from 10.0.26.2: icmp_seq=0 ttl=64 time=2.054 ms
64 bytes from 10.0.26.2: icmp_seq=1 ttl=64 time=1.723 ms
^C
--- 10.0.26.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.723/1.889/2.054/0.165 ms

root@SRX> ping 10.0.28.13
PING 10.0.28.13 (10.0.28.13): 56 data bytes
64 bytes from 10.0.28.13: icmp_seq=0 ttl=64 time=1.801 ms
64 bytes from 10.0.28.13: icmp_seq=1 ttl=64 time=1.888 ms
^C
--- 10.0.28.13 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.801/1.845/1.888/0.043 ms

Honestly haven't looked into this at all further at this point. Just saw that recently.

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

Re: MISTer Ethernet strange behaviour

Postby Asmith » Wed Oct 17, 2018 10:26 pm

Yes but finaly the "double ip address" is not really a problem , the problem for me is the empty arp table of the mister.
Seems we have the same kind of "dhcp server" by the way ;)

A_s

Sefirosu
Retro freak
Retro freak
Posts: 10
Joined: Sat Jun 23, 2018 5:35 pm

Re: MISTer Ethernet strange behaviour

Postby Sefirosu » Wed Oct 17, 2018 10:54 pm

Asmith wrote:Yes but finaly the "double ip address" is not really a problem , the problem for me is the empty arp table of the mister.
Seems we have the same kind of "dhcp server" by the way ;)

A_s


Mine seems to work fine other than that however, so the ARP table must be populated… an SRX300 is the DHCPD in my network at the moment but I’ll try some other devices this weekend just to see (networking is my day job and my home is a networking overkill mess).

Locutus73
Captain Atari
Captain Atari
Posts: 170
Joined: Wed Feb 07, 2018 6:13 pm

Re: MISTer Ethernet strange behaviour

Postby Locutus73 » Thu Oct 18, 2018 11:17 am

Same problem here: a single DE10-Nano in my network connected through etherenet to an Airport Express as a bridge and a pfSesnse firwall running DHCP. Each time I turn on MiSTer it gets two distinct local addresses I can see in the DHCP lease table. I deleted the entries, but again two addresses. Ifconfig on MiSTer Linux shows only one of the two addresses, but both work, I can ssh MiSTer on both addresses and MiSTer can ping its secondary ghost address.

Many thanks in advance.
Regards.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2909
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Ethernet strange behaviour

Postby Sorgelig » Thu Oct 18, 2018 11:38 am

So, there are actually 2 issues. Issue with dual IP seems doesn't prevent MiSTer to access the net and can be ignored. Why MiSTer cannot access the net - lays in some other unknown issue.

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

Re: MISTer Ethernet strange behaviour

Postby Asmith » Thu Oct 18, 2018 11:47 am

"Issue with dual IP seems doesn't prevent MiSTer to access the net and can be ignored " : yes the mister is only requesting a 2ndary ip address for the same interface .
TIP : you can see this 2nd address doing the following command : "ip address list" , the ifconfig is not displaying the 2nd one.
I requested technical support from mouser.com (where i bought the cart ) , i'm pretty sure that my card is faulty because even with the stock linux distribution i have the same problem , so it's not related to the MISTer environment .

A_s

Asmith
Atariator
Atariator
Posts: 21
Joined: Mon Oct 12, 2015 2:57 pm

Re: MISTer Ethernet strange behaviour

Postby Asmith » Thu Oct 18, 2018 7:29 pm

Damn , shitty first price ethernet switch , put my ethernet cable on another port and ... workin' :oops: , seems that the mister didn"t like the netgear very-confused-vlan configuration contrary to my pc ... So we're good :mrgreen:

A_s

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2909
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Ethernet (not so) strange behaviour

Postby Sorgelig » Thu Oct 18, 2018 10:26 pm

if anyone care, then would be good to find out why MiSTer asks for 2 IPs. I have no time for this investigation.

Doozer
Atariator
Atariator
Posts: 21
Joined: Fri Apr 22, 2016 12:26 pm

Re: MISTer Ethernet (not so) strange behaviour

Postby Doozer » Fri Oct 19, 2018 11:23 am

Sorgelig wrote:if anyone care, then would be good to find out why MiSTer asks for 2 IPs. I have no time for this investigation.


Seeing cascading DHCP request is not an issue as per say. It can be related to two distinct queries made during the boot process. One from uboot and one from OS or as seen on standard PC distro one from initrd and one from Linux OS.

Isn't Mister also managing the networking when looking forward wireless or wired interface?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2909
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Ethernet (not so) strange behaviour

Postby Sorgelig » Fri Oct 19, 2018 11:44 am

Doozer wrote:Isn't Mister also managing the networking when looking forward wireless or wired interface?

it's up to Linux decision. It's supposed to have only one connection.

Sefirosu
Retro freak
Retro freak
Posts: 10
Joined: Sat Jun 23, 2018 5:35 pm

Re: MISTer Ethernet (not so) strange behaviour

Postby Sefirosu » Fri Oct 19, 2018 10:06 pm

Sorgelig wrote:if anyone care, then would be good to find out why MiSTer asks for 2 IPs. I have no time for this investigation.


It seems that both dhcpcd and connmand are requesting IP addresses:

Code: Select all

Jan  1 00:00:26 MiSTer daemon.warn connmand[904]: ipconfig state 3 ipconfig method 1
Jan  1 00:00:26 MiSTer daemon.info dhcpcd[953]: eth0: soliciting a DHCP lease
Jan  1 00:00:27 MiSTer daemon.info dhcpcd[953]: eth0: offered 10.0.26.5 from 10.0.24.1
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {add} address 10.0.28.13/21 label eth0 family 2
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {add} route 10.0.24.0 gw 0.0.0.0 scope 253 <LINK>
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {add} route 10.0.24.1 gw 0.0.0.0 scope 253 <LINK>
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {add} route 75.153.176.1 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {add} route 75.153.171.122 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {add} route 0.0.0.0 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {add} route 212.227.81.55 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:27 MiSTer daemon.info connmand[904]: eth0 {del} route 212.227.81.55 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:27 MiSTer daemon.info dhcpcd[953]: eth0: probing address 10.0.26.5/21
Jan  1 00:00:29 MiSTer daemon.info ntpd[909]: Listen normally on 2 eth0 10.0.28.13:123
Jan  1 00:00:32 MiSTer daemon.info dhcpcd[953]: eth0: leased 10.0.26.5 for 3600 seconds
Jan  1 00:00:32 MiSTer daemon.err dhcpcd[953]: dhcp_bind: write_lease: Read-only file system
Jan  1 00:00:32 MiSTer daemon.info dhcpcd[953]: eth0: adding route to 10.0.24.0/21
Jan  1 00:00:32 MiSTer daemon.info dhcpcd[953]: eth0: adding default route via 10.0.24.1
Jan  1 00:00:32 MiSTer daemon.info connmand[904]: eth0 {add} address 10.0.26.5/21 label eth0 family 2
Jan  1 00:00:32 MiSTer daemon.info connmand[904]: eth0 {add} route 10.0.24.0 gw 0.0.0.0 scope 253 <LINK>
Jan  1 00:00:32 MiSTer daemon.info connmand[904]: eth0 {del} route 10.0.24.0 gw 0.0.0.0 scope 253 <LINK>
Jan  1 00:00:32 MiSTer daemon.info connmand[904]: eth0 {add} route 0.0.0.0 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:32 MiSTer daemon.info connmand[904]: eth0 {del} route 0.0.0.0 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:32 MiSTer daemon.info connmand[904]: eth0 {add} route 0.0.0.0 gw 10.0.24.1 scope 0 <UNIVERSE>


After moving or removing /etc/init.d/S91dhcpcd

Only one IP requested:

Code: Select all

Jan  1 00:00:16 MiSTer daemon.warn connmand[905]: ipconfig state 3 ipconfig method 1
Jan  1 00:00:16 MiSTer daemon.info connmand[905]: eth0 {add} address 10.0.28.13/21 label eth0 family 2
Jan  1 00:00:16 MiSTer daemon.info connmand[905]: eth0 {add} route 10.0.24.0 gw 0.0.0.0 scope 253 <LINK>
Jan  1 00:00:16 MiSTer daemon.info connmand[905]: eth0 {add} route 10.0.24.1 gw 0.0.0.0 scope 253 <LINK>
Jan  1 00:00:16 MiSTer daemon.info connmand[905]: eth0 {add} route 75.153.176.1 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:16 MiSTer daemon.info connmand[905]: eth0 {add} route 75.153.171.122 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:16 MiSTer daemon.info connmand[905]: eth0 {add} route 0.0.0.0 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:17 MiSTer daemon.info connmand[905]: eth0 {add} route 212.227.81.55 gw 10.0.24.1 scope 0 <UNIVERSE>
Jan  1 00:00:18 MiSTer daemon.info ntpd[911]: Listen normally on 2 eth0 10.0.28.13:123
Jan  1 00:00:24 MiSTer daemon.info connmand[905]: eth0 {del} route 212.227.81.55 gw 10.0.24.1 scope 0 <UNIVERSE>


Code: Select all

root@SRX> show dhcp server binding
IP address        Session Id  Hardware address   Expires     State      Interface
10.0.28.13        48          02:03:04:05:06:07  3580        BOUND      ge-0/0/2.100


Probably only one of them is needed. Still should not prevent anything from working though.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 8 guests