[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
qemu Hurd tun/tap networking with bridge on Fedora host
From: |
Shakthi Kannan |
Subject: |
qemu Hurd tun/tap networking with bridge on Fedora host |
Date: |
Mon, 5 Oct 2009 00:47:48 +0530 |
Hi,
I am trying to run Debian GNU Hurd (K16) on qemu (with kqemu) with
tun/tap, bridge setup from the host system (Fedora 11).
# rpm -qa | grep qemu
qemu-user-0.10.6-5.fc11.i586
qemu-system-arm-0.10.6-5.fc11.i586
kmod-kqemu-2.6.29.6-213.fc11.i586-1.4.0-0.2.pre1.fc11.11.i586
qemu-common-0.10.6-5.fc11.i586
qemu-system-ppc-0.10.6-5.fc11.i586
kqemu-1.4.0-0.4.pre1.fc11.noarch
qemu-system-mips-0.10.6-5.fc11.i586
qemu-0.10.6-5.fc11.i586
qemu-system-sparc-0.10.6-5.fc11.i586
qemu-system-sh4-0.10.6-5.fc11.i586
qemu-img-0.10.6-5.fc11.i586
qemu-system-m68k-0.10.6-5.fc11.i586
qemu-system-cris-0.10.6-5.fc11.i586
qemu-system-x86-0.10.6-5.fc11.i586
1. I have first stopped the NetworkManager on the host system to not
interfere with the configurations.
# service NetworkManager stop
2. /etc/sysconfig/network-scripts/ files:
=== ifcfg-eth0 ===
# Networking Interface
DEVICE=eth0
TYPE=Ethernet
BRIDGE=br0
ONBOOT=yes
=== ifcfg-br0 ===
# Networking Interface
DEVICE=br0
ONBOOT=yes
HWADDR=00:21:70:CB:08:5D
TYPE=Bridge
BOOTPROTO=dhcp
DELAY=0
NAME="System br0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
STP=off
3. Start the network manually using:
# service network restart
4. ifconfig outputs:
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:21:70:CB:08:5D
inet6 addr: fe80::221:70ff:fecb:85d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8642 errors:0 dropped:0 overruns:0 frame:0
TX packets:4354 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3611804 (3.4 MiB) TX bytes:775071 (756.9 KiB)
Interrupt:30 Base address:0x8000
br0 Link encap:Ethernet HWaddr 00:21:70:CB:08:5D
inet addr:<public-IP> Bcast:<public-IP>..255 Mask:255.255.255.0
inet6 addr: fe80::221:70ff:fecb:85d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1689 errors:0 dropped:0 overruns:0 frame:0
TX packets:846 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:635269 (620.3 KiB) TX bytes:191003 (186.5 KiB)
Ping works for any Internet IP address.
4. I have qemu-{ifup,ifdown} scripts:
=== qemu-ifup ===
#!/bin/sh
/usr/sbin/openvpn --mktun --dev $1 --user shaks
/sbin/ifconfig $1 172.16.0.1 promisc up
/usr/sbin/brctl addif br0 $1
=== qemu-ifdown ===
#!/bin/sh
/sbin/ifconfig $1 down
/usr/sbin/brctl delif br0 $1
/usr/sbin/openvpn --rmtun --dev $1
that create tap0 interface. I have "tun" module loaded.
# lsmod | grep tun
tun 9852 1
tunnel4 2672 1 sit
kvm module is not loaded. kqemu is loaded though.
5. Running qemu-ifup:
# qemu-ifup tap0
creates the tap0 interface:
tap0 Link encap:Ethernet HWaddr 6A:27:36:72:86:8B
inet addr:172.16.0.1 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::6827:36ff:fe72:868b/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:1565 errors:0 dropped:329 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:714 (714.0 b) TX bytes:144683 (141.2 KiB)
# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.002170cb085d no eth0
tap0
pan0 8000.000000000000 no
I do get a 169.254.0.0 entry for br0, which I remove using:
# ip route del 169.254.0.0/16 dev br0
The route table looks like:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
<public-IP>.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
172.16.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tap0
0.0.0.0 <public-IP>.1 0.0.0.0 UG 0 0 0 br0
6. I boot Hurd on qemu using:
# qemu -boot a -hda hurd-16.img -fda grub-0.97-i386-pc.ext2fs -net nic
-net tap,ifname=tap0,script=no
I configure network using:
# settrans -fgap /servers/socket/2 /hurd/pfinet -i eth0 -a
172.16.0.2 -g 172.16.0.1 -m 255.255.0.0
# echo "nameserver 208.67.220.220" > /etc/resolv.conf
What works:
1. Ping to Internet from host system.
2. Pinging 172.16.0.1 (localhost) on host system.
3. Pinging 172.16.0.2 (on GNU Hurd), within qemu.
What doesn't work;
4. Pinging 172.16.0.1 to 172.16.0.2.
What could I be missing here? Appreciate any inputs. Thanks!
SK
--
Shakthi Kannan
http://www.shakthimaan.com
- qemu Hurd tun/tap networking with bridge on Fedora host,
Shakthi Kannan <=