0

Could somebody please help me understand how to correctly configure bridge host shown on the picture?

Currently, from 10.10.10.101 I can ping Internet hosts and hosts on 10.10.10/24 network. But I cannot ping anything on 10.10.1/24 network.

From bridge I can ping Internet hosts, hosts on 10.10.10/24 and hosts on 10.10.1/24 network.

From 10.10.1.101 I can ping 10.10.10.2 and hosts on 10.10.1/24 network. But I cannot ping anything on 10.10.10/24 network (except 10.10.10.2) and on the Internet.

I'd like to connect 10.10.10/24 network with 10.10.1/24 network. I'd also like to connect 10.10.1/24 network with 10.10.10/24 network and with the Internet.

How should I configure bridge host? Can I do this with ip route or should I look into iptables/nftables?

If possible I'd like to stay with ip command instead of going back to ifconfig.

My current routing tables:

10.10.1.102

default via 10.10.1.10 dev eth0 proto dhcp src 10.10.1.102 metric 100 
10.10.1.0/24 dev eth0 proto kernel scope link src 10.10.1.102 
10.10.1.10 dev eth0 proto dhcp scope link src 10.10.1.102 metric 100

bridge

default via 10.10.10.1 dev wlan0 proto dhcp src 10.10.10.2 metric 600 
10.10.1.0/24 dev eth0 proto kernel scope link src 10.10.1.10 
10.10.10.0/24 dev wlan0 proto kernel scope link src 10.10.10.2 
10.10.10.1 dev wlan0 proto dhcp scope link src 10.10.10.2 metric 600

Thank you very much in advance!

enter image description here

1 Answer 1

1

In case you want to have it reachable the network 10.10.10.0/24 have to get the information about 10.10.1.0/24 - that is current "issue".

You are not mentioning the routing table from e.g. 10.10.10.101. Here I guess:

default via 10.10.10.1/24 ...
10.10.10.0/24 dev...

From 10.10.1.101 I can ping 10.10.10.2 and hosts on 10.10.1/24 network. But I cannot ping anything on 10.10.10/24 network

you can ping it and the packet will arrive to 10.10.10.x host but the host have no information how to reply. The reply is sent to default gw and there is discarded or sent to internet (depends on the configuration of the router).

To have it working your "bridge" have to simply route between the networks and 10.10.10.0/24 netowrk somehow need to know how to reach 10.10.1.0/24. 10.10.1.0/24 network is not problematic as all the network is on default routing path (10.10.1.10).

To handle it you can do one of :

  • add routing rule on wireless router (10.10.10.1):
10.10.1.0/24 via 10.10.10.2

This way all the traffic from 10.10.10.0/24 will go via default gateway definition to 10.10.10.1 but then it will be forwarded to the 10.10.10.2 where the network 10.10.1.0 is known already.

  • set DHCP option with route record related to 10.10.1.0/24 for the network 10.10.10.0/24

you can pass the routing record to the clients via DHCP option so the client will know where to route the traffic for 10.10.1.0/24 directly so it will not go via 10.10.10.1 (at least from routing point of view as it is wifi so physically it will probably pass the wireless part anyway but it is not part of "routing" issue).

  • set manully on the each relevant host @10.10.10.0/24 network
10.10.1.0/24 via 10.10.10.2

I have wrote the options in order from point of view of maintenance. The setting of the routing rule on the hosts are the last option as it is the hardest to maintain in case of change. For the static networks without change it can be the easiest way how to setup depending on the possibilities of the configuration of the wireless router.

1
  • Thank you so much for the detailed answer! The only extra thing I had to do to make this work is to set net.ipv4.ip_forward=1 on the "bridge"
    – Y2i
    Oct 10, 2021 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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