Port number in A record in zone file
Mark Andrews
marka at isc.org
Thu Nov 17 20:40:50 UTC 2011
In message <5e1a7573.3227017d.4ec51045.62b13 at o2.pl>, =?UTF-8?Q?Aleksander_Kurczyk?= writes:
> Hello,
> Yesterday I asked here how can I run multiple named processes on different ports in one OS. Now I have some troubles with t
> hat. How can I specify the port number in zone file A record?
You can't.
It has been suggested to you by multiple people to use virtual interfaces
or virtual machines to do your testing.
> My config and zone files:
>
> 095160160157:/var/named root# cat srv1/named.conf
> options {
> directory "/var/named/srv1";
> version "olo-dns-server-1.0";
> allow-transfer { 127.0.0.1; };
> allow-recursion { 127.0.0.1; };
> listen-on 127.0.0.1 port 2001;
> };
>
> zone "srv1.local" IN {
> type master;
> file "srv1.local.master";
> };
>
> zone "srv2.local" IN {
> type slave;
> file "srv2.local.slave";
> };
>
> zone "srv3.local" IN {
> type slave;
> file "srv3.local.slave";
> };
>
> zone "." IN {
> type hint;
> file "named.ca";
> };
>
> zone "localhost" IN {
> type master;
> file "localhost.zone";
> allow-update { none; };
> };
>
> zone "0.0.127.in-addr.arpa" IN {
> type master;
> file "named.local";
> allow-update { none; };
> };
>
>
> 095160160157:/var/named root# cat srv1/srv1.local.master
> $TTL 1d
> $ORIGIN srv1.local.
> @ IN SOA ns1 hostmaster 2011111700 12h 5m 3w 2h
> IN NS ns1
> IN NS ns2
> IN NS ns3
> ns1 IN A 127.0.0.1 <<-- port 2001
> ns2 IN A 127.0.0.1 <<-- port 2002
> ns3 IN A 127.0.0.1 <<-- port 2003
> 11 IN A 192.168.1.11
> 12 IN A 192.168.1.12
> 13 IN A 192.168.1.13
>
>
> 095160160157:/var/named root# cat srv2/named.conf
> options {
> directory "/var/named/srv2";
> version "olo-dns-server-1.0";
> allow-transfer { 127.0.0.1; };
> allow-recursion { 127.0.0.1; };
> listen-on 127.0.0.1 port 2002;
> };
>
> zone "srv1.local" IN {
> type slave;
> file "srv1.local.slave";
> };
>
> zone "srv2.local" IN {
> type master;
> file "srv2.local.master";
> };
>
> zone "srv3.local" IN {
> type slave;
> file "srv3.local.slave";
> };
>
> zone "." IN {
> type hint;
> file "named.ca";
> };
>
> zone "localhost" IN {
> type master;
> file "localhost.zone";
> allow-update { none; };
> };
>
> zone "0.0.127.in-addr.arpa" IN {
> type master;
> file "named.local";
> allow-update { none; };
> };
>
>
> 095160160157:/var/named root# cat srv2/srv2.local.master
> $TTL 1d
> $ORIGIN srv2.local.
> @ IN SOA ns1 hostmaster 2011111700 12h 5m 3w 2h
> IN NS ns1
> IN NS ns2
> IN NS ns3
> ns1 IN A 127.0.0.1 <<-- port 2001
> ns2 IN A 127.0.0.1 <<-- port 2002
> ns3 IN A 127.0.0.1 <<-- port 2003
> 11 IN A 192.168.1.11
> 12 IN A 192.168.1.12
> 13 IN A 192.168.1.13
>
>
> 095160160157:/var/named root# cat srv3/named.conf
> options {
> directory "/var/named/srv3";
> version "olo-dns-server-1.0";
> allow-transfer { 127.0.0.1; };
> allow-recursion { 127.0.0.1; };
> listen-on 127.0.0.1 port 2003;
> };
>
> zone "srv1.local" IN {
> type slave;
> file "srv1.local.slave";
> };
>
> zone "srv2.local" IN {
> type slave;
> file "srv2.local.slave";
> };
>
> zone "srv3.local" IN {
> type master;
> file "srv3.local.master";
> };
>
> zone "." IN {
> type hint;
> file "named.ca";
> };
>
> zone "localhost" IN {
> type master;
> file "localhost.zone";
> allow-update { none; };
> };
>
> zone "0.0.127.in-addr.arpa" IN {
> type master;
> file "named.local";
> allow-update { none; };
> };
>
>
> 095160160157:/var/named root# cat srv3/srv3.local.master
> $TTL 1d
> $ORIGIN srv3.local.
> @ IN SOA ns1 hostmaster 2011111700 12h 5m 3w 2h
> IN NS ns1
> IN NS ns2
> IN NS ns3
> ns1 IN A 127.0.0.1 <<-- port 2001
> ns2 IN A 127.0.0.1 <<-- port 2002
> ns3 IN A 127.0.0.1 <<-- port 2003
> 11 IN A 192.168.1.11
> 12 IN A 192.168.1.12
> 13 IN A 192.168.1.13
>
>
> --
> Pozdrawiam,
> Aleksander Kurczyk
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: marka at isc.org
More information about the bind-users
mailing list