Hello,
I have problem during the static routing configuration. I have two networks in virtualbox (192.168.57.0/224 and 192.168.58.0/24), I have configured static routes on both, host in network 57 and host in network 58 but when I try to ping each other it doesnt work. My network looks like this one:
Routing table on CentOS host:
[armin@udemy-lfcs ~]$ sudo netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.57.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
192.168.58.0 192.168.57.1 255.255.255.0 UG 0 0 0 enp0s3
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
[armin@udemy-lfcs ~]$ sudo ip route
192.168.57.0/24 dev enp0s3 proto kernel scope link src 192.168.57.3
192.168.58.0/24 via 192.168.57.1 dev enp0s3
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
Routing table on Ubuntu host:
armin@lfcs-ubuntu:~$ sudo netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.57.0 192.168.58.1 255.255.255.0 UG 0 0 0 enp0s3
192.168.58.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
armin@lfcs-ubuntu:~$ sudo ip route
192.168.57.0/24 via 192.168.58.1 dev enp0s3
192.168.58.0/24 dev enp0s3 proto kernel scope link src 192.168.58.3
Routing table on my router which is Ubuntu VM:
armin@lfcs-ubuntu-R1:~$ sudo netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.2.2 0.0.0.0 UG 0 0 0 enp0s3
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
10.0.2.2 0.0.0.0 255.255.255.255 UH 0 0 0 enp0s3
10.0.2.3 0.0.0.0 255.255.255.255 UH 0 0 0 enp0s3
192.168.57.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s8
192.168.58.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s9
armin@lfcs-ubuntu-R1:~$ sudo ip route
default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 100
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 100
10.0.2.2 dev enp0s3 proto dhcp scope link src 10.0.2.15 metric 100
10.0.2.3 dev enp0s3 proto dhcp scope link src 10.0.2.15 metric 100
192.168.57.0/24 dev enp0s8 proto kernel scope link src 192.168.57.1
192.168.58.0/24 dev enp0s9 proto kernel scope link src 192.168.58.1
For example, I’am able to ping 192.168.57.1 from my Ubuntu host and 192.168.58.1 from my CentOS host, but I can’t ping 192.168.57.3 from my Ubuntu host and 192.168.58.3 from my CentOS host.
Can anyone help me to understand where is the problem ?