Networking post RTG release

Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Networking post RTG release

Unread post by Trezzer »

Hi,

A bit of a MiSTer n00b, but a long time Amiga user here.

I had a set-up with networking and basic tools installed on my Minimig core, but as soon as I saw RTG support was added, I jumped on it. To get ready, I ran the Retrodriven MiSTer Update Suite to get everything as up to date as possible including the Minimig-core. Since then, however, I have been unable to access anything over PPP.

I went through my MiamiDX settings and even tested a few things here and there, before scrapping everything and setting everything up all over again using the instructions that worked for me in the first place. Whenever I try to use a browser, it stalls at a DNS lookup, but in reality it seems things are even worse, because as soon as MiamiDX is connected, network packets simply disappear into thin air. As soon as I go offline, I get errors, but there is simply zero output while testing with miamiping - even while simply trying to reach my router. I've tried dynamic ppp setup (which used to work) as well as static just to see if it made a difference.

I tried accessing the linux shell using console in UART, and that works fine. I can also use other networking tools like cifs or browse using the LXDE package. This is only using ethernet, though, because somehow I have to also keep setting up WiFi after every boot and then it seems to stall as well. I grabbed an old wifi-link with ethernet out and I have networking going everywhere but inside Minimig now (and RTG is working, yay).

I tried having a look through the ppp options in media/fat but I didn't see anything that didn't match up with the settings on the Amiga side.

Right now I'm rather stumped and wondering if I should try just saving my various setups and start from scratch, but if anyone has any ideas I should try first, I'd definitely rather give that a go.
Michael1260
Posts: 36
Joined: Wed Sep 16, 2020 11:42 am
Been thanked: 10 times

Re: Networking post RTG release

Unread post by Michael1260 »

Maybe you can find something here : http://www.geocities.ws/allforamiga/
georgemog
Posts: 18
Joined: Wed Aug 19, 2020 5:03 pm
Been thanked: 15 times

Re: Networking post RTG release

Unread post by georgemog »

I used that site and it was very easy to do. I also used the tips in the "PPP Network with Miami DX" topic. viewtopic.php?t=82

Do a google search for the Miami DX keys.
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

Thanks, but that's the guide I've been using already :)
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Networking post RTG release

Unread post by mparson »

I'd double-check that your Miami settings are correct. Double check that your settings match the screenshots, particularly, the setup of the Interface, make sure the "IP type" and "Gateway type" are set to "dynamic."

Some commands to try from a cli:

First, check that the ppp0 interface came up properly (All IPs are going to show my network, your network numbers will probably be different):

Code: Select all

5.sda1:Programs/MiamiDX> MiamiIfConfig ppp0
ppp0: flags=8011<UP,POINTOPOINT,MULTICAST>
        inet 192.168.15.254 --> 192.168.15.233 netmask 0xffffff00
Next, check your routing table:

Code: Select all

5.sda1:Programs/MiamiDX> MiamiNetStat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use  Interface
default            192.168.15.233     UGSP        0        0  ppp0
127                127.0.0.1          UGRSP       0        0  lo0
127.0.0.1          127.0.0.1          UH          2        0  lo0
192.168.15.233     link#3             UHC         1        0  ppp0
192.168.15.254     127.0.0.1          UGHS        0        0  lo0
224/4              link#3             UCS         0        0  ppp0
And now, see if you can ping the gateway IP for the default route:

Code: Select all

5.sda1:Programs/MiamiDX> MiamiPing -c3 192.168.15.233
PING 192.168.15.233 (192.168.15.233): 56 data bytes
64 bytes from 192.168.15.233: icmp_seq=0 ttl=64 time=29.352 ms
64 bytes from 192.168.15.233: icmp_seq=1 ttl=64 time=37.358 ms
64 bytes from 192.168.15.233: icmp_seq=2 ttl=64 time=28.781 ms

--- 192.168.15.233 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 28.781/31.83/37.358 ms
If that works, then try pinging the default route for your full network.
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

Hi,

Thanks. That helped me gain some insight, at least.

