Last active
March 17, 2020 18:00
-
-
Save NrI3/20ebed929e2b38aea4cc316c468bfa6e to your computer and use it in GitHub Desktop.
Routing linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show all routes | |
ip route | |
# add route | |
ip route add [network/mask] dev [interface] | |
ip route add 192.168.0.0/24 dev ens33 | |
# delete route | |
ip route del [network/mask] | |
ip route del 192.186.0.0/24 | |
# add gateway | |
ip route add default via [gateway] | |
ip route add 0.0.0.0/0 via 192.168.0.1 | |
ip route add default via 192.186.0.1 | |
# show routes numeric | |
route -n | |
# empty routes table | |
ip route flush table main | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment