From owner-freebsd-current@freebsd.org Mon Sep 7 12:24:52 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA57A9CC64C for ; Mon, 7 Sep 2015 12:24:52 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qk0-x242.google.com (mail-qk0-x242.google.com [IPv6:2607:f8b0:400d:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95BB21442; Mon, 7 Sep 2015 12:24:52 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by qkfj65 with SMTP id j65so3962924qkf.3; Mon, 07 Sep 2015 05:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gT0repWjX/6J9vJEP8HIW2Hffksg5uVqQGOKXwwFKY4=; b=KVikWTKg2lcdDZ40/+gKnG+byHcXIQESlCD2KlUxqEHj3CTuCoAryt0XpxuZso9WDT f8biZl1tpiKdvGjnWkzysAAf4D1fjx+MwUxpGRcL5ioa0f/OdoZLO/PHsErY1bORQtwj QImJj3KKK3YeSmB56TyTqVQVf+agf1IANHmw1rKOwsZUpmvCcr8ttryUOpnujseChCU/ VlKOzY3kp+Rdtr0tCo7HctCHQ3PodWgzSpCWOqfSztvwX/1IeBO16uPGAhBZ2dswM2aS 1S7FJcIJOoAR9nrRmJ1BdI5bP/0LZFwfiavvMlEiaXaF1pJ7PXgYpBmujkR7VJMvax10 GXPQ== MIME-Version: 1.0 X-Received: by 10.55.33.74 with SMTP id h71mr26305601qkh.71.1441628691716; Mon, 07 Sep 2015 05:24:51 -0700 (PDT) Received: by 10.140.44.73 with HTTP; Mon, 7 Sep 2015 05:24:51 -0700 (PDT) In-Reply-To: <20150904140608.GZ1023@glebius.int.ru> References: <4074787.MD5UFHZJLz@ralph.baldwin.cx> <20150904140608.GZ1023@glebius.int.ru> Date: Mon, 7 Sep 2015 15:24:51 +0300 Message-ID: Subject: Re: Upgrading to r297291 LAGG(4) stops working. From: Sergey Kandaurov To: Gleb Smirnoff Cc: John Baldwin , FreeBSD Current , Adrian Chadd , "Ranjan1018 ." <214748mv@gmail.com> Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2015 12:24:52 -0000 On 4 September 2015 at 17:06, Gleb Smirnoff wrote: > On Fri, Sep 04, 2015 at 04:39:22PM +0300, Sergey Kandaurov wrote: > S> On 1 September 2015 at 04:47, John Baldwin wrote: > S> > On Monday, August 31, 2015 09:58:45 AM Adrian Chadd wrote: > S> >> Hi, > S> >> > S> >> +glebius, as he recently messed around with the wifi stack and his > S> >> changes may have broken how mac addresses are assigned to the > S> >> hardware. > S> > > S> > Glebius did break this, though not because of what you say. It's broken > S> > because the 'ifconfig_ath0' line that sets the mac address no longer > S> > does anything because 'ath0' is no longer an interface (and so that > S> > line is now ignored, plus it wouldn't work if it were passed to ifconfig > S> > now anyway). > S> > > S> > At the very least the Handbook section on this needs to be updated to give > S> > working instructions for both HEAD and stable branches. > S> > S> What about this change? > S> It should work in both current and stable (not tested, though). > > AFAIU, Adrian suggests to better change MAC of Ethernet device, rather > than WiFi one. Not all WiFi drivers support change of MAC. Of course, you're correct. Unfortunately this required more changes, mostly words permutation. Index: en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml =================================================================== --- en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml (revision 47311) +++ en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml (working copy) @@ -3671,43 +3671,53 @@ security reasons, while maintaining the ability to transfer data over the wireless connection. - This is achieved by overriding the physical wireless + This is achieved by overriding the physical Ethernet interface's MAC address with that of the - Ethernet interface. + wireless interface. In this example, the Ethernet interface, bge0, is the master and the - wireless interface, wlan0, is - the failover. The wlan0 device + wireless interface, wlan0, which was created from iwn0 wireless - interface, which will be configured with the - MAC address of the Ethernet interface. - First, determine the MAC address of the - Ethernet interface: + interface is the failover. The bge0 + interface will be configured with the + MAC address of the WLAN interface. + Replace the names of the network interfaces to match + the local configuration. - &prompt.root; ifconfig bge0 -bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 - options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4> + First, bring the wireless interface up, but do not set + an IP address: + + &prompt.root; ifconfig wlan0 create wlandev iwn0 ssid my_router up + + Determine the MAC address of the + WLAN interface. + + &prompt.root; ifconfig wlan0 +wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 00:21:70:da:ae:37 - inet6 fe80::221:70ff:feda:ae37%bge0 prefixlen 64 scopeid 0x2 - nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> - media: Ethernet autoselect (1000baseT <full-duplex>) - status: active + media: IEEE 802.11 Wireless Ethernet DS/11Mbps mode 11g + status: associated + ssid my_router channel 1 (2412 Mhz 11g) bssid 00:11:95:c3:0d:ac + country US ecm authmode WPA2/802.11i privacy ON deftxkey UNDEF + AES-CCM 3:128-bit txpower 21.5 bmiss 7 scanvalid 450 bgscan + bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS + wme burst roaming MANUAL - Replace bge0 to match the - system's Ethernet interface name. The - ether line will contain the - MAC address of the specified interface. - Now, change the MAC address of the - underlying wireless interface: + The ether line will contain the + MAC address of the specified + interface. - &prompt.root; ifconfig iwn0 ether 00:21:70:da:ae:37 - - Bring the wireless interface up, but do not set an + Bring the Ethernet interface up, but do not set an IP address: - &prompt.root; ifconfig wlan0 create wlandev iwn0 ssid my_router up + &prompt.root; ifconfig bge0 up + Now, change the MAC address of the + Ethernet interface: + + &prompt.root; ifconfig bge0 ether 00:21:70:da:ae:37 + Make sure the bge0 interface is up, then create the &man.lagg.4; interface with bge0 as master with failover to @@ -3739,8 +3749,7 @@ following entries to /etc/rc.conf: - ifconfig_bge0="up" -ifconfig_iwn0="ether 00:21:70:da:ae:37" + ifconfig_bge0="ether 00:21:70:da:ae:37 up" wlans_iwn0="wlan0" ifconfig_wlan0="WPA" cloned_interfaces="lagg0" -- wbr, pluknet