Professional Documents
Culture Documents
Linux Networking: To Route or To Ip Route? - Enable Sysadmin
Linux Networking: To Route or To Ip Route? - Enable Sysadmin
Linux Networking: To Route or To Ip Route? - Enable Sysadmin
-- Please Select --
Which route will you choose? Old school or new-fangled.
Submit
Posted: June 2, 2020 | 3 min read | Tyler Carrigan (Editorial Team, Red Hat)
Privacy Statement
For a basic listing, I prefer the old school route command, but your mileage may
vary.
Using route:
Using ip:
The syntax for this command is: ip route add <network you want to connect
to> via <ip used to reach the network> dev <interface name>
Removing routes
You can remove routes in a similar fashion.
Using route:
The syntax is the same as the add command, except we are using del instead of
add.
Using ip:
Again, we are only altering the syntax slightly from the add command.
To verify that the new gateway is set, use the standard route command or ip
route show.
Topics: Networking
Tyler Carrigan
Tyler is the Sr. Community Manager at Enable Sysadmin, a submarine veteran, and an all-round
tech enthusiast! He was first introduced to Red Hat in 2012 by way of a Red Hat Enterprise
Linux-based combat system inside the USS Georgia Missile Control Center. More about me
Related Content
Work email *
Country *
-- Please Select --
Submit
Privacy Statement
The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. The content published on this site are community
contributions and are for informational purpose only AND ARE NOT, AND ARE NOT INTENDED TO BE, RED HAT DOCUMENTATION, SUPPORT, OR ADVICE.
Red Hat and the Red Hat logo are trademarks of Red Hat, Inc., registered in the United States and other countries.
About Red Hat Jobs Events Locations Contact Red Hat Red Hat Blog Diversity, equity, and inclusion Cool Stuff Store Red Hat Summit
×
© 2023 Red Hat, Inc.
We use cookies on our websites to deliver our online services. Details about how we use cookies and how you may disable them are set out in our Privacy
Privacy statement Terms of use All policies and guidelines Digital accessibility
Statement. By using this website you agree to our use of cookies.