Add IP Route Rules into Windows Routing Table in Command Prompt with Route Command. $ sudo ip route add default via 192.168.43.1 dev eth0 We hope that this tutorial was informative and provided you with insights into how you can go about adding and deleting static route in Linux. # route add default gw 192.168.1.254 eth0 OR use hostname such as dsl-router: # route add default gw dsl-router eth0 Or use the ip command (newer syntax) to route all traffic via 192.168.1.254 gateway connected via eth0 network interface: # ip route add 192.168.1.0/24 dev eth0 OR # ip route add 192.168.1.0/24 via 192.168.1.254. Learn how to configure default route and static route with IP route command in Cisco router step by step with practical example in packet tracer. route is a fairly simple tool, perfect for creating static routes. To add a static route for a specific host: # route add -host 10.110.55.55 gw 10.110.0.2 # route add -host 10.110.55.55 eth0. RIP: If RIP is enabled, the routing switch can learn about routes from the advertisements other RIP routers send to the routing switch. Please, if it doesn't work try to share. This tutorial explains IP route command and its parameter, argument and options in detail with examples. route add [HOST] MASK 255.255.255.255 [GATEWAYIP] route add [NET] MASK [NETMASK] [GATEWAYIP] Could you try to run it as: route add 48.0.0.0 MASK 255.0.0.0 192.168.1.200.

For adding temporary static routes in Linux we can use route command. We can also list and check the newly added route information by using the command ip route show like below. * To add a default route with the default gateway address of 192.168.12.1, type: route add 0.0.0.0 mask 0.0.0.0 192.168.12.1 To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0 and the next hop address of 10.27.0.1, type:

We will see that the new route is …

ip route is much more powerful, it has much more functionality, and can create more specialized rules.. ip route isn't needed to create a static route, but as it's a much more useful tool, the effort expended in learning it and its syntax is definitely time well spent. A newly added route will be activated instantly after adding the routing table. The syntax of route command to add a routing table entry: route print and ipconfig output, it is posible that you have a routing … To route the incoming and outgoing traffic through eth1, other than the default route (eth0), you also need to add additional routes for eth1 . So after system reboot all changes will be lost. In this tutorial, let us use the following example: eth0 has been configured with IP address 19.86.101.54 … Click Start-> Run (or at Start Search in Windows Vista or Windows 7), and type in Cmd, then press Enter to open a command prompt window. route print To display the routes in the IP routing table that begin with 10, type: route print 10. ip route add blackhole default ip route add blackhole 202.143.170.0/24 ip route add blackhole 64.65.64.0/18 throw The throw route type is a convenient route type which causes a route lookup in a routing table to fail, returning the routing selection process to the RPDB. ip route del has the same arguments as ip route add, but their semantics are a bit different. It's still present in many distributions for compatibility. # ip route add 192.168.70.0/24 via 192.168.14.1 dev eth0 RTNETLINK answers: Network is unreachable # ip route add 192.168.14.0/24 via 192.168.70.1 dev eth0 RTNETLINK answers: File exists # ip route add 192.168.14.0/24 via 192.168.70.1 dev eth1 RTNETLINK answers: Network is unreachable # route Kernel IP routing table When you add an IP interface, the routing switch automatically creates a route for the network the interface is in. $ sudo route add -net 10.0.0.0/8 gw 192.168.1.1 eth0 Check New Route. Key values (to, tos, preference and table) select the route to delete. # netstat -nr # ip route list Add a Temporary Route. If optional attributes are present, ip verifies that they coincide with the attributes of the route to delete.

Also Read : 12 ip Command Examples for Linux Users