Classless-Routes not being added by dhcp-client

Hi there!

The dhcp-client isn’t adding dynamic routes specified by DHCP. Any ideas why? Am I missing something obvious?

I’ve included snippets of what I think is relevant below. Please let mw know if you need more information.

/system resource print
             uptime: 15h32m20s
            version: 6.48.2 (stable)
         build-time: Apr/09/2021 10:17:26
   factory-software: 6.44.6
        free-memory: 972.0MiB
       total-memory: 1024.0MiB
                cpu: ARMv7
          cpu-count: 4
      cpu-frequency: 1400MHz
           cpu-load: 0%
     free-hdd-space: 422.7MiB
    total-hdd-space: 512.3MiB
  architecture-name: arm
         board-name: RB4011iGS+
           platform: MikroTik
   
           
/ip dhcp-client
add disabled=no interface=Starlink
           
           
13:44:25 dhcp,debug,packet dhcp-client on Starlink sending request with id 2226451417 to 100.127.255.5 
13:44:25 dhcp,debug,packet     ciaddr = 100.74.98.207 
13:44:25 dhcp,debug,packet     chaddr = 08:55:31:E8:DC:BF 
13:44:25 dhcp,debug,packet     Msg-Type = request 
13:44:25 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
13:44:25 dhcp,debug,packet     Host-Name = "Gateway" 
13:44:25 dhcp,debug,packet     Client-Id = 01-08-55-31-E8-DC-BF 
13:44:25 dhcp,debug,packet dhcp-client on Starlink received ack with id 2226451417 from 100.127.255.5 
13:44:25 dhcp,debug,packet     ciaddr = 0.0.0.0 
13:44:25 dhcp,debug,packet     yiaddr = 100.74.98.207 
13:44:25 dhcp,debug,packet     chaddr = 08:55:31:E8:DC:BF 
13:44:25 dhcp,debug,packet     Msg-Type = ack 
13:44:25 dhcp,debug,packet     Server-Id = 100.127.255.5 
13:44:25 dhcp,debug,packet     Subnet-Mask = 255.192.0.0 
13:44:25 dhcp,debug,packet     Router = 100.127.255.5 
13:44:25 dhcp,debug,packet     Domain-Server = 8.8.8.8,8.8.4.4 
13:44:25 dhcp,debug,packet     Address-Time = 300 
13:44:25 dhcp,debug,packet     Classless-Route = 192.168.100.1/32->0.0.0.0,34.120.255.244/32->0.0.0.0,0.0.0.0/0->100.127.255.5 
13:44:25 dhcp,debug,state dhcp-client on Starlink entering <bound> state 


/ip dhcp-client print detail
Flags: X - disabled, I - invalid, D - dynamic 
 0   interface=Starlink add-default-route=yes default-route-distance=1 use-peer-dns=yes use-peer-ntp=yes dhcp-options=hostname,clientid status=bound address=100.74.98.207/10 gateway=100.127.255.5 
     dhcp-server=100.127.255.5 primary-dns=8.8.8.8 secondary-dns=8.8.4.4 expires-after=2m44s 


/ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit 
 0 ADS  dst-address=0.0.0.0/0 gateway=100.127.255.5 gateway-status=100.127.255.5 reachable via  Starlink distance=1 scope=30 target-scope=10 vrf-interface=Starlink 

 1 ADC  dst-address=100.64.0.0/10 pref-src=100.74.98.207 gateway=Starlink gateway-status=Starlink reachable distance=0 scope=10 

 2 ADC  dst-address=192.168.1.0/24 pref-src=192.168.1.1 gateway=bridge gateway-status=bridge reachable distance=0 scope=10

Thanks!

Hi there! Same issue with 6.48.3. Any thoughts?

Replaced by
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/1

Thank you for responding!

I would generally agree with you however in the debug output that I showed, the Parameter-List does include Classless-Route (unless I’m misreading the output). Also the documentation seems to indicate an implicit request for classless routes. [https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Client]

Just in case, I tested by removing the offending dhcp-options=hostname,clientid from the DHCP Client configuration and still didn’t get routes set.

Any other thoughts or hints?

Replaced by
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/1

I removed the dhcp-options from the client configuration because you mentioned them and I hadn’t tried that yet. :slight_smile: Initially I assumed you were telling me to explicitly add an option to request classless-routes but after re-reading the Mikrotik documentation saw that it’s already there and seems unnecessary.

I don’t have access to the DHCP server to show its configuration but can do a packet capture if the debug information in the original post isn’t enough. The server is a Starlink terminal [Dishy McFlatface].

Are you thinking that the dhcp-client configuration that I have should be working?

Worth mentioning (it’s obvious anyway) that this is regarding Starlink, maybe @rextended can take a look at the DHCP setting that they are using. Or just ignore the troll.
Oh wait, he asked about the configuration of the DNS server, how is that related, beats me.
Anyway,
Just looking at those classless-routes received you’d see that there’s no way those can be set currently on RouterOS. Probably that’s why they are silently failing.
Why? gateway=0.0.0.0 is an invalid value for .. gateway :slight_smile: And unless RouterOS makes a translation from 0.0.0.0 → dhcp_client_interface this will most likely never get fixed.
But you can write a ticket anyway, maybe they find a way to handle this.
Until then, you can set those two routes static, should work, unless something more is needed:

