Score:0

Looking for help to configure a router host

pt flag
Y2i

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

Score:1
it flag

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.

pt flag
Y2i
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"
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.