Operating System - HP-UX
1833187 Members
2705 Online
110051 Solutions
New Discussion

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

 
Phuc Nguyen_1
Advisor

BIND (DNS), A500 with two nics, which ip is ip of DNS?

Our A500 has two nics in it and we just setup BIND on it recently. How can we set which nic or ip as the DNS ip?
7 REPLIES 7
linuxfan
Honored Contributor

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

Hi Phuc,

This is how the back plane of a A500 looks like.

http://docs.hp.com//hpux/onlinedocs/hw/class_a/a400/content/00/02/QA/idd_3/13.html

Now when you say you have two nics, do you mean you have another nic beside the one on the Core I/O which is at H/W path 0/0/0 (you can see that in the diagram ). Also there is 10BaseT lan console, which is used to connect to the server remotely.

To configure the lan console from the GSP, you can look at the document
http://docs.hp.com/cgi-bin/otsearch/getfile?id=/hpux/onlinedocs/hw/lclass/content/00/0C/5R/idd/51.html&searchterms=configuring%7cGSP%7clan%7cconsole&queryid=20010824-190543


To configure the static IP address/hostname etc. you can use /sbin/set_parms.
If you have never configured your system for networking you can use "/sbin/set_parms initial"

If indeed you have another lan card, you can use lanscan or ioscan -kfnC lan to determine all the lan cards you have on the system. And depending on which card you have an active connection you can configure your lan card and thereafter configure BIND on the active lan card

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Phuc Nguyen_1
Advisor

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

Thanks for replying Ramesh.
I have two nics in my A500, both interfaces are already configured prior to BIND configuration. If you count the GPS lan consolel, then I have 3 RJ45 connectors on the back of my A500. I just want to know when setting up bind, which IP address on the host will allow DNS request because nslookup from the BIND server can not locate any node and windows client can ping each other hostname but not qualify domain name.

see bind config file attachment.
linuxfan
Honored Contributor

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

Hi Phuc,

which subnet does lotus belong ?
Do you want both the interface IP address to respond to DNS queries?
Not sure if you have the O'Reilly book "DNS and Bind" It talks about configuring dual homed hosts.

I am also attaching an HP document, which talks about configuring a primary DNS server.

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Phuc Nguyen_1
Advisor

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

I just want DNS to respond only to queries on the 1st interface on lotus with ip: 172.30.30.20
subnet mask: 255.255.0.0, gateway: 172.30.30.1
And just for information, how would it be different if I want it on the second interface, with ip 172.30.30.21?
David Lieberman_1
Frequent Advisor

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

Hi Phuc,

lanscan will show you which NIC has what lan instance (lan0, lan1, etc.).

Edit /etc/rc.config.d/netconf so that the proper IP address is assigned to the lan instance of your choice.

The NIC configuration files:

/etc/rc.config.d/hpbase100conf
/etc/rc.config.d/hppci100conf

should have the lan instance (lan0, lan1) associated with the appropriate NIC in the file. For example, if my core IO card is lan0, then the hpbase100conf file should have the following entry:

HP_BASE100_INTERFACE_NAME[0]=lan0

HPUX is finicky when it comes to supporting two or more NICs. Unless one is using APA (Auto-Port Aggregation) software, you may not have two NICs on the same subnet - they must reside on separate subnets. In any case, the subnet mask must be the same for each NIC.

That said,

Ensure that the default gateway is assigned to the lan(x) that you are using with the DNS A record.

So to put this all together,

let's say that I have two NICs:

lan0 = core IO
lan1 = PCI NIC

I want to use the lan0 card for my DNS entry on a subnetted class B network and the lan1 NIC is on a separate class C subnet. (Either way would work, so feel free to exchange lan1 for lan0 in the following verbage)

My netconf file would look like this:
(addresses have been changed from actual values. The subnet math is correct. I don't have an A500, but I'll reference an L2000. It should be reasonably accurate.)

HOSTNAME="gonzo" #(lotus)
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="172.16.130.170"
SUBNET_MASK[0]="0xfffff800"
BROADCAST_ADDRESS[0]="172.16.135.255"
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]="lan1"
IP_ADDRESS[1]="192.150.5.25"
SUBNET_MASK[1]=255.255.248.0
BROADCAST_ADDRESS[1]="192.150.7.255"
INTERFACE_STATE[1]="up"
DHCP_ENABLE[1]=0

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="172.16.129.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[1]="net 192.150.5"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="192.150.5.25"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

GATED=0
GATED_ARGS=""

Notice that the lan1 NIC only routes traffic to the 192.150.5 network and DOES NOT use the default gateway. In this case, its gateway is the address of the NIC, although an appropriately addressed router or server would do fine as well. Although the 172.16 subnet uses a 255.255.248 subnet mask, the correct subnet mask for the 192.150.5 network should be 255.255.255.0 (class C), but since ALL subnet masks on the server must be the same, 255.255.248.0 MUST be used. This can cause some interesting looks from admins and network folks, but as long as the server doesn't try to address something outside of the "correct" subnet, there won't be any problems.

In order to resolve to the interface, the DNS entry in the /etc/named.data/{db_table_name}, or on your favorite DNS server, must correspond to the desired NIC - in my case, lan0 (core IO). This interface must also be routeable from other hosts on the network. It is not possible to get to the lan1 interface from the lan0 card (and vice-versa), unless gated (routing daemon) is enabled (GATED=1) and configured on the (lotus) server.

HTH
David Lieberman
rick jones
Honored Contributor

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

as you have likely already determined, when BIND starts, it binds a port 53 on all the IPs it finds which are local (netstat -an | grep 53).

i do not recall if the BIND 4.mumble stuff had config directives to limit the IP's on which it listened, but I'm pretty sure that bind 8.mumble and later do. that being the case, I suspect that there may be documentation at www.isc.org, the home of BIND. heck, the docs at www.docs.hp.com might even have it :)

there is no rest for the wicked yet the virtuous have no pillows
Bill Thorsteinson
Honored Contributor

Re: BIND (DNS), A500 with two nics, which ip is ip of DNS?

By default bind is listening on all IPs.

You can limit this with the listen-on option
in the named.conf file. The following
restrics DNS to the class A private network
and localhost.

options {
listen-on { 10.0.0.2; 127.0.0.1; };
};

You can also setup acls to allow and
deny access to various users. This
can be done to allow things like
Dynamic DNS updates from the local network,
but not the internet.