How To Add and Delete Route In Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-add-and-delete-route-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

gns3-lab

I am currently working in my gns3 lab on ospf and I have connected my routers to the real world virtual network. What is real world virtual network? I am running gns3 on vms using kvm+libvirt+virt-manager and created a network for them. Here I have connected gns3 to the vms network. Now the issue is I want to route networks. My vms network is default for libvirt which is 192.168.122.0/24 and gns3 network is 10.0.0.0/8. I run ospf on gns3 lab with network 0.0.0.0 0.0.0.0 area 0 command and injected default route for access vms network with ip route 0.0.0.0 0.0.0.0  192.168.122.1 . Now I want to route vms the gns3 network.

Route Add Syntax

To add route ip route command is used and ip route command have following syntax.

  • NETWORK is destination network where the packet will be send
  • GATEWAY is first hop where packet will be forwarded.

Route Add

This commands add route where 192.168.122.241 is my GNS3 lab router ip address

And I can ping from vms to the lab router interfaces

To remove added route from linux box use same as add by changing it del

LEARN MORE  How To Add New Repository To Apt In Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-add-and-delete-route-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)