Linux route add command
Q. How do I add new / default gateway using route command under Linux?
A. You can use any one of the following tool to add route:
=> route command : show / manipulate the IP routing table
=> ip command : show / manipulate routing, devices, policy routing and tunnels
Linux route add using route command
Route all traffic via 192.168.1.254 gateway connected via eth0 network interface:
# route add default gw 192.168.1.254 eth0
Linux route add using ip command
Just like above but with ip command:
# ip route add 192.168.1.0/24 dev eth0
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- OpenBSD Set / Change Default Gateway
- Linux setup default gateway with route command
- FreeBSD Set a Default Route / Gateway
- Linux Null route an attackers ip
- Solaris UNIX Add Static Routes
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: 192 168 1 254, default gateway, ip command, ip routing table, Linux, route add, route command



Recent Comments
Today ~ 7 Comments
Today ~ 33 Comments
Today ~ 2 Comments
Today ~ 1 Comment
Today ~ 2 Comments