On a same machine (local) and a single SE server with two hubs:
- SW0 (default)
- SW1
I would like to router SW0 traffic to SW1. Actually connecting two HUBs. So when I connect to SW0, I can ping Internet though SW1
### Configuration ###
SW0 (default)
Code: Select all
SecureNatHostSet /MAC:none /IP:192.168.30.2 /MASK:255.255.255.0
DhcpEnable
DhcpSet /START:192.168.30.10 /END:192.168.30.200 /MASK:255.255.255.0 /EXPIRE:7200 /GW:192.168.30.254 /DNS: /DNS2: /DOMAIN: /LOG:yes
NatDisable
SecureNatEnable
SW1
Code: Select all
SecureNatHostSet /MAC:none /IP:192.168.40.2 /MASK:255.255.255.0
DhcpEnable
DhcpSet /START:192.168.40.10 /END:192.168.40.200 /MASK:255.255.255.0 /EXPIRE:7200 /GW:192.168.40.1 /DNS:8.8.8.8 /DNS2: /DOMAIN: /LOG:yes
NatDisable
SecureNatEnabl
+
Code: Select all
BridgeCreate SW1 /DEVICE:sw1 /TAP:yes
ip addr add 192.168.40.1/24 brd + dev tap_sw1
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -s 192.168.40.0/24 ! -d 192.168.40.0/24 -o enp3s0 -j SNAT --to-source 192.168.1.22
While connecting to SW0 cannot ping 8.8.8.8 since there is not Bridge
### Layer 3 Switch ###
Code: Select all
RouterAdd R1
RouterIfAdd R1 /HUB:SW0 /IP:192.168.30.254/24
RouterIfAdd R1 /HUB:SW1 /IP:192.168.40.254/24
RouterTableAdd R1 ???
RouterStart R1
My thought was that if I add route from SW0 to SW1 gateway , it works, it did not
Code: Select all
RouterTableAdd R1 /NETWORK:192.168.30.0/24 /GATEWAY:192.168.40.1 /METRIC:1
Code: Select all
RouterTableAdd R1 /NETWORK:0.0.0.0/0 /GATEWAY:192.168.40.1 /METRIC:1
Please let me know what is the right routing table? and why that way is the right way so I can correct my understanding
btw I read this section
3.8 Virtual Layer 3 Switches
Regards