Disable dhcp client over one interface Announcing the arrival of Valued Associate #679: Cesar...
SF book about people trapped in a series of worlds they imagine
What initially awakened the Balrog?
What would you call this weird metallic apparatus that allows you to lift people?
Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?
When a candle burns, why does the top of wick glow if bottom of flame is hottest?
Sum letters are not two different
Using audio cues to encourage good posture
Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?
How does Python know the values already stored in its memory?
Why do early math courses focus on the cross sections of a cone and not on other 3D objects?
Can anything be seen from the center of the Boötes void? How dark would it be?
Do I really need to have a message in a novel to appeal to readers?
Take 2! Is this homebrew Lady of Pain warlock patron balanced?
Why do we bend a book to keep it straight?
Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?
How to react to hostile behavior from a senior developer?
How fail-safe is nr as stop bytes?
What's the meaning of "fortified infraction restraint"?
Should I use a zero-interest credit card for a large one-time purchase?
Morning, Afternoon, Night Kanji
Is there a kind of relay that only consumes power when switching?
Why weren't discrete x86 CPUs ever used in game hardware?
Can the Great Weapon Master feat's damage bonus and accuracy penalty apply to attacks from the Spiritual Weapon spell?
Chinese Seal on silk painting - what does it mean?
Disable dhcp client over one interface
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!How do I create a Linux virtual network interface (alias) with a real interface name?Linux:/sbin/dhclient to bind to a specific interface?Linux DHCP Server - Interface AssociationHow do I setup Ubuntu interfaces so one interface is “mapped” to another?Ping one interface from the otherHow to configure linux routing/filtering to send packets out one interface, over a bridge and into another interface on the same boxForwarding traffic from one ethernet interface to anotherDHCP server on a multi ip interfaceDHCP server and DHCP client on 1 interfaceDHCP fixed-address for linux bridge
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'm encountering a problem on a sever with two ethernet interfaces(etho and eth1), it runs linux-ubuntu-server.
I need eth1 not make any dhcp request, becouse I need it to be only a listening interface, obviusly I need eth0 running normally.
So how can i disable any dhcpclient ation over eth1?
thank in advance.
linux networking ubuntu dhcp
migrated from stackoverflow.com Jun 5 '10 at 6:17
This question came from our site for professional and enthusiast programmers.
add a comment |
I'm encountering a problem on a sever with two ethernet interfaces(etho and eth1), it runs linux-ubuntu-server.
I need eth1 not make any dhcp request, becouse I need it to be only a listening interface, obviusly I need eth0 running normally.
So how can i disable any dhcpclient ation over eth1?
thank in advance.
linux networking ubuntu dhcp
migrated from stackoverflow.com Jun 5 '10 at 6:17
This question came from our site for professional and enthusiast programmers.
add a comment |
I'm encountering a problem on a sever with two ethernet interfaces(etho and eth1), it runs linux-ubuntu-server.
I need eth1 not make any dhcp request, becouse I need it to be only a listening interface, obviusly I need eth0 running normally.
So how can i disable any dhcpclient ation over eth1?
thank in advance.
linux networking ubuntu dhcp
I'm encountering a problem on a sever with two ethernet interfaces(etho and eth1), it runs linux-ubuntu-server.
I need eth1 not make any dhcp request, becouse I need it to be only a listening interface, obviusly I need eth0 running normally.
So how can i disable any dhcpclient ation over eth1?
thank in advance.
linux networking ubuntu dhcp
linux networking ubuntu dhcp
asked Jun 4 '10 at 9:00
LopocLopoc
141114
141114
migrated from stackoverflow.com Jun 5 '10 at 6:17
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Jun 5 '10 at 6:17
This question came from our site for professional and enthusiast programmers.
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Something like:
auto lo eth0 eth1
iface lo inet loopback
iface eth1 inet static
address 192.168.32.130
netmask 255.255.255.0
gateway 192.168.32.1
in your /etc/network/interfaces
config file will assign your eth1
a static IP address.
1
I need eth1 to be mute, no IP at all, probably i could set in /etc/network/interfaces address to 0.0.0.0
– Lopoc
Jun 4 '10 at 9:15
2
@Lopoc: If you wanteth1
to be disabled completely, you may try to leave only interfaces you need to be up in/etc/network/interfaces
:auto lo eth0
. If you want your interface to reject all incoming connections you may useiptables
,ipfw
.
– Yasir Arsanukaev
Jun 4 '10 at 9:36
add a comment |
Sometimes even with correct /etc/network/interfaces
file, dhclient
continues to request IP addresses on static interfaces. The problem might be the existence of old /var/lib/dhcp/dhclient.*.leases
files with incorrect information. Just kill dhclient
, remove those files, and start it anew (by doing ifdown
/ifup
on DHCP interfaces).
add a comment |
if you don't want to add a static ip on this interface, maybe you have to delete the IP assigned by DHCP client.
Running this script will remove the ip on eth0.
#!/bin/sh
localip=`ip addr list dev eth0 | grep "inet " | sed 's/(^s*inets)([0-9.]*)([s/].*)/2/'`
if [[$ip != ""]]; then
sudo ip addr del $localip dev eth0
fi
You need to run it manually or set it into crontab. Or, try to call it after IP assigned, but I don't know how to hook that.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f148443%2fdisable-dhcp-client-over-one-interface%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Something like:
auto lo eth0 eth1
iface lo inet loopback
iface eth1 inet static
address 192.168.32.130
netmask 255.255.255.0
gateway 192.168.32.1
in your /etc/network/interfaces
config file will assign your eth1
a static IP address.
1
I need eth1 to be mute, no IP at all, probably i could set in /etc/network/interfaces address to 0.0.0.0
– Lopoc
Jun 4 '10 at 9:15
2
@Lopoc: If you wanteth1
to be disabled completely, you may try to leave only interfaces you need to be up in/etc/network/interfaces
:auto lo eth0
. If you want your interface to reject all incoming connections you may useiptables
,ipfw
.
– Yasir Arsanukaev
Jun 4 '10 at 9:36
add a comment |
Something like:
auto lo eth0 eth1
iface lo inet loopback
iface eth1 inet static
address 192.168.32.130
netmask 255.255.255.0
gateway 192.168.32.1
in your /etc/network/interfaces
config file will assign your eth1
a static IP address.
1
I need eth1 to be mute, no IP at all, probably i could set in /etc/network/interfaces address to 0.0.0.0
– Lopoc
Jun 4 '10 at 9:15
2
@Lopoc: If you wanteth1
to be disabled completely, you may try to leave only interfaces you need to be up in/etc/network/interfaces
:auto lo eth0
. If you want your interface to reject all incoming connections you may useiptables
,ipfw
.
– Yasir Arsanukaev
Jun 4 '10 at 9:36
add a comment |
Something like:
auto lo eth0 eth1
iface lo inet loopback
iface eth1 inet static
address 192.168.32.130
netmask 255.255.255.0
gateway 192.168.32.1
in your /etc/network/interfaces
config file will assign your eth1
a static IP address.
Something like:
auto lo eth0 eth1
iface lo inet loopback
iface eth1 inet static
address 192.168.32.130
netmask 255.255.255.0
gateway 192.168.32.1
in your /etc/network/interfaces
config file will assign your eth1
a static IP address.
answered Jun 4 '10 at 9:06
Yasir ArsanukaevYasir Arsanukaev
1814
1814
1
I need eth1 to be mute, no IP at all, probably i could set in /etc/network/interfaces address to 0.0.0.0
– Lopoc
Jun 4 '10 at 9:15
2
@Lopoc: If you wanteth1
to be disabled completely, you may try to leave only interfaces you need to be up in/etc/network/interfaces
:auto lo eth0
. If you want your interface to reject all incoming connections you may useiptables
,ipfw
.
– Yasir Arsanukaev
Jun 4 '10 at 9:36
add a comment |
1
I need eth1 to be mute, no IP at all, probably i could set in /etc/network/interfaces address to 0.0.0.0
– Lopoc
Jun 4 '10 at 9:15
2
@Lopoc: If you wanteth1
to be disabled completely, you may try to leave only interfaces you need to be up in/etc/network/interfaces
:auto lo eth0
. If you want your interface to reject all incoming connections you may useiptables
,ipfw
.
– Yasir Arsanukaev
Jun 4 '10 at 9:36
1
1
I need eth1 to be mute, no IP at all, probably i could set in /etc/network/interfaces address to 0.0.0.0
– Lopoc
Jun 4 '10 at 9:15
I need eth1 to be mute, no IP at all, probably i could set in /etc/network/interfaces address to 0.0.0.0
– Lopoc
Jun 4 '10 at 9:15
2
2
@Lopoc: If you want
eth1
to be disabled completely, you may try to leave only interfaces you need to be up in /etc/network/interfaces
: auto lo eth0
. If you want your interface to reject all incoming connections you may use iptables
, ipfw
.– Yasir Arsanukaev
Jun 4 '10 at 9:36
@Lopoc: If you want
eth1
to be disabled completely, you may try to leave only interfaces you need to be up in /etc/network/interfaces
: auto lo eth0
. If you want your interface to reject all incoming connections you may use iptables
, ipfw
.– Yasir Arsanukaev
Jun 4 '10 at 9:36
add a comment |
Sometimes even with correct /etc/network/interfaces
file, dhclient
continues to request IP addresses on static interfaces. The problem might be the existence of old /var/lib/dhcp/dhclient.*.leases
files with incorrect information. Just kill dhclient
, remove those files, and start it anew (by doing ifdown
/ifup
on DHCP interfaces).
add a comment |
Sometimes even with correct /etc/network/interfaces
file, dhclient
continues to request IP addresses on static interfaces. The problem might be the existence of old /var/lib/dhcp/dhclient.*.leases
files with incorrect information. Just kill dhclient
, remove those files, and start it anew (by doing ifdown
/ifup
on DHCP interfaces).
add a comment |
Sometimes even with correct /etc/network/interfaces
file, dhclient
continues to request IP addresses on static interfaces. The problem might be the existence of old /var/lib/dhcp/dhclient.*.leases
files with incorrect information. Just kill dhclient
, remove those files, and start it anew (by doing ifdown
/ifup
on DHCP interfaces).
Sometimes even with correct /etc/network/interfaces
file, dhclient
continues to request IP addresses on static interfaces. The problem might be the existence of old /var/lib/dhcp/dhclient.*.leases
files with incorrect information. Just kill dhclient
, remove those files, and start it anew (by doing ifdown
/ifup
on DHCP interfaces).
edited Jul 27 '17 at 15:30
Cory Knutson
1,746719
1,746719
answered Jul 26 '17 at 11:53
lvdlvd
1112
1112
add a comment |
add a comment |
if you don't want to add a static ip on this interface, maybe you have to delete the IP assigned by DHCP client.
Running this script will remove the ip on eth0.
#!/bin/sh
localip=`ip addr list dev eth0 | grep "inet " | sed 's/(^s*inets)([0-9.]*)([s/].*)/2/'`
if [[$ip != ""]]; then
sudo ip addr del $localip dev eth0
fi
You need to run it manually or set it into crontab. Or, try to call it after IP assigned, but I don't know how to hook that.
New contributor
add a comment |
if you don't want to add a static ip on this interface, maybe you have to delete the IP assigned by DHCP client.
Running this script will remove the ip on eth0.
#!/bin/sh
localip=`ip addr list dev eth0 | grep "inet " | sed 's/(^s*inets)([0-9.]*)([s/].*)/2/'`
if [[$ip != ""]]; then
sudo ip addr del $localip dev eth0
fi
You need to run it manually or set it into crontab. Or, try to call it after IP assigned, but I don't know how to hook that.
New contributor
add a comment |
if you don't want to add a static ip on this interface, maybe you have to delete the IP assigned by DHCP client.
Running this script will remove the ip on eth0.
#!/bin/sh
localip=`ip addr list dev eth0 | grep "inet " | sed 's/(^s*inets)([0-9.]*)([s/].*)/2/'`
if [[$ip != ""]]; then
sudo ip addr del $localip dev eth0
fi
You need to run it manually or set it into crontab. Or, try to call it after IP assigned, but I don't know how to hook that.
New contributor
if you don't want to add a static ip on this interface, maybe you have to delete the IP assigned by DHCP client.
Running this script will remove the ip on eth0.
#!/bin/sh
localip=`ip addr list dev eth0 | grep "inet " | sed 's/(^s*inets)([0-9.]*)([s/].*)/2/'`
if [[$ip != ""]]; then
sudo ip addr del $localip dev eth0
fi
You need to run it manually or set it into crontab. Or, try to call it after IP assigned, but I don't know how to hook that.
New contributor
New contributor
answered 17 mins ago
sceggscegg
1011
1011
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f148443%2fdisable-dhcp-client-over-one-interface%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown