I have 3 switches (X, Y and Z) and each one has 2 interfaces. In the X switch I have my WAN connection (10.1.0.1), and I can connect to any host in the 10.2-4.0/29 networks and to the internet, but my problem is that any of the hosts in theses networks can't connect to the internet, including the Y and Z switchs.
(IPs between parenthesis are configured in the interfaces)
Here is the routing table of each switch:
X:
eth0: 10.1.0.0/30 (10.1.0.2)
eth1: 10.2.0.0/29 (10.2.0.1)
default via 10.1.0.1 dev eth0
10.1.0.0/30 dev eth0 proto kernel scope link src 10.1.0.2
10.2.0.0/29 via 10.2.0.1 dev eth1 scope link
10.2.0.0/30 dev eth1 proto kernel scope link src 10.2.0.1
10.3.0.0/29 via 10.2.0.2 dev eth1
10.4.0.0/29 via 10.2.0.3 dev eth1
Y:
eth0: 10.2.0.0/29 (10.2.0.2)
eth1: 10.3.0.0/29 (10.3.0.1)
default via 10.2.0.1 dev eth0
10.2.0.0/29 via 10.2.0.2 dev eth0 scope link
10.2.0.0/29 dev eth0 proto kernel scope link src 10.2.0.2
10.4.0.0/29 via 10.3.0.1 dev eth1 scope link
10.4.0.0/29 dev eth1 proto kernel scope link src 10.3.0.1
10.3.0.0/29 via 10.2.0.3 dev eth0
Z:
eth0: 10.2.0.0/29 (10.2.0.3)
eth1: 10.4.0.0/29 (10.4.0.1)
default via 10.2.0.1 dev eth0
10.2.0.0/29 via 10.2.0.3 dev eth0 scope link
10.2.0.0/29 dev eth0 proto kernel scope link src 10.2.0.3
10.3.0.0/29 via 10.2.0.2 dev eth1
10.4.0.0/29 dev eth1 proto kernel scope link src 10.4.0.1
10.4.0.0/29 via 10.4.0.1 dev eth0 scope link
Tried inserting route add 10.1.0.0/30 gw 10.2.0.1
in both Y and Z switchs without success, any tips?