Reply
Member
Posts: 149
Registered: ‎01-22-2014
Kudos: 67
Solutions: 2

Static Names / Client Aliases

Some of you are going to think this is silly because you are going to ask why would I use the USG as a DHCP / DNS server. In the size of our network 60 devices and no need of Microsoft AD / Directory Services.  

 

My home / office configuration is like this:

 

Cable Modem -> USG-3P -> USW-48-500W -> UAP-AC-PROv2

 

That is the primary stuff. There is a bunch of old Netgear switches in rooms along with a WNDR3700 acting as a AP and Switch. 

 

So down to the issue at hand:

 

1. I plug my PDU into the switch. 

2. In the Wired Clients screen, I find its MAC address. 

3. I click on the link of the MAC address and the config tab comes up. 

4. I enter the "Alias" and click apply. 

5. I set a static IP and click apply. 

 

That is very cool except for one thing. The "Alias" is just that an visual alias that has no function within the system. 

 

If I wan to make a name that works in DNS, I have to manually enter it into "static names"

 

This is where this seems silly to me. We have a beautiful GUI with all the boxes, it just needs some glue. 

 

Ubiquiti Employee
Posts: 7,528
Registered: ‎03-17-2015
Kudos: 4834
Solutions: 197

Re: Static Names / Client Aliases

Oh, interesting.  So what you proposing is to say have a section where you could enable DNS entries for the names entered?

 

 

Want to try out new features or fixes before they're released as Stable? Sign up for Beta here: https://help.ubnt.com/hc/en-us/articles/204908664-How-To-Signup-for-Beta-Access
New Member
Posts: 6
Registered: ‎02-08-2016
Kudos: 4

Re: Static Names / Client Aliases

Be nice as an option for anyone who wishes to use the USG for all DHCP/DNS needs.

 

So far as I can tell without using the CLI you cannot assign a DNS name to a static IP entry either.

Ubiquiti Employee
Posts: 7,528
Registered: ‎03-17-2015
Kudos: 4834
Solutions: 197

Re: Static Names / Client Aliases

Got it. Yes, we can mockup and get back with proposed UI functionality.
Want to try out new features or fixes before they're released as Stable? Sign up for Beta here: https://help.ubnt.com/hc/en-us/articles/204908664-How-To-Signup-for-Beta-Access
SuperUser
Posts: 15,007
Registered: ‎08-07-2008
Kudos: 7193
Solutions: 414
Contributions: 1

Re: Static Names / Client Aliases

I do this now with pfsense.  Can't wait to try this and other features I use every day on a usg pro. 

Walks in, tells it like it is, walks out , milks a cow
Ubiquiti Employee
Posts: 7,528
Registered: ‎03-17-2015
Kudos: 4834
Solutions: 197

Re: Static Names / Client Aliases

Yes, I came from a Soekris net5501 running pfSense.  We'll be working to mock this up and see what you guys think.

Want to try out new features or fixes before they're released as Stable? Sign up for Beta here: https://help.ubnt.com/hc/en-us/articles/204908664-How-To-Signup-for-Beta-Access
SuperUser
Posts: 9,115
Registered: ‎01-10-2012
Kudos: 5524
Solutions: 381

Re: Static Names / Client Aliases

[ Edited ]

UBNT-Brandon wrote:

Oh, interesting.  So what you proposing is to say have a section where you could enable DNS entries for the names entered?


Yes please! 

 

Speaking of local DNS aliases, I can't believe you don't have a checkbox to create the "unifi" A-record pointing to the controller Man Tongue  

 

Would help SO MUCH with adoption issues. 

When you receive a solution to your question/issue, don't forget to mark your thread as solved and to give kudo's to the people who have helped you out!

Having wifi problems? Take a look here first: https://help.ubnt.com/hc/en-us/articles/221029967-UniFi-Debugging-Intermittent-Connectivity-Issues-on-your-UAP
Member
Posts: 149
Registered: ‎01-22-2014
Kudos: 67
Solutions: 2