I have run through all the settings multiple times, and they are identical to the guide. What throws me is that it went from working one day to not working the next - without me making any changes in MiamiDX at all.

When I run ifconfig, I have 10.0.0.254-> 10.0.0.48 with a netmask of 0xff000000 - which strikes me as odd. I take it that should be identical to your netmask.

The routing tables are just like yours except mine are my IP addresses as listed above, and I can ping the host IP (.48) just fine. I can't ping anything else, though. My intuition says that the host isn't forwarding from the Amiga - which I guess makes sense in terms of not making any MiamiDX changes before things broke.

I have double-checked that baud rate, 8N1, CTS/RTS, CD and MTU rates match the screenshot when I reconfigured from scratch. Is there anywhere in the host OS I should check besides /media/fat/linux/ppp_options ?
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

Just to see if it WAS MiamiDX, I set up Roadshow as well, and I have the exact same behavior. I can ping the host but nothing else.
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Networking post RTG release

Unread post by mparson »

At some point after my "things to check" post above, my networking started doing the same thing, kinda... I could ping anything I wanted, by IP. I could do 'MiamiNSlookup www.google.com 8.8.8.8' and get an answer, but I couldn't otherwise get any name resolution. I poked around a lot, but what finally seemed to fix it was to remove the nameserver entry and add it back, then save the settings as default again, go offline, then online again, and things started working.

I've not made any changes to the Linux side at all.

That you're getting IPs in 10.0.0.0/8 is odd indeed.

To make sure the Linux box is set to forward packets:

Code: Select all

/root# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
Maybe re-run the MiSTer updater script, let it all reboot and try again?
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

OK, I can tell that ipv4 forwarding is off, but there is no /etc/sysctl.conf on MiSTer - and it seems to ignore net.ipv4.ip_forward = 1 added into a new sysctl.conf in /etc.

Where are the settings for sysctl stored on MiSTer's Linux?

Btw I've already tried running the updater script (in full, too) with no change :/
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Networking post RTG release

Unread post by mparson »

Ah, one more thing, looks like that will be '0' if you don't have a ppp session set up in a running core. I got the output from that earlier run while the core was running and had the MiamiDX ppp session connected, but I was connected to the MiSTer over ssh.

The Linux image isn't a typical Ubuntu/RedHat/Whatever type setup, it seems to be based on Buildroot, which is for embedded applications like this.

Much grepping has found a few places net.ipv4.ip_forward should be being set. The one that seems most likely is in /usr/sbin/uartmode, on line 42:

Code: Select all

echo 1 > /proc/sys/net/ipv4/ip_forward
There's also line 118 of /usr/share/ctdb/events/legacy/11.natgw.script, but I've not poked around enough to see if that's being called by anything.

Code: Select all

set_proc sys/net/ipv4/ipforward 1
For reference, here's the basic info on the Linux image I'm poking around in:

Code: Select all

/root# cat /etc/os-release
NAME=Buildroot
VERSION=2017.02-g42d3f9d
ID=buildroot
VERSION_ID=2017.02
PRETTY_NAME="Buildroot 2017.02"

/root# uname -a
Linux MiSTer 4.19.0-socfpga-r1 #9 SMP Tue Sep 8 22:13:28 CST 2020 armv7l GNU/Linux
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

OK, it seems my system actually activates the ip_forward when I enable ppp in MiamiDX.

I have generally been switching between console and Minimig because I was using a rather simple KVM, so I never saw ip_forward = 1, but when using ssh while connected, it does change on the host side of things.

Meanwhile, I've been digging for where it gets its netmask from without any luck so far. The host side of things uses 255.255.255.0, and with everything else being similar MiamiDX should pick that up.

Maybe I should just try setting up a completely new virtual Amiga with TCP/IP and test that - at least that's faster than reinstalling everything else. Alternatively I suppose I could find something to test out PPP in ao486, but I'm not familiar with networking under DOS/pre-95.
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Networking post RTG release

Unread post by mparson »

Is your local network using the 10.0.0.0/255.255.255.0 network?

