NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

configuring QEMU guest networking



I'm trying to configure QEMU guest (NetBSD 5.1) under NetBSD-5.99 host.
I'd to see my qemu guest OS in my local network (192.168.41/24) just
line host OS.
Under Linux I used bridge and tap interfaces for this.
But on NetBSD it doesn't work. Neither ping nor telnet
work in both directions. That is, I cannot access host OS from guest
and vice versa.

My settings are below. What am I doing wrong?

NetBSD host (nfe0 is my real ethernet interface):

    asrock# ifconfig nfe0
    nfe0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        
capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
        enabled=0
        address: 90:e6:ba:25:46:eb
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 192.168.41.5 netmask 0xffffff00 broadcast 192.168.41.255

    asrock# ifconfig tap0 
    tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        address: f2:0b:a4:ff:95:05
        media: Ethernet autoselect
        inet6 fe80::f00b:a4ff:feff:9505%tap0 prefixlen 64 scopeid 0x6

    asrock# ifconfig bridge0
    bridge0: flags=41<UP,RUNNING> mtu 1500

    asrock# brconfig bridge0
    bridge0: flags=41<UP,RUNNING>
        Configuration:
                priority 32768 hellotime 2 fwddelay 15 maxage 20
                ipfilter disabled flags 0x0
        Interfaces:
                tap0 flags=3<LEARNING,DISCOVER>
                        port 6 priority 128
                nfe0 flags=3<LEARNING,DISCOVER>
                        port 1 priority 128
        Address cache (max cache: 100, timeout: 1200):
                00:04:ed:62:75:e7 nfe0 715 flags=0<>
    asrock# 

NetBSD guest is run using the following command:

    qemu-system-x86_64 \
       -boot c \
       -hda netbsd.img -m 384 \
       -vga std \
       -net nic -net tap,ifname=tap0,script=no

NetBSD guest network:
    wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=2bf80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Tx,...>
        enabled=0
        address: 52:54:00:12:34:56
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet 192.168.41.50 netmask 0xffffff00 broadcast 192.168.41.255
        inet6 ...

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index