Re: Upgrading to r297291 LAGG(4) stops working.

From: Sergey Kandaurov <pluknet_at_gmail.com>
Date: Mon, 7 Sep 2015 15:24:51 +0300
On 4 September 2015 at 17:06, Gleb Smirnoff <glebius_at_freebsd.org> wrote:
> On Fri, Sep 04, 2015 at 04:39:22PM +0300, Sergey Kandaurov wrote:
> S> On 1 September 2015 at 04:47, John Baldwin <jhb_at_freebsd.org> 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)
_at__at_ -3671,43 +3671,53 _at__at_
       security reasons, while maintaining the ability to transfer
       data over the wireless connection.</para>

-    <para>This is achieved by overriding the physical wireless
+    <para>This is achieved by overriding the physical Ethernet
       interface's <acronym>MAC</acronym> address with that of the
-      Ethernet interface.</para>
+      wireless interface.</para>

     <para>In this example, the Ethernet interface,
       <replaceable>bge0</replaceable>, is the master and the
-      wireless interface, <replaceable>wlan0</replaceable>, is
-      the failover.  The <replaceable>wlan0</replaceable> device
+      wireless interface, <replaceable>wlan0</replaceable>, which
       was created from <replaceable>iwn0</replaceable> wireless
-      interface, which will be configured with the
-      <acronym>MAC</acronym> address of the Ethernet interface.
-      First, determine the <acronym>MAC</acronym> address of the
-      Ethernet interface:</para>
+      interface is the failover.  The <replaceable>bge0</replaceable>
+      interface will be configured with the
+      <acronym>MAC</acronym> address of the WLAN interface.
+      Replace the names of the network interfaces to match
+      the local configuration.</para>

-    <screen>&prompt.root; <userinput>ifconfig
<replaceable>bge0</replaceable></userinput>
-bge0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric
0 mtu 1500
-    options=19b&lt;RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4&gt;
+    <para>First, bring the wireless interface up, but do not set
+      an <acronym>IP</acronym> address:</para>
+
+    <screen>&prompt.root; <userinput>ifconfig
<replaceable>wlan0</replaceable> create wlandev
<replaceable>iwn0</replaceable> ssid
<replaceable>my_router</replaceable> up</userinput></screen>
+
+    <para>Determine the <acronym>MAC</acronym> address of the
+      WLAN interface.</para>
+
+    <screen>&prompt.root; <userinput>ifconfig
<replaceable>wlan0</replaceable></userinput>
+wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt;
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&lt;PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL&gt;
-    media: Ethernet autoselect (1000baseT &lt;full-duplex&gt;)
-    status: active</screen>
+    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</screen>

-    <para>Replace <replaceable>bge0</replaceable> to match the
-      system's Ethernet interface name.  The
-      <literal>ether</literal> line will contain the
-      <acronym>MAC</acronym> address of the specified interface.
-      Now, change the <acronym>MAC</acronym> address of the
-      underlying wireless interface:</para>
+    <para>The <literal>ether</literal> line will contain the
+      <acronym>MAC</acronym> address of the specified
+      interface.</para>

-    <screen>&prompt.root; <userinput>ifconfig
<replaceable>iwn0</replaceable> ether
<replaceable>00:21:70:da:ae:37</replaceable></userinput></screen>
-
-    <para>Bring the wireless interface up, but do not set an
+    <para>Bring the Ethernet interface up, but do not set an
       <acronym>IP</acronym> address:</para>

-    <screen>&prompt.root; <userinput>ifconfig
<replaceable>wlan0</replaceable> create wlandev
<replaceable>iwn0</replaceable> ssid
<replaceable>my_router</replaceable> up</userinput></screen>
+    <screen>&prompt.root; <userinput>ifconfig
<replaceable>bge0</replaceable> up</userinput></screen>

+    <para>Now, change the <acronym>MAC</acronym> address of the
+      Ethernet interface:</para>
+
+    <screen>&prompt.root; <userinput>ifconfig
<replaceable>bge0</replaceable> ether
<replaceable>00:21:70:da:ae:37</replaceable></userinput></screen>
+
     <para>Make sure the <replaceable>bge0</replaceable> interface
       is up, then create the &man.lagg.4; interface with
       <replaceable>bge0</replaceable> as master with failover to
_at__at_ -3739,8 +3749,7 _at__at_
       following entries to
       <filename>/etc/rc.conf</filename>:</para>

-    <programlisting>ifconfig_bge0="up"
-ifconfig_<replaceable>iwn0</replaceable>="<replaceable>ether
00:21:70:da:ae:37</replaceable>"
+    <programlisting>ifconfig_bge0="<replaceable>ether
00:21:70:da:ae:37</replaceable> up"
 wlans_<replaceable>iwn0</replaceable>="wlan0"
 ifconfig_wlan0="WPA"
 cloned_interfaces="<literal>lagg<replaceable>0</replaceable></literal>"

-- 
wbr,
pluknet
Received on Mon Sep 07 2015 - 10:24:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:59 UTC