From vanhu@zeninc.net  Mon May 26 15:32:19 2008
Return-Path: <vanhu@zeninc.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 794AC1065677
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 May 2008 15:32:19 +0000 (UTC)
	(envelope-from vanhu@zeninc.net)
Received: from smtp.zeninc.net (smtp.zeninc.net [80.67.176.25])
	by mx1.freebsd.org (Postfix) with ESMTP id 05B0E8FC4A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 May 2008 15:32:18 +0000 (UTC)
	(envelope-from vanhu@zeninc.net)
Received: from sangoku.zen.inc (sangoku.zen.inc [192.168.1.10])
	by smtp.zeninc.net (smtpd) with ESMTP id CD9D43F78
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 May 2008 17:05:05 +0200 (CEST)
Received: by sangoku.zen.inc (Postfix, from userid 1000)
	id 0CBC6453F8; Mon, 26 May 2008 17:05:03 +0200 (CEST)
Message-Id: <20080526150503.0CBC6453F8@sangoku.zen.inc>
Date: Mon, 26 May 2008 17:05:03 +0200 (CEST)
From: VANHULLEBUS Yvan <vanhu_bsd@zeninc.net>
Reply-To: VANHULLEBUS Yvan <vanhu_bsd@zeninc.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Cannot assign both an IP and a MAC address to a bridge in one command
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         124004
>Category:       bin
>Synopsis:       ifconfig(8): Cannot assign both an IP and a MAC address to a bridge in one command
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vwe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 26 15:40:00 UTC 2008
>Closed-Date:    Mon Oct 27 21:57:34 UTC 2008
>Last-Modified:  Mon Oct 27 21:57:34 UTC 2008
>Originator:     VANHULLEBUS Yvan
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD sangoku.zen.inc 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue May 20 21:10:03 CEST 2008 root@sangoku.zen.inc:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:

I want to create, at boot time, a bridge with a fixed IP address (doesn't
change anything if I try DHCP) and a fixed MAC address (as I have an arp
watcher running on my network).

If I try to do that manually, it works:
shagshag# ifconfig bridge0 create
bridge0: Ethernet address: 8a:55:e7:96:89:b8
shagshag# ifconfig bridge0 ether 00:00:24:c8:e2:28
shagshag# ifconfig bridge0 addm vr0 addm vr1
shagshag# ifconfig bridge0 inet 192.168.1.201/24
shagshag# ifconfig bridge0
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:00:24:c8:e2:28
        inet 192.168.1.201 netmask 0xffffff00 broadcast 192.168.1.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vr1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
        member: vr0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
shagshag#


But if I want to do it on one single configuration line (what is done
at boot time), I have:

shagshag# ifconfig bridge0 destroy
shagshag# ifconfig bridge0 create
bridge0: Ethernet address: 4a:b5:68:28:39:92
shagshag# ifconfig bridge0 ether 00:00:24:c8:e2:28 addm vr0 addm vr1 inet 192.168.1.201/24
ifconfig: can't set link-level netmask or broadcast
shagshag#

So I tried various things:

shagshag# ifconfig bridge0 destroy
shagshag# ifconfig bridge0 create
bridge0: Ethernet address: 76:8c:99:38:74:5f
shagshag# ifconfig bridge0 ether 00:00:24:c8:e2:28 addm vr0 addm vr1
shagshag# ifconfig bridge0 inet 192.168.1.201/24
shagshag# ifconfig bridge0
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:00:24:c8:e2:28
        inet 192.168.1.201 netmask 0xffffff00 broadcast 192.168.1.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vr1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
        member: vr0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
shagshag#


But:
shagshag# ifconfig bridge0 destroy
shagshag# ifconfig bridge0 create
bridge0: Ethernet address: 4a:b5:68:28:39:92
shagshag# ifconfig bridge0 addm vr0 addm vr1
shagshag# ifconfig bridge0 ether 00:00:24:c8:e2:28 inet 192.168.1.201/24
ifconfig: can't set link-level netmask or broadcast
shagshag#


So the problem is really when I try to add both an INET address (same
problem with DHCP) and a mac address (tried both with "ether" and "link"
keywords, same result) in the same command line.

And this is really a big problem for me, as I want in my rc.conf something like:

ifconfig_bridge0="addm vr0 addm vr1 inet 192.168.1.201/24 link 00:00:24:c8:e2:28"


>How-To-Repeat:

Set up a bridge, then do:
ifconfig bridge0 ether 00:00:24:c8:e2:28 inet 192.168.1.201/24


>Fix:

No patch, sorry.....
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Tue May 27 13:09:08 UTC 2008 
Responsible-Changed-Why:  
Over to maintainers 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124004 
State-Changed-From-To: open->closed 
State-Changed-By: vwe 
State-Changed-When: Mon Oct 27 21:55:23 UTC 2008 
State-Changed-Why:  
DUP of bin/123633 
this issue is not just related to bridge interfaces - this seems to be 
an issue with the ifconfig(8) cli. 
Yvan, if you need to add additional information, please file a followup 
to bin/123633. Thanks! 


Responsible-Changed-From-To: freebsd-net->vwe 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Mon Oct 27 21:55:23 UTC 2008 
Responsible-Changed-Why:  
track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124004 
>Unformatted:
