Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A bridge is a Layer 2 device, routes by MAC address before IP even comes into play. Both the tap and eth0 have to be bound to the bridge before you assign an IP address to the bridge. Post #9 in this thread gives you the commands for a fixed IP, just replace the last 2 lines with your normal DHCP command if you want a dynamic IP.
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329
Rep:
perhaps you should consider reading this. Old, but still good info.
for now, I will give you some snippets from the HOWTO, for correctness
Quote:
On seeing this, I now realized that although eth0 doesn't have an IP any more with such setting, it is still *bind* to the bridge device, and I can still use eth0 the same way as before. From the application using eth0 prospective, nothing is changed, right?
Not true, actually. The right way to say it is "eth0 is *enslaved* to bridge". And when your ethX is enslaved, you _lose control over it_, you _cannot use it directly_ anymore. You should set up the bridge instead
Code:
ifconfig bridge0 192.168.0.1 up
and put the _enslaved_ ethX up in promiscuous mode (that's the only thing you can do with the enslaved interfaces)
Code:
ifconfig ethX promisc up
or
Code:
ifconfig ethX 0.0.0.0 promisc up
Both commands give the same result.
That's the same procedure you should use with TAP interfaces.
Quote:
- leave my physical interface eth0 as is, and only bring up the KVM
bridge device if I am using KVM.
The actual reason behind why I chose the above approach is that I still want my eth0 to be eth0, instead of need to use br0 for all my network applications.
It will be easier to use the bridge instead of ethX, just like the HOWTO says.
Or you could rename the interface eth0 to peth0 and the bridge0 to eth0, as Xen does. But that's harder to achieve.
Quote:
- I can't ping outside my local network
- I tried to setup /etc/resolv.conf but dns look up still fails
- DHCP request still fails
These problems may not necessarily be related to the configuration of the bridge. If you can ping from your VM to any host on your LAN, then the bridge is working, and that's a start.
You can't have an ip address assigned to eth0 when your using a bridge. The ifconfig shows eth0 with an ip address after the commands. Are you running something that manages eth0 an reinvokes dhcp? Something like wicd?
You can't have an ip address assigned to eth0 when your using a bridge. . . Are you running something that manages eth0 an reinvokes dhcp?
BINGO!
I know that I can't have an ip address assigned to eth0 when using a bridge, but I didn't make the connection why it is still yet even after I zeroed it and my running pump. . .
Having killed my pump everything worked fine now. Will conclude in next post.
Thanks everyone who helped. Chuck56, you helped me from the start to the end, answered my every question! HasC, thanks for your replies and the useful bridge link!
Thanks again. Will contributing back by concluding in next post.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.