Google is committed to advancing racial equity for Black communities. See how.
Esta página foi traduzida pela API Cloud Translation.
Switch to English

COMO FAZER OpenWeave + Happy Cross Network Multicast Inet Layer

jinja-placeholder-0 .md "> Ver fonte no GitHub

Você decidiu que gostaria de experimentar o multicast entre redes usando o OpenWeave. Este guia de instruções ilustra o uso da ferramenta de simulação de rede Happy para configurar uma topologia virtual que demonstra o uso da camada Inet do OpenWeave em duas redes distintas com um proxy multicast.

Faça o download e construa o mcproxy

O daemon proxy multicast IPv6, mcproxy , serve para proxy / encaminhar / rotear o tráfego multicast IPv6 através de dois links de rede IPv6 separados.

Embora não seja particularmente importante onde você mcproxy e cria o executável mcproxy daemon, observe o local em que você o criou como um caminho relativo ou absoluto para ele, na Etapa 6 abaixo.

 git clone https://github.com/mcproxy/mcproxy.git mcproxy
sudo apt-get install qt5-qmake qt5-default
cd mcproxy/mcproxy
qmake
make

Baixe, construa e instale o Happy

 git clone https://github.com/openweave/happy.git happy
sudo apt-get install bridge-utils python-lockfile python-psutil python-setuptools
cd happy
sudo make install

Faça o download e crie o openweave-core

 git clone https://github.com/openweave/openweave-core.git openweave-core
cd openweave-core
./configure
make

Estabelecer a topologia Feliz

Isso cria uma topologia muito semelhante ao Happy Codelab .

 happy-network-add ThreadNetwork thread
happy-network-address ThreadNetwork fd00:0000:0000:0006::
happy-network-add WiFiNetwork wifi
happy-network-address WiFiNetwork fd00:0000:0000:0001::
happy-network-address WiFiNetwork 192.168.1.0
happy-node-add ThreadNode
happy-node-add WiFiNode
happy-node-add BorderRouter
happy-node-join ThreadNode ThreadNetwork
happy-node-join WiFiNode WiFiNetwork
happy-node-join BorderRouter ThreadNetwork
happy-node-join BorderRouter WiFiNetwork
happy-network-route --prefix fd00:0000:0000:0006:: ThreadNetwork BorderRouter
happy-network-route --prefix fd00:0000:0000:0001:: WiFiNetwork BorderRouter
happy-network-route --prefix 192.168.1.0 WiFiNetwork BorderRouter

Crie a configuração mcproxy para a topologia Happy

Isso cria uma configuração de proxy multicast IPv6 entre a interface de rede "Thread" simulada em "wpan0" e a interface de rede "WiFi" simulada em "wlan0" na topologia Happy que criamos acima na Etapa 4.

Embora não seja particularmente importante onde você cria o arquivo mcproxy.conf , observe o local em que você o criou como um caminho relativo ou absoluto para ele, na Etapa 6.

 cat > mcproxy.conf << EOF
protocol MLDv2;
pinstance myProxy: wpan0 ==> wlan0;
EOF

Execute a demonstração

Isso executa o proxy multicast IPv6, mcproxy , no nó "BorderRouter" e, em seguida, inicia o remetente e o receptor de teste funcional de multicast da camada Inet nos nós "Thread" e "WiFi" simulados, respectivamente.

Se desejar, você pode transpor os nós do remetente e do receptor, e o exemplo funcionará igualmente.

Cada um dos seguintes conjuntos de comandos deve ser executado a partir de shells paralelos e independentes.

Roteador de borda

 happy-shell BorderRouter
<path-to-mcproxy-from-step1> /mcproxy -f <path-to-mcproxy-config-from-step5> /mcproxy.conf

Receiver

 happy-shell WiFiNode
openweave-core/src/test-apps/TestInetLayerMulticast -6 --udp -I wlan0 -g 5 --group-expected-rx-packets 5 --group-expected-tx-packets 0 -l

Remetente

 happy-shell ThreadNode
openweave-core/src/test-apps/TestInetLayerMulticast -6 --udp -I wpan0 -g 5 --group-expected-rx-packets 0 --group-expected-tx-packets 5 -L

Resultado

Remetente

 openweave-core/src/test-apps/TestInetLayerMulticast -6 --udp -I wlan0 -g 5 ... -L
Weave Node ready to service events; PID: 50845; PPID: 46482
Using UDP/IPv6, device interface: wpan0 (w/o LwIP)
Will join multicast group ff15::5
1/5 transmitted for multicast group 5
2/5 transmitted for multicast group 5
3/5 transmitted for multicast group 5
4/5 transmitted for multicast group 5
5/5 transmitted for multicast group 5
Will leave multicast group ff15::5
WEAVE:IN: Async DNS worker thread woke up.
WEAVE:IN: Async DNS worker thread exiting.
WEAVE:IN: Async DNS worker thread woke up.
WEAVE:IN: Async DNS worker thread exiting.

Receiver

 openweave-core/src/test-apps/TestInetLayerMulticast -6 --udp -I wlan0 -g 5 ... -l
Weave Node ready to service events; PID: 50826; PPID: 46499
Using UDP/IPv6, device interface: wlan0 (w/o LwIP)
Will join multicast group ff15::5
Listening...
UDP packet received from fd00::6:8693:b7ff:fe5a:1dc1:4242 to ff15::5:4242 (59 bytes)
1/5 received for multicast group 5
UDP packet received from fd00::6:8693:b7ff:fe5a:1dc1:4242 to ff15::5:4242 (59 bytes)
2/5 received for multicast group 5
UDP packet received from fd00::6:8693:b7ff:fe5a:1dc1:4242 to ff15::5:4242 (59 bytes)
3/5 received for multicast group 5
UDP packet received from fd00::6:8693:b7ff:fe5a:1dc1:4242 to ff15::5:4242 (59 bytes)
4/5 received for multicast group 5
UDP packet received from fd00::6:8693:b7ff:fe5a:1dc1:4242 to ff15::5:4242 (59 bytes)
5/5 received for multicast group 5
Will leave multicast group ff15::5
WEAVE:IN: Async DNS worker thread woke up.
WEAVE:IN: Async DNS worker thread exiting.
WEAVE:IN: Async DNS worker thread woke up.
WEAVE:IN: Async DNS worker thread exiting.