Setting default network interface?
I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.
When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?
debian networking network-interface ethernet defaults
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.
When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?
debian networking network-interface ethernet defaults
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.
When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?
debian networking network-interface ethernet defaults
I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.
When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?
debian networking network-interface ethernet defaults
debian networking network-interface ethernet defaults
asked Feb 21 '18 at 14:14
user5104897user5104897
149114
149114
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You just need to set the default gateway to the correct interface.
It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces
This is a minimal configuration example for your /etc/network/interfaces file:
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1 8.8.8.8
You need to replace the values with your personal network settings.
Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.
Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.
add a comment |
Supposing you've got DHCP on both interfaces:
- Right click on the Network Manager tray icon
- Choose Edit Connections...
- Double click your eth6 connection
- In the IPv4 Settings tab choose Automatic (DHCP) address only
- Close the window clicking Save
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f425673%2fsetting-default-network-interface%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You just need to set the default gateway to the correct interface.
It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces
This is a minimal configuration example for your /etc/network/interfaces file:
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1 8.8.8.8
You need to replace the values with your personal network settings.
Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.
Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.
add a comment |
You just need to set the default gateway to the correct interface.
It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces
This is a minimal configuration example for your /etc/network/interfaces file:
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1 8.8.8.8
You need to replace the values with your personal network settings.
Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.
Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.
add a comment |
You just need to set the default gateway to the correct interface.
It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces
This is a minimal configuration example for your /etc/network/interfaces file:
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1 8.8.8.8
You need to replace the values with your personal network settings.
Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.
Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.
You just need to set the default gateway to the correct interface.
It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces
This is a minimal configuration example for your /etc/network/interfaces file:
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1 8.8.8.8
You need to replace the values with your personal network settings.
Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.
Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.
answered Feb 21 '18 at 14:28
MarcMarc
3443
3443
add a comment |
add a comment |
Supposing you've got DHCP on both interfaces:
- Right click on the Network Manager tray icon
- Choose Edit Connections...
- Double click your eth6 connection
- In the IPv4 Settings tab choose Automatic (DHCP) address only
- Close the window clicking Save
add a comment |
Supposing you've got DHCP on both interfaces:
- Right click on the Network Manager tray icon
- Choose Edit Connections...
- Double click your eth6 connection
- In the IPv4 Settings tab choose Automatic (DHCP) address only
- Close the window clicking Save
add a comment |
Supposing you've got DHCP on both interfaces:
- Right click on the Network Manager tray icon
- Choose Edit Connections...
- Double click your eth6 connection
- In the IPv4 Settings tab choose Automatic (DHCP) address only
- Close the window clicking Save
Supposing you've got DHCP on both interfaces:
- Right click on the Network Manager tray icon
- Choose Edit Connections...
- Double click your eth6 connection
- In the IPv4 Settings tab choose Automatic (DHCP) address only
- Close the window clicking Save
answered Feb 22 '18 at 9:12
Ferenc WágnerFerenc Wágner
2,984920
2,984920
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f425673%2fsetting-default-network-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