Using different hostnames on different interfaces (with dhclient)
- From: Stefan Puiu <stefan puiu gmail com>
- To: networkmanager-list gnome org
- Subject: Using different hostnames on different interfaces (with dhclient)
- Date: Mon, 23 Jan 2012 21:55:20 +0200
Hi,
I've asked this on the Ubuntu forums without any success
(http://ubuntuforums.org/showthread.php?t=1913550), so I'm trying my
luck here.
I'm using Ubuntu 11.04 at work and I have 2 NICs, each connected to a
separate subnet. Only one of the subnets is accessible when I VPN to
work, so I thought it would be cool to be able to use different
hostnames for each interface. I tried the following in
/etc/dhcp/dhclient.conf:
interface "eth4" {
send host-name "host2";
}
interface "eth5" {
send host-name "host1";
}
However, I still get host1.<domain> assigned randomly to either IP
address (I'm checking what IP the FQDN resolves to in DNS). However, I
still get host1 assigned alternatively to eth4 or eth5. In
/var/run/nm-dhclient-eth4.conf, it seems NetworkManager decided on his
own account to "make some changes":
interface "eth4" {
}
interface "eth5" {
}
send host-name "host1"; # added by NetworkManager
And then in nm-dhclient-eth5.conf:
interface "eth4" {
send host-name "host2";
}
interface "eth5" {
send host-name "host1";
}
What would be the proper way to achieve this?
Thanks,
Stefan.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]