As a part of an experiment, my network has the following topology for two host machines connected to a router in mininet(on Ubuntu 22.04.02 Virtual Machine)
h1 - r1 - h2
The host Machine 'h1' has the following configuration: h1 ifconfig
The host Machine 'h2' has the following config: h2 ifconfig
The router r1 has the following config: r1 ifconfig
I am trying to setup the experimental topology such that both the hosts can access each other, which of course, is possible through configuring routing tables
I have taken the following steps:
On the router terminal(xterm):
ifconfig r1-eth0 192.168.3.0 netmask 255.0.0.0
ip route add 192.168.0.0/24 dev r1-eth0
ip route add 192.168.1.0/24 dev r1-eth0
On the h1 terminal (xterm)
ifconfig h1-eth0 192.168.0.103 netmask 255.0.0.0
ip route add 192.168.1.0/24 via 192.168.3.0
route add default gw 192.168.3.0
On the h2 terminal (xterm)
ifconfig h2-eth0 192.168.1.2 netmask 255.0.0.0
ip route add 192.168.0.0/24 via 192.168.3.0
route add default gw 192.168.3.0
The updated routing tables for h1, h2 and r1 are as follows:
h1 IP routes
h2 IP routes
r1 IP routes
When I try pinging h2 from h1 and vice versa I get destination host unreachable error.
where am I going wrong? Is there a step I have skipped? Any insight/help is appreciated.
P.S.: I would appreciate any good resources on static IP routing.
{}
preformat function. – Zac67 Apr 28 '23 at 20:50