DHCP gateway failure

CAN to LAN Gateway in DIN Rail Plastic Casing
Locked
techno74
Posts: 4
Joined: Thu 9. Jul 2020, 13:00

DHCP gateway failure

Post by techno74 » Thu 9. Jul 2020, 13:24

I've recently received a PCAN-Ethernet Gateway DR and am setting it up for testing. To make this easy for integration into the test network I am using DHCP. I know that you don't reccomend it for production use but I am in control of the DHCP server so I can ensure the same address is assigned every time. DHCP function is very useful for us to speed up commisioning of the platform.

When I first received the device, enabling DHCP caused the device to stop talking on the network completely (verified with wireshark). No DHCP requests were sent but the unit was no longer available at it's default static address either. Reseting the unit made it accessible again at it's default static address. This was running 2.5.0 of the firmware.

I updated to 2.8.1 firmware. Now when I enable DHCP it immediately requests an address and is available on the address it is assigned. I have noticed however that according to the web interface the gateway is not set even though it is provided by the DHCP server. If I set a static address and a gateway and then revert to DHCP that gateway is maintained as the one set statically, not the one provided by the DHCP server.

If it makes a difference, the DHCP server and the gateway are not the same IP address.

Am I missing something?

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: DHCP gateway failure

Post by S.Michaelsen » Fri 10. Jul 2020, 09:36

Hi,

I'm not totally sure if I got you right. Are you talking about the IP address that is displayed on the network setting page (and is not editable when DHCP is activated)? This field only reflects the value that is written to the configuration file. Means if you would switch off DHCP this should be the address the module would have afterwards. So if DHCP is enabled it might differ from the one the module currently uses.

BR,
Stephan

techno74
Posts: 4
Joined: Thu 9. Jul 2020, 13:00

Re: DHCP gateway failure

Post by techno74 » Fri 10. Jul 2020, 13:04

Hello, thanks for replying!

I have attached some screenshots that hopefully show the issue. In the first one I configure a static IP of 192.168.0.132/24 and a gateway of 192.168.0.17. When I hit save, this information appears at the top of the page and the unit is accessible at http://192.168.0.132.
Static config
Static config
Screenshot from 2020-07-10 10-40-47.png (84.02 KiB) Viewed 111 times
When I re-enable DHCP, the unit is assigned 192.168.0.133/24 and a gateway of 192.168.0.1. The gateway does not update though and remains at 192.168.0.17. The device is however available at http://192.168.0.133 .
re-enabled DHCP
re-enabled DHCP
Screenshot from 2020-07-10 10-42-49.png (83.04 KiB) Viewed 111 times
If I delete the gateway before enabling DHCP it just stay as none:
No gateway
No gateway
Screenshot from 2020-07-10 12-02-44.png (84.5 KiB) Viewed 111 times
If you could confirm that you do not see the issue then I will assume that my DHCP server is doing something weird and will keep digging (It does work for other linux/windows hosts on the same network though).

Regards,
Rob

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: DHCP gateway failure

Post by S.Michaelsen » Fri 10. Jul 2020, 13:33

Hi Rob,

thanks for clarification. I'd guess that as for the normal IP Address the printed value is only the one read from the configuration file, not the one that is really used. If DHCP is enabled and sets a gateway address this one should be used, but I'll double check that.

BR,
Stephan

techno74
Posts: 4
Joined: Thu 9. Jul 2020, 13:00

Re: DHCP gateway failure

Post by techno74 » Fri 10. Jul 2020, 14:08

Hi Stephan,

I can confirm that the gateway does appear to be set and working (I can access the device from a different network via a router) it's just that the gateway is not shown on the LAN Interface section on the status page or on the LAN config page (It still says none in both places).

Sorry, I should have checked this first I just assumed that it wouldn't be working because the information on the page was not correct. It is misleading though you must admit :)

Thanks for your help,

Regards,

Rob

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: DHCP gateway failure

Post by S.Michaelsen » Tue 14. Jul 2020, 11:41

Hi Rob,

you're welcome. Meantime I double checked that the default gateway is set correctly if DHCP offers it but it is not updated on the status page. I was not aware of this inconsistent data. Since next release images are already build and under test a fix won't be included in 2.9.0 but I'm confident that it will be fixed in the later versions!

BR,
Stephan

techno74
Posts: 4
Joined: Thu 9. Jul 2020, 13:00

Re: DHCP gateway failure

Post by techno74 » Thu 16. Jul 2020, 23:44

Hi Stephan,

That's really good to know. Brilliant customer service, I love Peak products!

Rob

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: DHCP gateway failure

Post by S.Michaelsen » Mon 20. Jul 2020, 07:09

Thank you very much!

BR,
Stephan

Locked