diff options
author | Sven Eckelmann <sven@narfation.org> | 2016-06-10 17:00:56 -0400 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2016-08-09 01:54:26 -0400 |
commit | f2c750fedd2e102b95a3b1008703b9f54bbc9b08 (patch) | |
tree | f680f5b63277dfddd00f5af72f67cfac0db93a07 /Documentation/networking | |
parent | 9791860ce5438da65f4f5c38c282fdc45e30dd97 (diff) |
batman-adv: Use rtnl link in device creation example
The standard kernel API to add new virtual interfaces and attach other
interfaces to it is rtnl-link. batman-adv supports it since v3.10. This
functionality should be used instead of the legacy batman-adv-only sysfs
interface.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'Documentation/networking')
-rw-r--r-- | Documentation/networking/batman-adv.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt index 1b5e7a7f2185..8a8d3d96f6c6 100644 --- a/Documentation/networking/batman-adv.txt +++ b/Documentation/networking/batman-adv.txt | |||
@@ -43,10 +43,15 @@ new interfaces to verify the compatibility. There is no need to | |||
43 | reload the module if you plug your USB wifi adapter into your ma- | 43 | reload the module if you plug your USB wifi adapter into your ma- |
44 | chine after batman advanced was initially loaded. | 44 | chine after batman advanced was initially loaded. |
45 | 45 | ||
46 | To activate a given interface simply write "bat0" into its | 46 | The batman-adv soft-interface can be created using the iproute2 |
47 | "mesh_iface" file inside the batman_adv subfolder: | 47 | tool "ip" |
48 | 48 | ||
49 | # echo bat0 > /sys/class/net/eth0/batman_adv/mesh_iface | 49 | # ip link add name bat0 type batadv |
50 | |||
51 | To activate a given interface simply attach it to the "bat0" | ||
52 | interface | ||
53 | |||
54 | # ip link set dev eth0 master bat0 | ||
50 | 55 | ||
51 | Repeat this step for all interfaces you wish to add. Now batman | 56 | Repeat this step for all interfaces you wish to add. Now batman |
52 | starts using/broadcasting on this/these interface(s). | 57 | starts using/broadcasting on this/these interface(s). |
@@ -56,10 +61,10 @@ By reading the "iface_status" file you can check its status: | |||
56 | # cat /sys/class/net/eth0/batman_adv/iface_status | 61 | # cat /sys/class/net/eth0/batman_adv/iface_status |
57 | # active | 62 | # active |
58 | 63 | ||
59 | To deactivate an interface you have to write "none" into its | 64 | To deactivate an interface you have to detach it from the |
60 | "mesh_iface" file: | 65 | "bat0" interface: |
61 | 66 | ||
62 | # echo none > /sys/class/net/eth0/batman_adv/mesh_iface | 67 | # ip link set dev eth0 nomaster |
63 | 68 | ||
64 | 69 | ||
65 | All mesh wide settings can be found in batman's own interface | 70 | All mesh wide settings can be found in batman's own interface |