/ip route
add distance=1 dst-address=34.120.255.244/32 gateway=Starlink
add distance=1 dst-address=192.168.100.1/32 gateway=Starlink

Replaced by
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/1

Replaced by
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/1

Ah, so NOW you took the time to read the details provided in the first post? Instead of asking for the “DNS Server config”…
Hence, the troll.
PS: good job at editing your replies.
PS2: specifying the interface like I wrote above should be ok, as others tested on other routers:
https://www.reddit.com/r/Starlink/comments/jqhoqz/starlink_app_works_fine_behind_own_router/gby79x1?utm_source=share&utm_medium=web2x&context=3 &
https://www.reddit.com/r/Starlink/comments/jxkz1q/anyone_know_how_to_get_the_starlink_app_to_work/
As in, NOT specifying the default gateway for those two IPs :slight_smile:
Cheers.
Let’s see if you’ll edit these replies now too..

Replaced by
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/1

Thank you, @Znevna, I was pretty sure the configuration was correct. I had assumed that RouterOS would have seen the 0.0.0.0 destination in the classless-route parameter, recognized the default route and set a dynamic route appropriately. Since it doesn’t, I thought I had missed something.

Incidentally, setting the routes manually with gateway set to the interface has always worked although setting gateway to the IP address does not. Again, I don’t have the routing experience to recognize why (or perhaps it’s RouterOS packet processing?). Thank you for doing the additional research on Starlink, @Znevna, I probably should have mentioned that in the original post and could have saved you the time. :-/

In summary: The RouterOS dhcp-client is configured correctly but does not set the classless-routes sent by the Starlink terminal DHCP server. I’ll contact Mikrotik support.

On a [not really] related note, setting the routes manually works when using the interface as gateway but not the specified IP address [100.127.255.5 in this example]. That’s probably a more simple well understood problem related to basic IP routing. :slight_smile: If you feel like explaining it I’d appreciate it but otherwise not to worry. I’ll get to it eventually for my own education. This is partly related to @rextended stating that 192.168.100.1 and 34.120.255.244 should already be covered by 0.0.0.0. I would have agreed except it doesn’t work. :-o

Thanks again for taking the time to respond.

Probably 192.168.100.1 are added for force the phone app to work everytime,
ignoring all the mess you can do on the config.
Starlink proprietary router can understand those two routes also for Starlink captive portal (34.120.255.244 my.starlink.com)

The differences between:
192.168.100.1->WAN interface = search 192.168.100.1 inside the device himself
192.168.100.1->GatewayIP = search 192.168.100.1, passing by gateway, on the other side of the connection
(please try to understood I try to explain it from Italian)

obviously when I haved see 192.168.100.1/32->0.0.0.0 I do not have noticed the missing detail at the end: /0 !!!

0.0.0.0/0 = any IPv4
0.0.0.0 = means that no intermediate routing hops are necessary because the system is directly connected to the destination (MikroTik do not understand this)


@Znevna please consider the option to not consider me one troll, please.

Welcome! Yeah, I wrote above why those two routes won’t register, you can try manually and see the error msg. (and a typo):

/ip route add dst-address=192.168.100.1 gateway=0.0.0.0
failure: Invalid route configuration: Invalid gateway configration

And the only (easy) fix I can think of is also the one mentioned above, if they somehow translate “gateway=0.0.0.0” to “gateway=interface_of_current_dhcp_client” before adding the routes received.
Or if Starlink finds another way to do this.
Regarding why specifying the default gateway doesn’t work .. well.. that’s what you’re trying to avoid, and by specifying it again is just redundant.

Replaced by
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/1

[quote @Znevna] Regarding why specifying the default gateway doesn’t work .. well.. that’s what you’re trying to avoid[/quote]

LOL of course! :-o

@rextended, don’t worry about the script unless it’s an exercise for yourself. I see what you’re doing and it makes sense. This is residential and setting the routes manually is fine, I was just trying to figure out why the dhcp-client wasn’t working. I may write the script myself for learning purposes (but probably not soon).

If anyone is still reading and interested, the router that Starlink supplies is apparently a customized OpenWRT however it is not accessible by the user at this time. Simply removing it and connecting your own router to the terminal [dishy] works fine. I have connected an RB4011iGS+ and [controversially?] use a Mikrotik Audience for WiFi as well as a CRS326-24G-2S+.

Thanks again!

Thanks, but I think than be useful for anyone, not only for you, and practice for me :slight_smile:

Replaced by
http://forum.mikrotik.com/t/classless-routes-not-being-added-by-dhcp-client/149116/1

There is any hope if I terminate the script you try it?

Yes, I’m happy to test the script. Feel free to contact me privately for further discussion if you prefer, then can post a working version here.