Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jun 2007 13:03:37 +0200 (CEST)
From:      Per Hedeland <per@hedeland.org>
To:        scottro@nyc.rr.com
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Running "Windows Emulation" headless ... possible?
Message-ID:  <200706021103.l52B3bvb021568@pluto.hedeland.org>
In-Reply-To: <20070601225443.GA1636@mail.scottro.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Scott Robbins <scottro@nyc.rr.com> wrote:
>
>On Fri, Jun 01, 2007 at 11:31:47PM +0200, Per Hedeland wrote:
>> Scott Robbins <scottro@nyc.rr.com> wrote:
>> 
>> >  Some of the things I mention in CURRENT are definitely only
>> >workable in CURRENT, at this point. 
>> 
>> Could you be specific?
>
>Sorry, I meant giving the IP address to the bridge,

Hm? If you mean that it is required to give it an IP address in CURRENT,
that's hardly a feature:-) - and I still believe you're wrong about that
requirement, see below. It's certainly *possible* to do it in 6.x too.

> as well as that
>if_tap, allowing the user to open it.  

$ uname -sr
FreeBSD 6.1-RELEASE
$ sysctl -a | grep tap.user_open
net.link.tap.user_open: 1

It doesn't have tap.up_on_open though, but of course you don't need it
either given the existence of qemu-ifup.

>Yes, the reason it caused me problems turned out to be (I did a bit of
>experimenting when I got home) is because my qemu-ifup script ends with 
>bridge0 addm ${1}.

So does mine - of course, that's the line that is causing the error
message - but it doesn't cause any actual problems.

>So, I can see that, especially since you set it in rc.conf, that you
>don't need to assign the bridge an address--I'm sure you're right if you
>tell me I'm wrong to do so.

There is nothing magic with putting it in rc.conf, just a convenience to
have the rc scripts do the commands for you at boot instead of doing
them manually. However I see now that your "manual" commands are
neglecting to "up" the bridge interface (see also my previous message):

# ifconfig bridge2 create
# ifconfig bridge2 addm bge0
# ifconfig bridge2
bridge2: flags=8002<BROADCAST,MULTICAST> mtu 1500
        ether ac:de:48:6d:e2:e9
        priority 32768 hellotime 2 fwddelay 15 maxage 20
        member: bge0 flags=3<LEARNING,DISCOVER>

# ifconfig bridge2 deletem bge0
# ifconfig bridge2 addm bge0 up
# ifconfig bridge2
bridge2: flags=8043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        ether ac:de:48:6d:e2:e9
        priority 32768 hellotime 2 fwddelay 15 maxage 20
        member: bge0 flags=3<LEARNING,DISCOVER>

I.e. change your 'ifconfig bridge0 addm vr0' to 'ifconfig bridge0 addm
vr0 up' and it should work. Or you can just do 'ifconfig bridge0 up' at
any time. When you put

ifconfig_bridge0="addm vr0"

in rc.conf, the rc scripts will actually execute that 'ifconfig bridge0
addm vr0 up' - and when you use ifconfig to configure an IP address on
an interface, it will silently do the "up" for you.

--Per Hedeland



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706021103.l52B3bvb021568>