Re: Static Names / Client Aliases


EricE wrote:

 

Yes please! 

Speaking of local DNS aliases, I can't believe you don't have a checkbox to create the "unifi" A-record pointing to the controller Man Tongue  

Would help SO MUCH with adoption issues. 


There is an entry in "static names" for UniFi and it works. It must create it when the controller is first installed and the USG is first provisioned.   I do not know if this only came in because I started this network post 4.6.x

Member
Posts: 149
Registered: ‎01-22-2014
Kudos: 67
Solutions: 2

Re: Static Names / Client Aliases


UBNT-Brandon wrote:

Oh, interesting.  So what you proposing is to say have a section where you could enable DNS entries for the names entered?

 

 


Exactly,

 

I have used many consumer devices running very broken copies of DNSmasq that can do this well. 

 

I think the USG has more then enough power to handle a local zone for a small to medium network (50-150 machines). 

 

The UI changes for this should be simple. A checkbox in the static IP tab to ask if the user would like to use the "alias" as a DNS HostName. 

 

The tricky bit, but not all that tricky since you already do it when some one updates the static IP. Add the necessary two lines to the USG config for "static name". 

 

 

Member
Posts: 149
Registered: ‎01-22-2014
Kudos: 67
Solutions: 2

Re: Static Names / Client Aliases


sdjernes wrote:

 

There is an entry in "static names" for UniFi and it works. It must create it when the controller is first installed and the USG is first provisioned.   I do not know if this only came in because I started this network post 4.6.x


I am replying to my own post because as I was writing the changes in the CLI to add HE IPv6 tunnel I checked where I had seen this in the config and I had been miss-stating things in the posts. Since I hate when people do that I have to come in her and openly state my mistake. 

 

The static host names in DNS are actually stored in the DNS service under options. So to edit in the CLI you would do this:

 

1. SSH into USG 

2. Enter into Configuration Mode (type: configure)

3: Edit DNS Service (type: edit service dns)

4. Now for each entry you want to add:

       set option host-record=HOSTNAME,IPADDRESS

5. Exit Edit mode (type: exit)

6. Commit your changes (type: commit)

7. Save your Changes (type: save)

8. Exit Config mode (type: exit)

 

For all the advanced users on here who think I just made that over detailed and simplistic, remember we all started somewhere and there are probably network admins out there who have not spent the last 10 years of their life's dealing with the arcane command line interfaces of Cisco and Juniper. 

 

 

 

 

Highlighted
New Member
Posts: 3
Registered: ‎07-11-2014
Kudos: 2

Re: Static Names / Client Aliases

[ Edited ]

Awesome, your instructions helped me. However, for me, what worked is the following: 

 

configure
edit service dns
set forwarding options host-record=HOSTNAME,IPADDRESS
commit
save

 

It would definitely be convenient to get an option in the UI. Thanks a lot ofr your post though, was able to figure it out with some poking around. 

Member
Posts: 149
Registered: ‎01-22-2014
Kudos: 67
Solutions: 2

Re: Static Names / Client Aliases


dgiaffe wrote:

Awesome, your instructions helped me. However, for me, what worked is the following: 

 

configure
edit service dns
set forwarding options host-record=HOSTNAME,IPADDRESS
commit
save

 

It would definitely be convenient to get an option in the UI. Thanks a lot ofr your post though, was able to figure it out with some poking around. 


Sorry for the typo. That is correct. 

Emerging Member
Posts: 78
Registered: ‎05-15-2014
Kudos: 124

Re: Static Names / Client Aliases

So will this be persistent across reboots? Because as I understand, all permanent custom USG changes must be carried out via the custom configuration json file...

Emerging Member
Posts: 78
Registered: ‎05-15-2014
Kudos: 124

Re: Static Names / Client Aliases


sdjernes wrote:

sdjernes wrote:

 

