Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Using a network bridge
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Using a network bridge
  • SDP: 6.5.0
  • Target: Any supported target
________________________________________________________________________

Recommendation
________________________________________________________________________

A bridge merges two or more layer 2 networks together. For example let's say you have 3 computers, comp0, comp1, and comp2, where comp0 has at least two network interfaces and will act as a bridge and comp1 and comp2 have at least one network interface and each will act as nodes on a layer 2 network.

As we are merging two layer 2 networks together (for example, comp1 is physically connected to an interface of comp0 and comp2 is also physically connected to an interface on comp0) it is important to ensure comp1 and comp2 are on the same layer 3 network so they can ARP each other, otherwise static routes will need to be set on both nodes to enable communication between the different layer 3 networks. Additionally at most one interface in the bridge (comp0) will need to be in the same layer 3 network as comp1 and comp2. If more than one interface on the bridge is on the same network while there will be routing table entries that match both interfaces one of those interfaces will never end up getting used since the other one matches first. The remaining interface in the bridge (at least in this scenario where there are only two, can be configured with a 0 address - ifconfig <iface> 0.0.0.0 - which will create a generic route so applications on comp0 can receive and process requests coming from either interface in the bridge). The remaining interface on comp0 doesn't have to be configured but has to be enabled for routing over the bridge to work (if the interface is down, routing will not occur over the bridge).

With these considerations it should now be possible to configure a bridge that allows, for example, multicast UDP from comp1 or from comp2 (two distinct layer 2 networks) to be received and processed by the bridge (comp0). I summarize below the configuration:

comp0 (at least two interfaces):
ifconfig <iface1> 192.167.2.1 up
ifconfig <iface2> 0.0.0.0 up
ifconfig bridge0 create
brconfig add <iface1> add <iface2> up

comp1 (at least one interface):
ifconfig <iface1> 192.167.2.11 up

comp2 (at least one interface):
ifconfig <iface1> 192.167.2.12 up

Test:
From comp1 ping comp0 then comp2:
ping -c3 192.167.2.1
ping -c3 192.167.2.12

From comp2 ping comp0 then comp1:
ping -c3 192.167.2.1
ping -c3 192.167.2.11

From comp0 ping comp1 then comp2:
ping -c3 192.167.2.11
ping -c3 192.167.2.12

If pinging works in all four directions this confirms that layers 2 and 3 are working via the bridge.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.