LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 12-20-2008, 06:08 PM   #1
shogun1234
Member
 
Registered: May 2004
Posts: 167

Rep: Reputation: 15
kvm wireless bridge network


I've successfully install kvm with private network (nat) up running. I want to switch the kvm network using bridge mode (or host-interface), but do not success.

env: nic iwl4965/ kernel 2.6.27.8/ debian etch upgrade to lenny/ kvm 0.9.1/ hardware hp 6910p

The doc I follow up is at http://kvm.qumranet.com/kvmwiki/Netw...c1547920d9a74a

The way how i set it up is to modify /etc/network/interfaces by adding following section to enable br0
Code:
allow-hotplug br0
iface br0 inet dhcp
bridge_ports wlan0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
it looks fine as it outputs
Code:
br0       Link encap:Ethernet  HWaddr 00:1f:3b:21:25:13 
          inet addr:192.168.1.72  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21f:3bff:fe21:2513/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1259 errors:0 dropped:0 overruns:0 frame:0
          TX packets:753 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:449060 (438.5 KiB)  TX bytes:173260 (169.1 KiB)
and the qemu-ifup is
Code:
#!/bin/sh
set -x

switch=br0

if [ -n "$1" ];then
        /usr/bin/sudo /usr/sbin/tunctl -u `whoami` -t tap0
        /usr/bin/sudo /sbin/ip link set tap0 up
        sleep 0.5s
        /usr/bin/sudo /usr/sbin/brctl addif $switch tap0
        echo "Error: no interface specified"
        exit 1
fi
then start first image with
Code:
sudo kvm -hda k1.img -net nic,macaddr=DE:AD:BE:EF:90:26 -net tap,script=/home/path/to/qemu-ifup.0
this creates tap0 in the output of ifconfig.

However, the problem is the guest os, which starts with -hda k1.img, can not access to the internet.

Is there any step I miss? or it is because wireless does not support bridge (I've heard doc says that wireless does not support wireless bridge)?

Thank in advice,
 
Old 12-21-2008, 07:05 PM   #2
wilfgascon
LQ Newbie
 
Registered: Dec 2008
Posts: 10

Rep: Reputation: 1
Unhappy KVM over IP

The KVM over IP that I use is from http://www.raritan.info/ and it is not wireless. I run no problem with bridged or unbridged connection. I have never used a wireless KVM.

Of course, that is an entirely different story BUT I have been troubleshooting for wireless connections and wireless does not work on bridged mode.
 
Old 12-22-2008, 04:43 PM   #3
shogun1234
Member
 
Registered: May 2004
Posts: 167

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by wilfgascon View Post
The KVM over IP that I use is from http://www.raritan.info/ and it is not wireless. I run no problem with bridged or unbridged connection. I have never used a wireless KVM.

Of course, that is an entirely different story BUT I have been troubleshooting for wireless connections and wireless does not work on bridged mode.
Hi

Thanks for reply. Is there any doc referring to this information (wireless does not support bridge mode.) I've read some doc on the internet saying that wireless does not support bridge mode; but can not find any explain on e.g. http://wireless.kernel.org/en/users/Drivers/iwl4965. This makes me confused as I can not make sure the cause of the problem is due to my misconfiguration or the essense of the driver.

Thanks again for your help.
 
Old 01-07-2009, 02:48 PM   #4
mkhan01
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 1
hi, it is my understanding that most wireless nics do not support bridge mode... other than some old 11mbps cards using a specific chipset...

judging from your post, I am assuming you want a kvm guest to be able to get on the network while running on a host that is networked using a wireless nic.

if this is the case, you have two options: 1. run NAT/DHCP on the host and have it route the traffic out for the guest. 2. try to bridge via using the software layer 3 daemon (parprouted), you can google parprouted + wireless or checkout a guide like this: http://www.scottro.net/vboxbridge.html, or this: http://wiki.voyage.hk/dokuwiki/doku....n_managed_mode

I had this setup and working previously w/ kvm on ubuntu but I don't have it up and running at the moment so I don't have kvm specific scripts available to post here.

Regarding your query about documentation for wireless bridging limitations try this: http://www.linuxfoundation.org/en/Ne...reless_card.21

Last edited by mkhan01; 01-07-2009 at 02:51 PM.
 
1 members found this post helpful.
Old 01-11-2009, 07:10 AM   #5
pierro78
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Rep: Reputation: 0
thanks so much for the tip mkhan01 !

I followed the parprouted VirtualBox tutorial on http://www.hazard.maks.net/blog/inde...70120&blogId=1

And then started my kvm virtual machine like this :
/usr/local/kvm/bin/qemu-system-x86_64 -hda /dev/sdb -m 512 -net nic,macaddr=DE:AD:BE:EF:90:26 -net tap,ifname=tap0,script=no

And configured the network interface in the guest vm with new static IP, subnet, mask, gateway and dns servers.

And it's working nicely

PS :
here is also an interesting comment with a script about parprouted on wireless ubuntu :
http://www.linuxweblog.com/virtualbo...ng#comment-328

Last edited by pierro78; 01-11-2009 at 07:45 AM.
 
1 members found this post helpful.
Old 08-13-2012, 03:01 PM   #6
attb2
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Ubuntu 11.10 and 12.04

I try to summarize my experiences.
Following config works for me perfectly! Host and Guest on same subnet on a wireless NIC.

Host: Ubuntu 11.10
Guest: Ubuntu 12.04

Host:
wireless IP address: 192.168.111.20 wlan0 (network 192.168.111.0/24)

/etc/rc.local:
Code:
/usr/sbin/tunctl -t tap0
/sbin/ip link set tap0 up
/sbin/ip addr add 192.168.111.30/24 dev tap0
/usr/sbin/parprouted wlan0 tap0
After running rc.local you see following on Host:
$>ip ad list
Code:
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 38:59:f9:b2:9b:92 brd ff:ff:ff:ff:ff:ff
    inet 192.168.111.20/24 brd 192.168.111.255 scope global wlan0
    inet6 fe80::3a59:f9ff:feb2:9b92/64 scope link
       valid_lft forever preferred_lft forever
4: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 500
    link/ether 16:73:b5:e4:24:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.111.30/24 scope global tap0
    inet6 fe80::1473:b5ff:fee4:24a5/64 scope link
       valid_lft forever preferred_lft forever
$>ip route list
Code:
default via 192.168.111.1 dev wlan0  proto static
169.254.0.0/16 dev wlan0  scope link  metric 1000
192.168.111.0/24 dev tap0  proto kernel  scope link  src 192.168.111.30
192.168.111.0/24 dev wlan0  proto kernel  scope link  src 192.168.111.20  metric 2
192.168.111.1 dev wlan0  scope link  metric 50
192.168.111.31 dev tap0  scope link  metric 50
Guest:
/etc/network/interfaces:
Code:
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
 address 192.168.111.31
 netmask 255.255.255.0
 network 192.168.111.0
 gateway 192.168.111.30
Starting kvm:
$>kvm -m 256 -k hu -net nic,macaddr=DE:AD:BE:EF:90:26 -net tap,ifname=tap0,script=no /iso/VM/ubuntu_12.04.img
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto bridge wireless and wired network interfaces? pohl886 Debian 11 07-19-2011 06:58 PM
Network Bridge Ad-hoc Wireless Ubuntu slamb2002 Linux - Newbie 3 10-01-2007 04:52 PM
problem with network behind wireless bridge huleri Linux - Wireless Networking 0 04-11-2007 03:38 PM
Wireless - Wired bridge while still being usable? Other network questions too.... etherag Linux - Wireless Networking 6 08-27-2004 09:37 AM
linux gentoo network not connecting through wireless bridge indatasys Linux - Wireless Networking 1 05-30-2004 09:26 AM


All times are GMT -5. The time now is 08:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration