-
I need to create a common Linux bridge type device to attach to multiple virtual Ethernet interfaces for multiple running instances of a Native POSIX Zephyr application. This is for an application that has 2 POSIX virtual Ethernet interfaces. Notionally, this common "bus" represents and over the air simulation of a digital RF channel, where the primary Ethernet interface is the wired input, and the secondary Ethernet interface is the common wireless bus. This is for an IPv4 network only. The firewall is disabled. My 1st attempt is using the Linux bridge control and slaving a pair of secondary Ethernet interfaces of multiple Zephyr instances. Notionally, the number of nodes on the common bridge will be many. Each running Zephyr application uses a different prefix for the Ethernet interface (e.g. for 3 node network: zeth1.1, zeth2.1, zeth3.1 represent the RF channel to be on a common bus, and zeth1.0, zeth2.0, and zeth3.0 are for the wired interfaces, which are on individual IP subnets and routes and not shared on the network between other primary interfaces). The host side bridge setup occurs prior to the Zephyr instances being executed so that the host side TAP interfaces should be present. A 2-node example set of commands to establish the Linux bridge are as follows:
I am configuring the TAP interfaces on the Ubuntu host such that the slaved interfaces do not have any assigned IP/subnets/broadcast addresses, while an IP is assigned to the common bridge zeth-br as 138.0.0.200. Each node will transmit on the common OTA channel with a source IP of 138.0.0.[n] where n is the base 1 node number. My testing results are not good, and while I see packets via Wireshark/Tshark on a slaved virtual Ethernet interfaces, these packet are not viewed on the common interface bridge zeth-br, and hence not received by other network nodes on the zeth-br bridged network. Also, the IP stack seems to run slower over time, PING times from the host to the wired interface (e.g. zeth1.0) increases, and at some point, no ICMP responses are generated from the application. Anybody have any success attempting to do this, that is a create a common IP bus/bridge joining together a number of virtual Ethernet interfaces using Native-POSIX emulation? I have tried quite a few different destination IPs for packets transmitted out of the secondary Ethernet interfaces (zeth1.1, zeth2.1 and zeth3.1) - unicast, multicast, and broadcast - but the packets never appear on the bridge 'zeth-br'. I did notice that the MAC address of the bridge does match that of the 1st interface added, but this appears to be similar to the test results of other working bridge implementations, where I assume the bridge will take on some of the attributes of the first interface added to it. Any thoughts on this would be most appreciated.
When using the broadcast destination IP, the traffic originates from one Zephyr node (e.g. zeth1.1) with a source IP of 138.0.0.1 to the broadcast destination 138.0.0.255 using a broadcast destination MAC address. The following is a dump of the tx output from interface zeth1.1 using the TShark application.
Bridge host setup script for two nodes is as follows:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I now have this working. What appears to have been missing is some bridge net filtering that was solved by adding the following to the configuration script.
|
Beta Was this translation helpful? Give feedback.
I now have this working. What appears to have been missing is some bridge net filtering that was solved by adding the following to the configuration script.