(E-Mail Removed) (Kev) writes:
]Hi, think the subject line sums up my problem. I have a linux box with
]2 network cards in it, with 2 seperate I.P. addresses. The box is not
]the DNS server and I cant change anything on the DNS server for the
]network (cos it dont let me). What I need to do is have a hostname
]corresponding to each network card on the linux box.
Sure. No problem. However, there are some gotchas which may not be what
you want.
a) routing-- basically you need to choose which of the ports to use with
which addresses. you cannot ask it to "use the least used one" or ask it
to split the traffic between the two (doubling the rate) for example.
Thus the usual situation is where you have an internal network say with
10.x.x.x addresses and an external network. Traffic for the outside
world goes via the external network and your default route is on that,
and traffic on the internal network goes via the other card.
As far as hostnames are concerned, there are two issues. a)
externally-- a hostname is just an alias for the IP address. The DNS
nameserver is the translator.
b) on the host itself-- you need to choose a hostname for the machine
itself (or X for example will get very upset) There is no particular
reason why the internal name should be the same as any external name.
(well there probably is, but it is not necessary).
Note that there is no reason why the machine need have the same name on
the two external networks either.
] So far it just has one hostname which just resolves to 1 of the
]I.P.s. Both cards are connected to the same network (it has to be this
]way! : ). I dont know which card this hostname/I.P. relates to at the
]moment.
IF they both connect to the same network, then the second card is
useless-- sell it to some deserving person. On the local network, the
packets are passed by MAC number not IP address. The gateway sends out a
request to the machines asking which MAC address is associated with a
given IP (which MUST be on the same subnet as the gateway address), and
then sends out the packets to that MAC address. Ie, locally IP addresses
are not used. And your gateway will have only one MAC per IP. Now you
could give each network card a different IP address. and the gateway
would associate each MAC with each IP but I have no idea what that would
buy you.
] I REALLY REALLY need help here. I can't find any posts about this in
]searches on message boads, usenet or the web. I do, however, need 2
]NICs on the same network with different hostnames :P
Why?
As always tell us the problem you want to solve, not the solution you
think you want. You will get far more help that way.
]Thanks in advance
]Kev
]Running: Mandrake 9