With the Amiga core connected, what does 'ifconfig ppp0' on the Linux side show?

Right now, my WAG is that something in the stack is not understanding CIDR networking and is instead treating this as pre-CIDR Class networking, in which anything in the 10.0.0.0-10.255.255.255 range is a "Class A" network and my "192.168.15.0" IP is in the "Class C" range (192.0.0.0-233.255.255.255), and the netmasks we're getting seem to correspond to that.

Maybe hard-code the netmask on the MiSTer Linux side in /media/fat/linux/ppp_options, should just need to uncomment line 76:

Code: Select all

 74 # Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
 75 # notation (e.g. 255.255.255.0).
 76 netmask 255.255.255.0
 
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

My LAN is running 10.0.0.x with a netmask of 255.255.255.0.

When I look in the ppp options file, the netmask is already uncommented and set to 255.255.255.0. Yet Miami still shows 255.0.0.0 with no option to change it, and I've attached a screenshot of what the Linux side shows on ifconfig ppp0.
Attachments
CB79CAC7-FD0C-484B-9CA5-C5FC192FB7F7.jpeg
CB79CAC7-FD0C-484B-9CA5-C5FC192FB7F7.jpeg (315.27 KiB) Viewed 9633 times
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Networking post RTG release

Unread post by mparson »

Yeah, that's basically what I see on the linux side of mine as well.

I guess the really weird part is that this was working for you before.

I went back and re-read your original post. You mentioned that you'd tested with the MiSTer hooked up over ethernet, wifi, and now finally with some sort of wifi<->ethernet bridge, which the MiSTer would just see as an ethernet connection? Do you, by chance, have the wifi dongle plugged in as well, even if it's not configured/functioning properly? If so, try unplugging that so the MiSTer only sees the ethernet connection.
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

No, I did unplug it when I plugged in the bridge (which indeed is just ethernet to the MiSTer), so it can't be the cause of the issue. And yeah, I'm rather confused. I think I'll grab a new sd card, set up a basic system and try to move the Minimig system across to see if the behavior is different. It's easier than getting a new virtual Amiga up and running.
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Networking post RTG release

Unread post by mparson »

I did my initial Amiga HD setup under FS-UAE on Linux, then copied the VHD files to the MiSTer SD card. You should be able to do the same using WinUAE if you're a Windows user.
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

I have now made a from-scratch configuration of AmigaOS (from WB 3.1 floppies and onward) and the issue is sadly the exact same. The error must lie in either the communication with the host system or the forwarding on the host side.

I guess the next thing to try is simply setting up a fresh SD card and running the various update scripts one by one to see if I run into the issue again.
Lisko
Posts: 88
Joined: Sun May 24, 2020 10:45 pm
Has thanked: 18 times
Been thanked: 3 times

Re: Networking post RTG release

Unread post by Lisko »

Strange, I'm on 3.1.4 with RTG and my network with Miamidx works well. My problem is that it seems that using remote->tcp setting my terminal programs don't work anymore, I always get no response from modem. If I use uart setting I'm able to get a Linux shell. Could you please check if remote->tcp works for you in terminal softwares?
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

I don't really have anything to test with. I have the console working too with the host console.

Got a url for me to test?
Zacpod
Posts: 9
Joined: Fri Jan 01, 2021 9:54 pm
Has thanked: 4 times

Re: Networking post RTG release

Unread post by Zacpod »

This is probably due to both networks being 10.x.x.x. The IP stack on the MiSTer is maybe getting confused about where each 10.x.x.x IP is.

If possible, try connecting the MiSTer to something with a different subnet - e.g. 192.168.1.x/24 and see if that works.
Trezzer
Posts: 15
Joined: Mon Oct 26, 2020 7:32 pm
Has thanked: 1 time

Re: Networking post RTG release

Unread post by Trezzer »

I thought I'd just give a quick update here even though it's been a while (didn't quite feel up to starting over). I kept all emulated environments intact and installed MiSTer from scratch. After copying everything back, networking worked as expected again. It's not exactly a quick fix, but if others run into something similar, at least it's an option.
Post Reply