Quantcast
Channel: All EdgeRouter posts
Viewing all articles
Browse latest Browse all 60861

using static DHCP mapping for DNS lookup & changing the static mapping name

$
0
0

Hi

 

I use a lot of static mac/ip mappings for my DHCP server on my ErLite.

 

Now, the DHCP returns a domain name, and what I'd like is to be able to use that static mapping name, append the domain name of the DHCP server, and then lookup up that resulting FQDN.

 

So for instance, if I set my domain to be "my.home", and I have a static assignment for a host that is called nas, then I'd like to be able to access the device using the dns name "nas.my.home".

 

However, that doesn't seem to work out. Pinging "nas" or "nas.my.home" from any of my windows machines both return "Ping could not find host nas.my.home". Starting nslookup and entering either hostname or fqdn just tells me something about a non existing domain.

 

What's the way to go about solving this? 

 

Also, while we're at the subject.. how about modifying one of those static meppings to have a more user friendly name? When you add a static reservation from the DHCP server, it uses the host as the device sends it... and I have a bunch of devices that put their mac address in the device name - and nobody can remember a hostname like this. 

 

Here's my dhcp configuration

 

dhcp-server {
        disabled false
        global-parameters "log-facility local2;"
        hostfile-update disable
        shared-network-name DHCP-VLAN-2 {
            authoritative disable
            subnet 10.145.149.0/24 {
                default-router 10.145.149.1
                dns-server 10.145.149.1
                lease 86400
                start 10.145.149.100 {
                    stop 10.145.149.200
                }
            }
        }
        shared-network-name LAN1 {
            authoritative disable
            subnet 192.168.1.0/24 {
                default-router 192.168.1.1
                dns-server 192.168.1.1
                domain-name my.home
                lease 86400
                start 192.168.1.100 {
                    stop 192.168.1.243
                }
                static-mapping DiskStation2 {
                    ip-address 192.168.1.21
                    mac-address some-mac-address-here
                }
                static-mapping Netadmo {
                    ip-address 192.168.1.190
                    mac-address another-mac-address
                }
            }
        }
        shared-network-name LAN2 {
            authoritative disable
            subnet 192.168.2.0/24 {
                default-router 192.168.2.1
                dns-server 192.168.2.1
                lease 86400
                start 192.168.2.38 {
                    stop 192.168.2.243
                }
            }
        }
    }

 

 

 

 


Viewing all articles
Browse latest Browse all 60861

Trending Articles