There is an entry in "static names" for UniFi and it works. It must create it when the controller is first installed and the USG is first provisioned.   I do not know if this only came in because I started this network post 4.6.x


I am replying to my own post because as I was writing the changes in the CLI to add HE IPv6 tunnel I checked where I had seen this in the config and I had been miss-stating things in the posts. Since I hate when people do that I have to come in her and openly state my mistake. 

 

The static host names in DNS are actually stored in the DNS service under options. So to edit in the CLI you would do this:

 

1. SSH into USG 

2. Enter into Configuration Mode (type: configure)

3: Edit DNS Service (type: edit service dns)

4. Now for each entry you want to add:

       set option host-record=HOSTNAME,IPADDRESS

5. Exit Edit mode (type: exit)

6. Commit your changes (type: commit)

7. Save your Changes (type: save)

8. Exit Config mode (type: exit)

 

For all the advanced users on here who think I just made that over detailed and simplistic, remember we all started somewhere and there are probably network admins out there who have not spent the last 10 years of their life's dealing with the arcane command line interfaces of Cisco and Juniper. 

 

 

 

 


Cool. So how is 'set service dns option host-record' different to 'set system static-host-mapping'?

 

And will this remain persistent across reboots? or does even this setting have to be modified in the custom json file? I ask because I have not gone with the custom json - my USG is unfortunately in production at a remote site right now, which makes that custom config change all but out of the question.

Member
Posts: 149
Registered: ‎01-22-2014
Kudos: 67
Solutions: 2

Re: Static Names / Client Aliases


pauld wrote:

 

Cool. So how is 'set service dns option host-record' different to 'set system static-host-mapping'?

And will this remain persistent across reboots? or does even this setting have to be modified in the custom json file? I ask because I have not gone with the custom json - my USG is unfortunately in production at a remote site right now, which makes that custom config change all but out of the question.


If you don't make an changes via the controller that cause a reprovision then I have had it stick through a reboot. 

New Member
Posts: 6
Registered: ‎01-30-2016
Kudos: 6

Re: Static Names / Client Aliases

This would be outstanding.

 

I recently moved a small SOHO environment over to UniFi gear (USG, CK, 5 APs) and was unpleasantly surprised to learn that there was no simple way to get hostname resolution working within this mixed Mac/Windows/Android/iOS environment. All of the consumer routers we've used in the past just worked.

 

Would really love to see this or equivalent added. 

Ubiquiti Employee
Posts: 7,528
Registered: ‎03-17-2015
Kudos: 4834
Solutions: 197

Re: Static Names / Client Aliases

Yes.  We're thinking this would go well with a centralized static IP handling system as well.  CC: @UBNT-Pio

Want to try out new features or fixes before they're released as Stable? Sign up for Beta here: https://help.ubnt.com/hc/en-us/articles/204908664-How-To-Signup-for-Beta-Access
SuperUser
Posts: 15,007
Registered: ‎08-07-2008
Kudos: 7193
Solutions: 414
Contributions: 1

Re: Static Names / Client Aliases


UBNT-Brandon wrote:

Yes.  We're thinking this would go well with a centralized static IP handling system as well.  CC: @UBNT-Pio


Drool5

Walks in, tells it like it is, walks out , milks a cow
New Member
Posts: 9
Registered: ‎02-16-2014
Kudos: 8

Re: Static Names / Client Aliases

[ Edited ]

@UBNT-Brandon@UBNT-Pio When you are working on the centralized static IP handling, also ad the function to specify static ip's via mac address BEFORE the device is deployed on the network.

Established Member
Posts: 2,542
Registered: ‎05-30-2014
Kudos: 1019
Solutions: 12

Re: Static Names / Client Aliases

I also second the motion to create this.  would be super nice.  Although I am often to just using my ip addresses when I need to access internal resources it would be nice to be able to rely on static dns hostname lookup

I can not teach you anything. I can only make you think. Please don't forget to mark posts as solutions, and to give kudos when something solves your issue.
Reply