요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
==========
batman-adv
==========
Batman advanced is a new approach to wireless networking which does no longer
operate on the IP basis. Unlike the batman daemon, which exchanges information
using UDP packets and sets routing tables, batman-advanced operates on ISO/OSI
Layer 2 only and uses and routes (or better: bridges) Ethernet Frames. It
emulates a virtual network switch of all nodes participating. Therefore all
nodes appear to be link local, thus all higher operating protocols won't be
affected by any changes within the network. You can run almost any protocol
above batman advanced, prominent examples are: IPv4, IPv6, DHCP, IPX.
Batman advanced was implemented as a Linux kernel driver to reduce the overhead
to a minimum. It does not depend on any (other) network driver, and can be used
on wifi as well as ethernet lan, vpn, etc ... (anything with ethernet-style
layer 2).
Configuration
=============
Load the batman-adv module into your kernel::
$ insmod batman-adv.ko
The module is now waiting for activation. You must add some interfaces on which
batman-adv can operate. The batman-adv mesh-interface can be created using the
iproute2 tool ``ip``::
$ ip link add name bat0 type batadv
To activate a given interface simply attach it to the ``bat0`` interface::
$ ip link set dev eth0 master bat0
Repeat this step for all interfaces you wish to add. Now batman-adv starts
using/broadcasting on this/these interface(s).
To deactivate an interface you have to detach it from the "bat0" interface::
$ ip link set dev eth0 nomaster
The same can also be done using the batctl interface subcommand::
batctl -m bat0 interface create
batctl -m bat0 interface add -M eth0
To detach eth0 and destroy bat0::
batctl -m bat0 interface del -M eth0
batctl -m bat0 interface destroy
There are additional settings for each batadv mesh interface, vlan and hardif
which can be modified using batctl. Detailed information about this can be found
in its manual.
For instance, you can check the current originator interval (value
in milliseconds which determines how often batman-adv sends its broadcast
packets)::
$ batctl -M bat0 orig_interval
1000
and also change its value::
$ batctl -M bat0 orig_interval 3000
In very mobile scenarios, you might want to adjust the originator interval to a
lower value. This will make the mesh more responsive to topology changes, but
will also increase the overhead.
Information about the current state can be accessed via the batadv generic
netlink family. batctl provides a human readable version via its debug tables
subcommands.
Usage
=====
To make use of your newly created mesh, batman advanced provides a new
interface "bat0" which you should use from this point on. All interfaces added
to batman advanced are not relevant any longer because batman handles them for
you. Basically, one "hands over" the data by using the batman interface and
batman will make sure it reaches its destination.
The "bat0" interface can be used like any other regular interface. It needs an
IP address which can be either statically configured or dynamically (by using
DHCP or similar services)::
NodeA: ip link set up dev bat0
NodeA: ip addr add 192.168.0.1/24 dev bat0
NodeB: ip link set up dev bat0
NodeB: ip addr add 192.168.0.2/24 dev bat0
NodeB: ping 192.168.0.1
Note: In order to avoid problems remove all IP addresses previously assigned to
interfaces now used by batman advanced, e.g.::
$ ip addr flush dev eth0
Logging/Debugging
=================
All error messages, warnings and information messages are sent to the kernel
log. Depending on your operating system distribution this can be read in one of
a number of ways. Try using the commands: ``dmesg``, ``logread``, or looking in
the files ``/var/log/kern.log`` or ``/var/log/syslog``. All batman-adv messages
are prefixed with "batman-adv:" So to see just these messages try::
$ dmesg | grep batman-adv
When investigating problems with your mesh network, it is sometimes necessary to
see more detailed debug messages. This must be enabled when compiling the
batman-adv module. When building batman-adv as part of the kernel, use "make
menuconfig" and enable the option ``B.A.T.M.A.N. debugging``
(``CONFIG_BATMAN_ADV_DEBUG=y``).
Those additional debug messages can be accessed using the perf infrastructure::
$ trace-cmd stream -e batadv:batadv_dbg
The additional debug output is by default disabled. It can be enabled during
run time::
$ batctl -m bat0 loglevel routes tt
will enable debug messages for when routes and translation table entries change.
Counters for different types of packets entering and leaving the batman-adv
module are available through ethtool::
$ ethtool --statistics bat0
batctl
======
As batman advanced operates on layer 2, all hosts participating in the virtual
switch are completely transparent for all protocols above layer 2. Therefore
the common diagnosis tools do not work as expected. To overcome these problems,
batctl was created. At the moment the batctl contains ping, traceroute, tcpdump
and interfaces to the kernel module settings.
For more information, please see the manpage (``man batctl``).
batctl is available on https://www.open-mesh.org/
Contact
=======
Please send us comments, experiences, questions, anything :)
IRC:
#batadv on ircs://irc.hackint.org/
Mailing-list:
[email protected] (optional subscription at
https://lists.open-mesh.org/mailman3/postorius/lists/b.a.t.m.a.n.lists.open-mesh.org/)
You can also contact the Authors:
* Marek Lindner <[email protected]>
* Simon Wunderlich <[email protected]>
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Layer 2 mesh 개요
1-20`.. SPDX-License-Identifier: GPL-2.0`
batman-adv
Batman advanced는 IP를 기반으로 동작하지 않는 wireless networking 접근법입니다. UDP packet으로 정보를 교환하고 routing table을 설정하는 batman daemon과 달리, batman-advanced는 ISO/OSI Layer 2에서만 동작하며 Ethernet frame을 route하기보다 bridge합니다.
참여하는 모든 node를 하나의 virtual network switch처럼 보이게 하므로 모든 node가 link-local로 나타납니다. Network 내부 변경은 상위 protocol에 영향을 주지 않으며 IPv4, IPv6, DHCP, IPX를 비롯해 거의 모든 protocol을 그 위에서 실행할 수 있습니다.
Batman advanced는 overhead를 최소화하려고 Linux kernel driver로 구현되었습니다. 다른 network driver에 의존하지 않으며 Ethernet 방식 Layer 2를 제공하는 Wi-Fi, Ethernet LAN, VPN 등에서 사용할 수 있습니다.
.. SPDX-License-Identifier: GPL-2.0
==========
batman-adv
==========
Batman advanced is a new approach to wireless networking which does no longer
operate on the IP basis. Unlike the batman daemon, which exchanges information
using UDP packets and sets routing tables, batman-advanced operates on ISO/OSI
Layer 2 only and uses and routes (or better: bridges) Ethernet Frames. It
emulates a virtual network switch of all nodes participating. Therefore all
nodes appear to be link local, thus all higher operating protocols won't be
affected by any changes within the network. You can run almost any protocol
above batman advanced, prominent examples are: IPv4, IPv6, DHCP, IPX.
Batman advanced was implemented as a Linux kernel driver to reduce the overhead
to a minimum. It does not depend on any (other) network driver, and can be used
on wifi as well as ethernet lan, vpn, etc ... (anything with ethernet-style
layer 2).
Mesh interface 구성
21-79구성
`insmod batman-adv.ko`로 module을 kernel에 load합니다. Module은 activation을 기다리며, batman-adv가 동작할 interface를 추가해야 합니다.
Iproute2의 `ip`로 `ip link add name bat0 type batadv`를 실행해 mesh interface `bat0`를 만듭니다. 특정 interface를 활성화하려면 `ip link set dev eth0 master bat0`로 `bat0`에 attach하고, 추가할 모든 interface에 반복합니다. 그러면 batman-adv가 해당 interface에서 사용·broadcast를 시작합니다.
비활성화는 `ip link set dev eth0 nomaster`로 `bat0`에서 분리합니다. 같은 작업을 batctl로 하려면 `batctl -m bat0 interface create`, `batctl -m bat0 interface add -M eth0`을 사용합니다. `eth0` 분리와 `bat0` 제거는 각각 `interface del -M eth0`, `interface destroy`입니다.
각 batadv mesh interface, VLAN, hard interface에는 batctl로 수정할 수 있는 추가 설정이 있으며 자세한 정보는 batctl manual에 있습니다.
`batctl -M bat0 orig_interval`은 batman-adv가 broadcast packet을 보내는 주기를 millisecond 단위로 확인하며 예시 값은 1000입니다. `batctl -M bat0 orig_interval 3000`처럼 변경합니다.
이동성이 매우 높은 환경에서는 originator interval을 더 낮춰 topology 변화에 빠르게 반응하게 할 수 있지만 overhead가 증가합니다.
현재 상태는 batadv generic netlink family로 접근할 수 있고, batctl의 debug table subcommand가 사람이 읽기 쉬운 형태로 제공합니다.
Configuration
=============
Load the batman-adv module into your kernel::
$ insmod batman-adv.ko
The module is now waiting for activation. You must add some interfaces on which
batman-adv can operate. The batman-adv mesh-interface can be created using the
iproute2 tool ``ip``::
$ ip link add name bat0 type batadv
To activate a given interface simply attach it to the ``bat0`` interface::
$ ip link set dev eth0 master bat0
Repeat this step for all interfaces you wish to add. Now batman-adv starts
using/broadcasting on this/these interface(s).
To deactivate an interface you have to detach it from the "bat0" interface::
$ ip link set dev eth0 nomaster
The same can also be done using the batctl interface subcommand::
batctl -m bat0 interface create
batctl -m bat0 interface add -M eth0
To detach eth0 and destroy bat0::
batctl -m bat0 interface del -M eth0
batctl -m bat0 interface destroy
There are additional settings for each batadv mesh interface, vlan and hardif
which can be modified using batctl. Detailed information about this can be found
in its manual.
For instance, you can check the current originator interval (value
in milliseconds which determines how often batman-adv sends its broadcast
packets)::
$ batctl -M bat0 orig_interval
1000
and also change its value::
$ batctl -M bat0 orig_interval 3000
In very mobile scenarios, you might want to adjust the originator interval to a
lower value. This will make the mesh more responsive to topology changes, but
will also increase the overhead.
Information about the current state can be accessed via the batadv generic
netlink family. batctl provides a human readable version via its debug tables
subcommands.
bat0 사용
80-105사용
새 mesh를 사용하려면 이후부터 batman advanced가 제공하는 `bat0` interface를 사용합니다. Batman advanced에 추가한 lower interface는 batman이 대신 관리하므로 상위 구성에서 직접 다루지 않습니다. Data를 batman interface에 넘기면 batman이 목적지까지 전달합니다.
`bat0`는 일반 interface처럼 사용하며 static address 또는 DHCP 같은 service로 동적 IP address를 설정합니다. 예시는 NodeA의 `bat0`에 `192.168.0.1/24`, NodeB에 `192.168.0.2/24`를 설정한 뒤 NodeB에서 NodeA를 ping합니다.
문제를 피하려면 이제 batman advanced가 사용하는 lower interface에 이전에 할당한 IP address를 모두 제거해야 합니다. 예: `ip addr flush dev eth0`.
Usage
=====
To make use of your newly created mesh, batman advanced provides a new
interface "bat0" which you should use from this point on. All interfaces added
to batman advanced are not relevant any longer because batman handles them for
you. Basically, one "hands over" the data by using the batman interface and
batman will make sure it reaches its destination.
The "bat0" interface can be used like any other regular interface. It needs an
IP address which can be either statically configured or dynamically (by using
DHCP or similar services)::
NodeA: ip link set up dev bat0
NodeA: ip addr add 192.168.0.1/24 dev bat0
NodeB: ip link set up dev bat0
NodeB: ip addr add 192.168.0.2/24 dev bat0
NodeB: ping 192.168.0.1
Note: In order to avoid problems remove all IP addresses previously assigned to
interfaces now used by batman advanced, e.g.::
$ ip addr flush dev eth0
Logging·debugging
106-139Logging·Debugging
모든 error, warning, information message는 kernel log로 전송됩니다. Distribution에 따라 `dmesg`, `logread`, `/var/log/kern.log`, `/var/log/syslog`에서 읽습니다. Batman-adv message에는 `batman-adv:` prefix가 붙으므로 `dmesg | grep batman-adv`로 걸러낼 수 있습니다.
Mesh 문제를 조사하며 더 자세한 debug message가 필요하면 module compile 시 이를 켜야 합니다. Kernel 일부로 build할 때 `make menuconfig`에서 `B.A.T.M.A.N. debugging` 즉 `CONFIG_BATMAN_ADV_DEBUG=y`를 활성화합니다.
추가 debug message는 perf infrastructure를 통해 `trace-cmd stream -e batadv:batadv_dbg`로 읽습니다.
추가 debug 출력은 기본적으로 꺼져 있습니다. Runtime에 `batctl -m bat0 loglevel routes tt`를 실행하면 route와 translation table entry가 바뀔 때의 debug message를 활성화합니다.
Batman-adv module로 들어오고 나가는 packet 종류별 counter는 `ethtool --statistics bat0`에서 확인할 수 있습니다.
Logging/Debugging
=================
All error messages, warnings and information messages are sent to the kernel
log. Depending on your operating system distribution this can be read in one of
a number of ways. Try using the commands: ``dmesg``, ``logread``, or looking in
the files ``/var/log/kern.log`` or ``/var/log/syslog``. All batman-adv messages
are prefixed with "batman-adv:" So to see just these messages try::
$ dmesg | grep batman-adv
When investigating problems with your mesh network, it is sometimes necessary to
see more detailed debug messages. This must be enabled when compiling the
batman-adv module. When building batman-adv as part of the kernel, use "make
menuconfig" and enable the option ``B.A.T.M.A.N. debugging``
(``CONFIG_BATMAN_ADV_DEBUG=y``).
Those additional debug messages can be accessed using the perf infrastructure::
$ trace-cmd stream -e batadv:batadv_dbg
The additional debug output is by default disabled. It can be enabled during
run time::
$ batctl -m bat0 loglevel routes tt
will enable debug messages for when routes and translation table entries change.
Counters for different types of packets entering and leaving the batman-adv
module are available through ethtool::
$ ethtool --statistics bat0
batctl과 연락처
140-168batctl
Batman advanced는 Layer 2에서 동작하므로 virtual switch에 참여한 모든 host가 Layer 2 위 protocol에는 완전히 투명합니다. 이 때문에 일반 진단 tool이 기대대로 작동하지 않을 수 있어 batctl이 만들어졌습니다.
Batctl은 ping, traceroute, tcpdump와 kernel module 설정 interface를 제공합니다. 자세한 정보는 `man batctl`을 보십시오. 문서에 기록된 배포 주소는 `https://www.open-mesh.org/`입니다.
연락처
의견, 사용 경험, 질문 등 무엇이든 보내 달라고 요청합니다. IRC는 `#batadv` on `ircs://irc.hackint.org/`, mailing list는 `[email protected]`이며 선택적 구독 page 주소도 원문에 보존되어 있습니다.
작성자 연락처는 Marek Lindner `<[email protected]>`와 Simon Wunderlich `<[email protected]>`입니다.
batctl
======
As batman advanced operates on layer 2, all hosts participating in the virtual
switch are completely transparent for all protocols above layer 2. Therefore
the common diagnosis tools do not work as expected. To overcome these problems,
batctl was created. At the moment the batctl contains ping, traceroute, tcpdump
and interfaces to the kernel module settings.
For more information, please see the manpage (``man batctl``).
batctl is available on https://www.open-mesh.org/
Contact
=======
Please send us comments, experiences, questions, anything :)
IRC:
#batadv on ircs://irc.hackint.org/
Mailing-list:
[email protected] (optional subscription at
https://lists.open-mesh.org/mailman3/postorius/lists/b.a.t.m.a.n.lists.open-mesh.org/)
You can also contact the Authors:
* Marek Lindner <[email protected]>
* Simon Wunderlich <[email protected]>
요약·해설
batman-adv.rst:1-168batman-adv는 여러 lower interface를 하나의 `bat0` Layer 2 mesh switch로 묶습니다. IP 설정은 lower interface가 아니라 `bat0`에 두며, topology 변화 감도와 overhead는 originator interval로 조절합니다.
여러 Ethernet-style link가 하나의 virtual switch interface로 합쳐집니다.
iproute2와 batctl의 대응 작업을 정리합니다.
originator interval을 줄이면 변화 감지는 빨라지지만 broadcast 비용이 증가합니다.
문제 유형에 따라 확인할 도구를 고릅니다.
상위 stack은 lower interface 대신 bat0에 data를 넘깁니다.