1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

regarding dnsmasq

Discussion in 'Tomato Firmware' started by lanmtl, Dec 5, 2009.

  1. lanmtl

    lanmtl Addicted to LI Member

    Hello,
    I would like to setup custom entries to the DNS cache on the router.
    for instance, I have a pap2 device that uses the 192.168.1.200 IP. I would like to address this device as http://pap2 in my web browser instead of http://192.168.1.200 or ping it as pap2 and not its IP address.
    I understand I can do this with dnsmasq but I am not sure how...
    Can someone point me in the right direction?
    Thanks a lot!
     
  2. mstombs

    mstombs Network Guru Member

    This works for me:- (and has done since HyperWRT Thibor days)

    Give your router a local domain name - call it router.lan for example. Then give your device a static dhcp assignment with name pap2.lan.

    Then with default settings dnsmasq will add the ".lan" when you ask for "pap2" and give you the correct IP address.

    dnsmasq has so many options, I'm sure there are other ways too!
     
  3. Planiwa

    Planiwa LI Guru Member

    Basic > Router Identification
    Domain Name: foo

    Basic > Static DHCP
    00:90:D0:AA:AA:AA 192.168.1.254 MODEM

    ( easiest to click on [static] in Device List )

    then ...

    # arp
    MODEM.foo (192.168.1.254) at 00:90:D0:AA:AA:AA [ether] on vlan1

    # arping -I vlan1 -c5 modem
    ARPING to 192.168.1.254 from 192.168.1.2 via vlan1
    Unicast reply from 192.168.1.254 [0:90:d0:aa:aa:aa] 1.276ms
    Unicast reply from 192.168.1.254 [0:90:d0:aa:aa:aa] 0.643ms
    Unicast reply from 192.168.1.254 [0:90:d0:aa:aa:aa] 0.643ms
    Unicast reply from 192.168.1.254 [0:90:d0:aa:aa:aa] 0.658ms
    Unicast reply from 192.168.1.254 [0:90:d0:aa:aa:aa] 0.709ms
    Sent 5 probe(s) (1 broadcast(s))
    Received 5 reply (0 request(s), 0 broadcast(s))

    # ping modem
    PING modem (192.168.1.254): 56 data bytes
    64 bytes from 192.168.1.254: seq=0 ttl=64 time=1.927 ms
    64 bytes from 192.168.1.254: seq=1 ttl=64 time=1.150 ms
    64 bytes from 192.168.1.254: seq=2 ttl=64 time=1.147 ms

    --- modem ping statistics ---
    12 packets transmitted, 12 packets received, 0% packet loss
    round-trip min/avg/max = 1.135/1.219/1.927 ms


    # telnet modem

    Entering character mode
    Escape character is '^]'.

    Username :

    . . .
     
  4. lanmtl

    lanmtl Addicted to LI Member

    setting the domain name to lan and adding devices to the static list was enough actually. Thanks!
     

Share This Page