You are here

A way to add hostname/services without a DHCP lease?

9 posts / 0 new
Last post
kg6wxc
kg6wxc's picture
A way to add hostname/services without a DHCP lease?
Is there a way to add a "published" hostname, with services attached to that hostname, *without* using a DHCP lease? I have a system with eth1 already getting a DHCP lease from the mesh node, it has a hostname host.local.mesh, everyone on the mesh can resolve this hostname without issue. But is there a way I make eth1:0 have a "published" hostname of host1.local.mesh without using the DHCP lease functionality? I have no problem editing a config file or two... thank for any info! 73 Eric - kg6wxc
AE6XE
AE6XE's picture
Eric,   The hostnames are

Eric,   The hostnames are being advertised via OLSR NameServices plugin.   It might take code changes and certainly testing to see if there is a way to do this and keep the UI functionality working and compatible--which is looking for both hostname and matching service advertisements.  Doing a "save as" in the UI might overwrite the config file manual changes, or the changes might break UI code.   

See:  https://github.com/servalproject/olsr/blob/master/lib/nameservice/README_NAMESERVICE
 
Standard compensatory extra care clause :) .   Changing OLSR config files is propagating something new, different, or even broken across the mesh network and may raise a neighbor mesher's blood pressure.   

Joe AE6XE 

KG6JEI
I'm not sure I see a need for
I'm not sure I see a need for why you wouldn't do this via the user interface?

Names are intended to be advertised for devices that will be accessible by name (aka those that are hosting a service)  and these devices will need a defined IP address this is why it's tied to a "reservation" 

You can statically configure the IP address on your server but you would still want to "reserve" that IP address on the node so it knows it can't allocate it to another device.

 
kg6wxc
kg6wxc's picture
You cannot assign an IP
You cannot assign an IP address a hostname via the GUI without having a DHCP lease. So if you have a virtual interface (it doesn't have a different MAC address) you cannot assign that virtual interface an IP address that will be sent out over the Mesh via the OLSR system. I wasn't trying to do anything new or different or even anything that could break something, it's just a hostname/IP mapping. If it was wrong, all that would be broken would be the host would not be "there". After a few days of messing around with this, I was unable to find a way to do what I wanted to do, which was basically just trying to make an easier hostname for the mesh users to remember, so they could more easily use the service provided on that IP. In the end I'll just go buy another Network Interface card use that, then I can have another DHCP lease and the problem will be solved. I'm glad I'm not running a RasPi in this instance... Easily remember-able hostnames are nothing new, most people assume mail.example.com is for mail, www.example.com is the website... etc...etc... Thanks for your Help and 73! -wxc
KG6JEI
You should be able to just
You should be able to just create a manual reservation (no lease required, you can fill it in with a bogus mac address like AA:BB:CC:DD:EE:FF)  and the name you place for that reservation becomes the name advertised out. 

On the external device you can statically configure the IP address (without it requesting DHCP lease) so that way the device has it's IP address, the node knows the IP address is 'used' by a system, and the name you chose gets advertised out.
kg6wxc
kg6wxc's picture
thanks!
Thank you. I think that will work!
I had thought of that, but was afraid to put in a bogus MAC address for fear of breaking everything, but it look like it does not.

Thanks again!
73
 
kg9dw
kg9dw's picture
Why don't you want to use
Why don't you want to use DHCP? I use it even for my hosts that I ports forwarded to...I always have a reservation in the server for that node.

Why mess with static?

MB
KA9Q
Another option, if your
Another option, if your server runs Linux, is to install olsrd on it and have it peer with your local Ubiquiti units over VLAN2 on Ethernet. Your server will then become a full-fledged node on the mesh, advertising its own name (which can be anything) through the olsr name service and using up only one IP address in the limited 10.0.0.0/8 block. You do have to manually pick that address, avoiding any that might already be in use.

This is what I do with maggie.ka9q.net, a Linux system that acts as my home router. It also connects to my cable modem, so it can route local computers to either the mesh network (network 10.0.0.0/8) or the "real" Internet. I also have it providing DNS service for the local.mesh zone, which is nonstandard and not part of the global DNS namespace.
 
KG6JEI
Of course this post ignores
Of course this post ignores the fact that it will increase the network load and system load across the mesh unnecessarily (Extra node traffic with ETX data etc has to be propagated across the entire mesh network) and makes protocol breaking assumptions ("advertising its own name (which can be anything)") which is not inside the MESH V3 protocol specifications at this time (some prep work for this has been done and it was just by pure coincidence that KA9Q putting this maggie node on the network at the time happened just shortly after that code was pushed out to the county and didn't break the entire area)

Follow this suggestion at your own risk.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer