Re: multiple network cards and dns
- From: Ryan Castleberry <ryan@xxxxxxxxxxx>
- Date: Sun, 31 Dec 2006 12:30:50 -0700
Andrew Critchlow wrote:
When you have 2 network cards in use with debian with DNS server configured on each which one does it choose to query for an address?DNS is a map of names to numbers and numbers to names. You can basically assign any name to each IP for each NIC. If you assign the same name to two IP address, BIND DNS will rotate the responses in a round robin fashion.
Is configuring 2 network cards on debian as simple as configuring one card?
thanks everyone.
So:
foo.bar. IN A 192.168.1.1
foo.bar. IN A 192.168.1.2
Will first respond to queries:
192.168.1.1 192.168.1.2
Then will respond:
192.168.1.2 192.168.1.1
This is a load balancing feature of BIND 4.9 and later versions, if this is what you are trying to accomplish. Otherwise if it's a firewall, assign a different name to the internal and external IPs.
Configuring two NICs is as simple as adding another entry in /etc/network/interfaces for the new NIC. Be careful as sometimes after adding a second NIC the original NIC may become eth1 rather than eth0 (this has been PCI slot placement dependent for me).
Here's the /etc/network/interfaces file from my firewall:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
auto lo eth0 eth1
# The loopback network interface
iface lo inet loopback
# The internal (onboard) network interface
iface eth1 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
#gateway 192.168.1.254
# The external (pci) network interface
iface eth0 inet static
address 55.55.55.105
netmask 255.255.255.0
network 55.55.55.0
broadcast 55.55.55.255
gateway 55.55.55.254
Note the commented out gateway for eth1. Since this is a firewall the appropriate gateway is the external one and if both gateways are enabled routes get screwed up. I know as I've had this hang me up before...
-Ryan
- References:
- multiple network cards and dns
- From: Andrew Critchlow
- multiple network cards and dns
- Prev by Date: Re: update messages
- Next by Date: Re: new to debian but having installation problems
- Previous by thread: multiple network cards and dns
- Next by thread: RE: multiple network cards and dns
- Index(es):
Relevant Pages
- Re: Dual NICs on Server 2003 issue
... The OUTSIDE Nic is the Internet. ... connects via another gateway to
a remote site that is on a 10.0.1.x subnet. ... 192.168.87.x network INTERNAL then via
the 192.168.87.1 gateway to the ... > stand alone server in an existing AD domain we have 2
NICS installed. ... (microsoft.public.windows.server.networking) - Re: Changing default gateway from the command line (fc3)
... The box has 2 NICs with a default gateway set up to go through ... >
the NICs onto the same network as the 192.168.1.1 machine. ... allows direct access for
us without going through that firewall. ... (uk.comp.os.linux) - Re: 2003 DC Multihomed - 1 Nic wont answer - help!!
... No no nat, internally on the lan there is no problem, with the gateway ... gateway
is pointed at my internal network gateway through the appliance then ... Are both NICs
on the same subnet connected to the same physical network? ... Have you installed NAT on
this server? ... (microsoft.public.windows.server.networking) - Re: Dual NICs on Server 2003 issue
... connects via another gateway to a remote site that is on a 10.0.1.x subnet.
... 192.168.87.x network INTERNAL then via the 192.168.87.1 gateway to the ... stand
alone server in an existing AD domain we have 2 NICS installed. ... (microsoft.public.windows.server.networking) - Re: 2 Nics and 2 subnets traffic configuration
... What are you trying to ping on 192.168.2.x network? ... Can you ping
default gateway? ... > Are the NICs setup correctly? ... (microsoft.public.windows.server.networking)