Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

KVM, network & bridging

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
TheCoop
Veteran
Veteran
User avatar
Posts: 1814
Joined: Sat Jun 15, 2002 5:20 pm
Location: Where you least expect it
Contact:
Contact TheCoop
Website

KVM, network & bridging

  • Quote

Post by TheCoop » Mon Mar 30, 2009 8:29 pm

So, I'm trying to set up kvm and bridged networking. My host has a wireless connection to my router, which uses dhcp. I've set up a bridge network device, and linked the wireless network adapter and tap0 to it. From a null network config:

Code: Select all

wpa_supplicant ... wlan0
tunctl -u <user> -t tap0

brctl addbr br0
brctl addif br0 wlan0
brctl addif br0 tap0
ifconfig tap0 up 0.0.0.0 promisc
ifconfig wlan0 promisc

dhcpcd br0 (successfully gets an ip address)

kvm -net nic,macaddr=72:7d:39:89:4a:e1 -net tap,ifname=tap0,script=no,downscript=no -hda gentoo.img -cdrom install-amd64-minimal-2008.0.iso -boot d
But dhcpcd within the guest doesn't receive any response from the dhcp server on the wireless router. What am I missing, or how can I help diagnose the issue?
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Top
Abraxas
l33t
l33t
User avatar
Posts: 814
Joined: Sun May 25, 2003 1:00 pm

  • Quote

Post by Abraxas » Tue Mar 31, 2009 1:00 am

I'm pretty sure bridging does not work with wireless interfaces.
Top
ianw1974
Guru
Guru
User avatar
Posts: 387
Joined: Wed Oct 18, 2006 12:25 pm
Location: UK and Poland
Contact:
Contact ianw1974
Website

  • Quote

Post by ianw1974 » Tue Mar 31, 2009 6:49 pm

Yep, you can't really bridge with wireless. What you need to do is create a tap interface and just just assign a route on the main host system:

Code: Select all

route add -host x.x.x.x dev tap0
where x.x.x.x is the IP of your guest. The guest will use the tap device for it's network connection. The kernels proxy ARP feature should/will ensure the routing will go back and to, and the guest machine should be able to ping all physical machines on your network.
Ian Walker

Light travels faster than sound. This is why some people appear bright until you hear them speak.........

Linux Systems Limited | Masternode Monitoring
Top
epsilon72
Guru
Guru
User avatar
Posts: 568
Joined: Thu Sep 20, 2007 12:49 am

  • Quote

Post by epsilon72 » Fri Apr 17, 2009 12:48 am

Hello,
I was able to use comments in this thread in conjunction with this page to get networking to work with a virtual machine.

The only problem is .... having it set up this way kills network for my actual computer (i.e., it only works inside the vm until I restart eth0).

Is there any way to prevent this?
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic