Configuring the default gateway on the host

Once the hosts have been configured with the correct IP address, it is required that we configure the correct default gateway for both hosts. To achieve this, we will use the following syntax:

mininet> <host id> route add default gw x.x.x.x

For Host 1, we will have the following:

mininet> h1 route add default gw 192.168.10.1

For Host 2, we will have the following:

mininet> h2 route add default gw 192.168.20.1

To verify the preceding configuration, we can run the following command:

mininet> <host id> route –n

For host 1, run the h1 route –n command:

For host 2, run the h2 route –n command:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset