IP address on virtual bridge?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I would like to configure a static IP address on the virtual machine. This interface should be connected to one of the host physical interfaces via a bridge.
If I have understood the documentation correct, the physical interface attached to the bridge has no IP address. Only the Interface in the VM has to be configured with an IP address and must be on the same subnet like the default router which is a physical router connected behind a layer 2 infrastructure.
All the configuration examples shows an IP address configured on a virtual bridge. Why?
kvm
add a comment |
I would like to configure a static IP address on the virtual machine. This interface should be connected to one of the host physical interfaces via a bridge.
If I have understood the documentation correct, the physical interface attached to the bridge has no IP address. Only the Interface in the VM has to be configured with an IP address and must be on the same subnet like the default router which is a physical router connected behind a layer 2 infrastructure.
All the configuration examples shows an IP address configured on a virtual bridge. Why?
kvm
add a comment |
I would like to configure a static IP address on the virtual machine. This interface should be connected to one of the host physical interfaces via a bridge.
If I have understood the documentation correct, the physical interface attached to the bridge has no IP address. Only the Interface in the VM has to be configured with an IP address and must be on the same subnet like the default router which is a physical router connected behind a layer 2 infrastructure.
All the configuration examples shows an IP address configured on a virtual bridge. Why?
kvm
I would like to configure a static IP address on the virtual machine. This interface should be connected to one of the host physical interfaces via a bridge.
If I have understood the documentation correct, the physical interface attached to the bridge has no IP address. Only the Interface in the VM has to be configured with an IP address and must be on the same subnet like the default router which is a physical router connected behind a layer 2 infrastructure.
All the configuration examples shows an IP address configured on a virtual bridge. Why?
kvm
kvm
asked Jan 20 '14 at 17:21
fgeldfgeld
113
113
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If I'm interpreting your question wrong, just let me know and I will edit to suit
It is important to keep the distinction between host and guest clear, so I will try and do this with a hypothetical. I have a host (let's call it kvm1) with one physical NIC (eth0). That host is running one guest (let's creatively call it guest) which has been configured with one NIC. From inside guest, this NIC appears as eth1 (for clarity). If you want eth1 to have a static IP, all you need to do is add the IP using the /etc/network/interfaces
file on guest, for example.
Now for the host configuration on kvm1: I'm going to assume you're using /etc/network/interfaces
to configure host networking and that you have created a br0
interface and added eth0 to it (whether using brctl or virt-manager or virsh). Now, as long as the guest's VM configuration has its single NIC set up to be attached to br0, you should be good to go.
If you're using virsh/virt-manager
, you can try running brctl show
from a terminal to check. You should have a vmnetX
interface showing up as a member of br0
, and your guest is now directly bridged to the physical interface eth0. Now, connect eth0 to the nearest Ethernet switch in your LAN subnet, and guest should retain its static IP and be accessible from the rest of the network.
I'm hoping that made sense.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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%2faskubuntu.com%2fquestions%2f408301%2fip-address-on-virtual-bridge%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I'm interpreting your question wrong, just let me know and I will edit to suit
It is important to keep the distinction between host and guest clear, so I will try and do this with a hypothetical. I have a host (let's call it kvm1) with one physical NIC (eth0). That host is running one guest (let's creatively call it guest) which has been configured with one NIC. From inside guest, this NIC appears as eth1 (for clarity). If you want eth1 to have a static IP, all you need to do is add the IP using the /etc/network/interfaces
file on guest, for example.
Now for the host configuration on kvm1: I'm going to assume you're using /etc/network/interfaces
to configure host networking and that you have created a br0
interface and added eth0 to it (whether using brctl or virt-manager or virsh). Now, as long as the guest's VM configuration has its single NIC set up to be attached to br0, you should be good to go.
If you're using virsh/virt-manager
, you can try running brctl show
from a terminal to check. You should have a vmnetX
interface showing up as a member of br0
, and your guest is now directly bridged to the physical interface eth0. Now, connect eth0 to the nearest Ethernet switch in your LAN subnet, and guest should retain its static IP and be accessible from the rest of the network.
I'm hoping that made sense.
add a comment |
If I'm interpreting your question wrong, just let me know and I will edit to suit
It is important to keep the distinction between host and guest clear, so I will try and do this with a hypothetical. I have a host (let's call it kvm1) with one physical NIC (eth0). That host is running one guest (let's creatively call it guest) which has been configured with one NIC. From inside guest, this NIC appears as eth1 (for clarity). If you want eth1 to have a static IP, all you need to do is add the IP using the /etc/network/interfaces
file on guest, for example.
Now for the host configuration on kvm1: I'm going to assume you're using /etc/network/interfaces
to configure host networking and that you have created a br0
interface and added eth0 to it (whether using brctl or virt-manager or virsh). Now, as long as the guest's VM configuration has its single NIC set up to be attached to br0, you should be good to go.
If you're using virsh/virt-manager
, you can try running brctl show
from a terminal to check. You should have a vmnetX
interface showing up as a member of br0
, and your guest is now directly bridged to the physical interface eth0. Now, connect eth0 to the nearest Ethernet switch in your LAN subnet, and guest should retain its static IP and be accessible from the rest of the network.
I'm hoping that made sense.
add a comment |
If I'm interpreting your question wrong, just let me know and I will edit to suit
It is important to keep the distinction between host and guest clear, so I will try and do this with a hypothetical. I have a host (let's call it kvm1) with one physical NIC (eth0). That host is running one guest (let's creatively call it guest) which has been configured with one NIC. From inside guest, this NIC appears as eth1 (for clarity). If you want eth1 to have a static IP, all you need to do is add the IP using the /etc/network/interfaces
file on guest, for example.
Now for the host configuration on kvm1: I'm going to assume you're using /etc/network/interfaces
to configure host networking and that you have created a br0
interface and added eth0 to it (whether using brctl or virt-manager or virsh). Now, as long as the guest's VM configuration has its single NIC set up to be attached to br0, you should be good to go.
If you're using virsh/virt-manager
, you can try running brctl show
from a terminal to check. You should have a vmnetX
interface showing up as a member of br0
, and your guest is now directly bridged to the physical interface eth0. Now, connect eth0 to the nearest Ethernet switch in your LAN subnet, and guest should retain its static IP and be accessible from the rest of the network.
I'm hoping that made sense.
If I'm interpreting your question wrong, just let me know and I will edit to suit
It is important to keep the distinction between host and guest clear, so I will try and do this with a hypothetical. I have a host (let's call it kvm1) with one physical NIC (eth0). That host is running one guest (let's creatively call it guest) which has been configured with one NIC. From inside guest, this NIC appears as eth1 (for clarity). If you want eth1 to have a static IP, all you need to do is add the IP using the /etc/network/interfaces
file on guest, for example.
Now for the host configuration on kvm1: I'm going to assume you're using /etc/network/interfaces
to configure host networking and that you have created a br0
interface and added eth0 to it (whether using brctl or virt-manager or virsh). Now, as long as the guest's VM configuration has its single NIC set up to be attached to br0, you should be good to go.
If you're using virsh/virt-manager
, you can try running brctl show
from a terminal to check. You should have a vmnetX
interface showing up as a member of br0
, and your guest is now directly bridged to the physical interface eth0. Now, connect eth0 to the nearest Ethernet switch in your LAN subnet, and guest should retain its static IP and be accessible from the rest of the network.
I'm hoping that made sense.
answered Jan 22 '14 at 1:23
agc93agc93
645313
645313
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f408301%2fip-address-on-virtual-bridge%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