Kaynağı GitHub'da görüntüleyin |
OpenWeave kullanarak ağlar arası çok noktaya yayın denemesi yapmak istediğinize karar verdiniz. Bu nasıl yapılır kılavuzu, çok noktaya yayın proxy'si ile iki farklı ağda OpenWeave'in Inet katmanını kullanmayı gösteren sanal bir topoloji kurmak için Happy ağ simülasyon aracının kullanımını gösterir.
mcproxy'yi indirin ve oluşturun
IPv6 vekil cini, çok noktaya mcproxy , iki ayrık IPv6 ağ bağlantıları üzerinden proxy / ileri / rota IPv6 çok noktaya trafiğe hizmet vermektedir.
Eğer klonlamak ve inşa nereye özellikle önemli olmasa da mcproxy çalıştırılabilir cini, aşağıda 6. adımda gereklidir için bir akraba veya mutlak yol olarak oluşturun yerin not edin.
git clone https://github.com/mcproxy/mcproxy.git mcproxysudo apt-get install qt5-qmake qt5-defaultcd mcproxy/mcproxyqmakemake
İndirin, oluşturun ve mutlu bir şekilde yükleyin
git clone https://github.com/openweave/happy.git happysudo apt-get install bridge-utils python-lockfile python-psutil python-setuptoolscd happysudo make install
Openweave-core'u indirin ve oluşturun
git clone https://github.com/openweave/openweave-core.git openweave-corecd openweave-core./configuremake
Mutlu topolojiyi oluşturun
Bu çok benzer bir topoloji oluşturur Mutlu Codelab .
happy-network-add ThreadNetwork threadhappy-network-address ThreadNetwork fd00:0000:0000:0006::happy-network-add WiFiNetwork wifihappy-network-address WiFiNetwork fd00:0000:0000:0001::happy-network-address WiFiNetwork 192.168.1.0happy-node-add ThreadNodehappy-node-add WiFiNodehappy-node-add BorderRouterhappy-node-join ThreadNode ThreadNetworkhappy-node-join WiFiNode WiFiNetworkhappy-node-join BorderRouter ThreadNetworkhappy-node-join BorderRouter WiFiNetworkhappy-network-route --prefix fd00:0000:0000:0006:: ThreadNetwork BorderRouterhappy-network-route --prefix fd00:0000:0000:0001:: WiFiNetwork BorderRouterhappy-network-route --prefix 192.168.1.0 WiFiNetwork BorderRouter
Happy topolojisi için mcproxy yapılandırmasını oluşturun
Bu, yukarıda Adım 4'te oluşturduğumuz Happy topolojisinde "wpan0" üzerinde simüle edilmiş "Thread" ağ arayüzü ile "wlan0" üzerinde simüle edilmiş "WiFi" ağ arayüzü arasında bir IPv6 multicast proxy konfigürasyonu oluşturur.
Oluşturduğunuz nerede özellikle önemli olmasa da mcproxy.conf dosyası, kendisine bir akraba veya mutlak yol 6. adımda gerekli olduğu gibi bunu oluşturmak yerin not edin.
cat > mcproxy.conf << EOF
protocol MLDv2;
pinstance myProxy: wpan0 ==> wlan0;
EOF
Gösteriyi çalıştırın
Bu IPv6 çok noktaya yayın vekil çalışır mcproxy sırasıyla "BorderRouter" düğümde ve daha sonra simüle "İplik" ve "Kablosuz" düğümlerde Inet tabaka çoklu fonksiyon testi gönderici ve alıcı başlatır.
İsterseniz gönderici ve alıcı düğümleri transpoze edebilirsiniz ve örnek de aynı şekilde çalışacaktır.
Aşağıdaki komut gruplarının her biri paralel, bağımsız kabuklardan çalıştırılmalıdır.
Sınır yönlendirici
happy-shell BorderRouter<path-to-mcproxy-from-step1>/mcproxy -f <path-to-mcproxy-config-from-step5>/mcproxy.conf
Alıcı
happy-shell WiFiNodeopenweave-core/src/test-apps/TestInetLayerMulticast -6 --udp -I wlan0 -g 5 --group-expected-rx-packets 5 --group-expected-tx-packets 0 -l
Gönderen
happy-shell ThreadNodeopenweave-core/src/test-apps/TestInetLayerMulticast -6 --udp -I wpan0 -g 5 --group-expected-rx-packets 0 --group-expected-tx-packets 5 -L
Çıktı
Gönderen
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.
Alıcı
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.
Kaynağı GitHub'da görüntüleyin