We help IT Professionals succeed at work.
Get Started

How to create static IP in Samba4/DNS?

Mark
Mark asked
on
887 Views
Last Modified: 2015-05-11
I am running Slacware64 14.1, Samba 4.1.11 and bind 9.9.5-P1. I am running this host as an AD/DC. I have provisioned the Samba DC specifying BIND9_FLATFILE backend, which basically means using the normal bind config files. This setup has been running fine for around 9 months.

Now, I have a couple of devices, e.g. printer, DVR, for which I want to add static IPs. I've done this in a pre-Samba DNS by adding the following line the to the zone file:

$TTL 14400      ; 4 hours
ricoh                   A       192.168.0.20

and similarly to the reverse zone file:

$TTL 14400
20     PTR    ricoh.hprs.local.

I did this yesterday, but after some period of time, the A record entry from the zone file had disappeared altogether. Samba does update these files, but why would the A record go away? Or, maybe I configured it wrong.

Can someone help me out with getting this IP set correctly?

Below is the zonefile in question (lots of Samba added stuff)
$ORIGIN .
$TTL 14400      ; 4 hours
hprs.local              IN SOA  mail.hprs.local. hostmaster.hprs.local. (
                                2014094808 ; serial
                                10800      ; refresh (3 hours)
                                3600       ; retry (1 hour)
                                28800      ; expire (8 hours)
                                3600       ; minimum (1 hour)
                                )
                        NS      mail.hprs.local.
                        A       192.168.0.2
$ORIGIN hprs.local.
_kerberos               TXT     "HPRS.LOCAL"
$ORIGIN _msdcs.hprs.local.
48c0208f-0646-42f6-89bf-dc9b81b3442c CNAME mail.hprs.local.
$ORIGIN _tcp.Default-First-Site-Name._sites.dc._msdcs.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _tcp.dc._msdcs.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _msdcs.hprs.local.
_ldap._tcp.e261d59e-e2f2-4202-9caa-b0ebf8d106a5.domains SRV 0 100 389 mail.hprs.local.
gc                      A       192.168.0.2
$ORIGIN gc._msdcs.hprs.local.
_ldap._tcp.Default-First-Site-Name._sites SRV 0 100 3268 mail.hprs.local.
_ldap._tcp              SRV     0 100 3268 mail.hprs.local.
$ORIGIN _msdcs.hprs.local.
_ldap._tcp.pdc          SRV     0 100 389 mail.hprs.local.
$ORIGIN _tcp.Default-First-Site-Name._sites.hprs.local.
_gc                     SRV     0 100 3268 mail.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _tcp.hprs.local.
_gc                     SRV     0 100 3268 mail.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_kerberos-master        SRV     0 100 88 mail.hprs.local.
_kpasswd                SRV     0 100 464 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _udp.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_kerberos-master        SRV     0 100 88 mail.hprs.local.
_kpasswd                SRV     0 100 464 mail.hprs.local.
$ORIGIN hprs.local.
$TTL 1200       ; 20 minutes
BETH                    A       192.168.0.53
$TTL 3600       ; 1 hour
                        TXT     "31fb00b7a77fdc7f6ba1e7a3a8efaeb764"
$TTL 1200       ; 20 minutes
CHARMAINE               A       192.168.0.52
$TTL 3600       ; 1 hour
                        TXT     "31e495ab9beab3bba63ae1165feab6d82f"
$TTL 1200       ; 20 minutes
COMMON                  A       192.168.0.58
$TTL 3600       ; 1 hour
                        TXT     "31d43f065d80a9e1d8507c919ea920a677"
$TTL 1200       ; 20 minutes
DENNIS                  A       192.168.0.57
$TTL 3600       ; 1 hour
                        TXT     "31616d4148a7bea9e6aba53e934e9a3766"
DOMAS1286P12141         A       192.168.0.114
                        TXT     "31692eef51b0eaa0d31d250455d1c2c625"
$TTL 1200       ; 20 minutes
DORIS                   A       192.168.0.51
$TTL 3600       ; 1 hour
                        TXT     "318d9a2029644a1b54e80551bba7682954"
$TTL 1200       ; 20 minutes
HOLLY                   A       192.168.0.56
$TTL 3600       ; 1 hour
                        TXT     "3125e48aa8400fcddf72791dc5bb93bca7"
LocalHost               A       192.168.0.24
                        TXT     "31d0ef7b30ac56944e0d01b8d43a43123a"
$TTL 14400      ; 4 hours
mail                    A       192.168.0.2
$TTL 1200       ; 20 minutes
MARK                    A       192.168.0.55
$TTL 3600       ; 1 hour
                        TXT     "312e7db07ef48b5b5c1c74dca37fc455d0"
MCNEA1953C11141         A       192.168.0.112
                        TXT     "3133784f6dadce841246963acdf6ffa25c"
$TTL 1200       ; 20 minutes
MIKE                    A       192.168.0.54
$TTL 3600       ; 1 hour
                        TXT     "3123e28f0b7a5150ca7bf29e91967928c2"
OHPRSstorage            A       192.168.0.5
                        TXT     "00809cfa69f150af1ca3924d33b7dbd20e"
$TTL 1200       ; 20 minutes
RENEE                   A       192.168.0.50
$TTL 3600       ; 1 hour
                        TXT     "31a3fe008f43cb09a0b5e55cf7a3322f26"
$TTL 1200       ; 20 minutes
server                  A       192.168.0.4
$TTL 3600       ; 1 hour
                        TXT     "3142f0ea1580f4cfde5bfb712dc2dc8482"
$TTL 1200       ; 20 minutes
TRAVERSE                A       192.168.0.59
$TTL 3600       ; 1 hour
                        TXT     "31d1e2072b79d455b24818ec52267dc0b6"
viao                    A       192.168.0.102
                        TXT     "319fa2220f0f1c778d2667ee0e19bbb60d"
webserver               A       192.168.0.3
                        TXT     "00a72c84d5da5a7047247078f738268ec3"

Open in new window

Comment
Watch Question
President, IT4SOHO, LLC
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE