mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 13:42:11 +01:00
ip: better route example
Assigning a subnet is already covered in the example below. Setting a default route via a router is the most common use case of ip route IMHO.
This commit is contained in:
parent
03bb651bf0
commit
27482cbabd
1 changed files with 2 additions and 2 deletions
|
@ -19,8 +19,8 @@ ip route
|
|||
# Display all routes for IPv6
|
||||
ip -6 route
|
||||
|
||||
# Add route via gateway IP
|
||||
ip route add 192.168.0.0/24 via 192.168.1.1
|
||||
# Add default route via gateway IP
|
||||
ip route add default via 192.168.1.1
|
||||
|
||||
# Add route via interface
|
||||
ip route add 192.168.0.0/24 dev eth0
|
||||
|
|
Loading…
Reference in a new issue