OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

Support for non-singleton Resource Records in CLI

Frank

23-10-2009 13:54:01

I admit, I'm a little lost here. As I see it, ONA CLI won't let me define multiple RRs of the same Type for the same owner.

CLI Error Message is:
/opt/ona/bin/dcm.pl -l admin -p admin -r host_add host=webluna.lvm.de type=7 ip=10.37.1.51 notes=*nex*
INFO => Host ADDED: webluna.lvm.de
INFO => Interface ADDED: 10.37.1.51
INFO => DNS A record ADDED: webluna.lvm.de -> 10.37.1.51
/opt/ona/bin/dcm.pl -l admin -p admin -r host_add host=webluna.lvm.de type=7 ip=10.37.2.51 notes=*nex*
ERROR => Another DNS record named webluna.lvm.de is already in use, the primary name for a host should be unique!

The other way round, having multiple Owners for the same RR Data, i.e. same IPadress, different Owners seems not to work in CLI AND Webinterface.

According to DNS specs both should be perfectly ok, or am I missing something here? Is this a bug or a feature?

Regards,
Frank

Matt

24-10-2009 11:25:31

You should be able to do this. First off a little basic definition of a few things.

When doing a host_add you are adding a host/device entity. For example, its a web server. This server has sever IP addresses associated with it (AKA interfaces). Once you do a host_add operation it performs several tasks at once. It adds a host/device and the first interface. It also assigns a primary DNS name to that host which points at the IP you provided. Now if you want other IP addresses you need to do interface_add operations. You can add as many IP addresses to a host as is needed.

What is happening below is that you are telling ONA to add two separate hosts with the same exact name. When you really want to add a host.. then add interfaces to it...

Now that you have a host with several IP addresses, you can then start to assign further DNS RRs to it of whatever type is required.

/opt/ona/bin/dcm.pl -l admin -p admin -r host_add host=webluna.lvm.de type=7 ip=10.37.1.51 notes=*nex*
/opt/ona/bin/dcm.pl -l admin -p admin -r interface_add host=webluna.lvm.de ip=10.37.2.51

Frank

24-10-2009 12:41:10

Thanks Matt, makes perfect sense.
Leaves the question regarding different owners of same IP Address (A Record). One could ask: Why do you want to do this? Well, I do not.But the legacy requires it, unfortunately.

Frank

Matt

24-10-2009 12:54:20

You can also do this as well.. For things like HSRP,CARP,VRRP etc where an IP is actually associated with and shared between multiple hosts. If you click the little green circle with a + in it that is next to the interface listed on the display host screen you can share the IP with another host. Or from the CLI use the "interface_share" module.

Frank

24-10-2009 15:09:33

Cool stuff, perhaps I just should have read the manual ;)

Thanks very much
Frank