Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to understand network bridging (not hardware but software implementation), but get some misunderstanding.

A network bridge connects two parts of a network together. For example my computer is connected to a local network throught eht0 and to the Internet throught wlan0. To share the internet connection in the local network I need to connect wlan0 and eth0 by network bridge. But why my routing table is not giving the same result without network bridge? I have the internet access, hence the routing table contains entries, that all outward packets should be passed through wlan0, hence packets that come from local network as well as generated by me should be passed through wlan0.

  • Where is my mistake?
  • How does network bridge fits in routing table ideology?
share|improve this question

3 Answers 3

up vote 1 down vote accepted

When you bridge two interfaces, they become bonded; anything coming in one is blindly echoed out the other. This allows packets to pass freely. Hubs and switches function as a bridge.

You can still achieve the same effect by routing and forwarding the packets as well. This allows for much more control, as the packets are inspected and filtered, but this comes at the cost of increased processing time. To actually enable routing of incoming packets, you have to enable forwarding in the kernel and add the appropriate firewall rules. The kernel will then attempt to re-route any incoming packets that are not destined for the system itself. This also allows the system to perform network address translation (NAT) if necessary.

So, your mistake is not in the logic, simply that you've not configured your system to re-route/forward incoming packets.

Bridges don't really fit into a routing table ideology, because there is no routing involved with them. A computer on wlan0 will be able to see and talk directly to any computer on eth0. This is different from routing, where while computers on wlan0 can talk to computers on eth0 and vice-versa, they do not do so directly. Instead, the computers talk to the router, and trust the router will send it on to the appropriate destination.

share|improve this answer

Bridging links two parts of a single LAN, each part uses the same IP network address (i.e they are the same IP subnet). If other computers on the eth0 LAN and other computers on the WLAN0 network use the same network address and subnet mask then you do inded need to bridge the two segments. Some desktop operating systems can do this but they need to be configured to forward packets across LAN segments. Bridging is a layer-2 function (it works on MAC addresses)

This is not the same as routing, in routing the computers on the ETH0 LAN would have a different network address (be on a different IP subnet) to the computers on the WLAN0 segment. In that case the couputer would have to perform routing not bridging. Routing is a layer-3 function (it works on layer-3 addressing such as IP-addresses)

Routing tables only apply to routing, not bridging.

See Wikipedia for detailed descriptions.

share|improve this answer

Often in the context of software "network bridging" you must explicitly allow traffic to pass.

The network bridge is often an additional interface that must be turned on.

# ifconfig bridge0 addm fxp0 addm fxp1 up
# ifconfig fxp0 up
# ifconfig fxp1 up

Notice in the above sample fxp0 and fxp1 are connected using the bridge0 interface.

See more : Network Bridge In FreeBSD

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.