FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,250 views 4 comments
by

I'm about to replace older equipment from another brand with RUT240 routers. I'd like cause as few changes to the existing network as possible. One of these 'possible changes' to minimize are the hostnames issued by the dhcp server together with static ip addresses.

I have currently a considerable amount of hostnames with a hyphen ('-') in use. It looks that RUT240's dhcp does not accept hostnames that contain hyphens, an example below:

This isn't as formally correct reference as an FRC would be, but it refers to some RFCs instead:
https://en.wikipedia.org/wiki/Hostname
Among other things, it says:
----
The Internet standards (Requests for Comments) for protocols mandate that component hostname labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9' and the hyphen-minus character ('-').
<clip...>
While a hostname may not contain other characters, such as the underscore character (_), ...
----

So, it looks to me that the behaviour of RUT240 clearly violates the rules for hostnames, by not allowing the use of the hyphen. In my opinion, it's not a problem if it allows to specify an illegal character (underscore) like it does. But the worse thing is, that all the legal characters can not be used.

I investigated this a little bit more. It looks that this is only a problem with the GUI, if I edit the file /etc/config/dhcp I can modify a hostname to contain a hyphen, and the dhcp server then happily issues that name to a client. The problem with this is, that after such a modification the use of the GUI is no more possible, since it flags the hyphens as errors, not allowing to save any other changes either.

If I'm not mistaken, the exclusion of the hyphen from the hostnames is a bug and should be corrected.

Is the sanity check of the hostname done in some executable (and not end-user editable) binary, or possibly in a cleartext script that I could edit by myself while hoping for a possible fix to appear in a future firmware?

I'm using (currently latest) RUT2XX_R_00.01.11.2 firmware.

by

Have the same issue with a RTU950

Trying to use it to on an existing network

Tip about /etc/config/dhcp very handy

1 Answer

+1 vote
by anonymous

Hi,

Thanks for pointing out the bug. I have already registered it.

Meanwhile, to change the hostname manually you can edit the /etc/config/dhcp file via SSH/CLI. To begin editing:

  • vi /etc/config/dhcp

Navigate the file using the arrow keys on your keyboard. Locate your static lease under one of the config host entries. Press the 'I' key on your keyboard to make editing available change the hostname by editing the info next to option name.

When finished editing to save changes by press the 'Esc' key, type :x and press 'Enter'.

by anonymous
Thanks for registering the bug.

I really hope there will be a fix for it. Although the hostname may as a last resort be edited manually in /etc/config/dhcp as described above, it's quite inpractical since it won't be possible any more to use the GUI to make *any* dhcp-related changes if the GUI detects a violating hostname that was previously edited manually.
by
This still does not seem to have been fixed
by anonymous
Hi,

I see from another comment that you're using RUT950, not RUT240. The fix for RUT9XX devices will be in the upcoming FW version.