Difference between revisions of "Route (command)"

From wikieduonline
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
<code>[[wikipedia:route (command)|route]]</code> is a [[Linux Commands|Linux command]] and Windows used to view and manipulate the IP routing table in Linux, Unix-like and Windows.
+
<code>[[wikipedia:route (command)|route]]</code> is a [[Linux Commands|Linux command]] and Windows used to view and manipulate the IP [[routing table]] in Linux, Unix-like and Windows.
  
  
Line 29: Line 29:
 
<code>route print</code>
 
<code>route print</code>
  
== macOS ==
+
== [[macOS]] ==
* <code>route add default xx.xx.xx.xx</code>
+
{{route add macOS}}
* <code>route del default</code>
 
* <code>[[route -n get default]]</code>
 
  
 
== Network configuration files ==
 
== Network configuration files ==
Line 56: Line 54:
 
* <code>[[route]]</code> directive <code>[[/etc/openvpn/server.conf]]</code>
 
* <code>[[route]]</code> directive <code>[[/etc/openvpn/server.conf]]</code>
 
* [[RTNETLINK]]
 
* [[RTNETLINK]]
* [[aws ec2 create-route]]
+
* <code>[[aws ec2 create-route]]</code>
 +
* <code>[[aws ec2 describe-route-tables]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 08:59, 3 June 2024

route is a Linux command and Windows used to view and manipulate the IP routing table in Linux, Unix-like and Windows.


Basic Linux commands[edit]

Man page: https://linux.die.net/man/8/route

  • Add default router:

route add default gw 192.168.1.254 eth0

  • Add route to an specific subnet:

route add -net 10.10.10.0/24 dev eth0

netstat -rn

ip route show

route del

route del -net 0.0.0.0 gw 192.168.178.1 netmask 0.0.0.0 dev eth0

Basic Windows commands[edit]

route delete 10.10.10.10

route delete 0.0.0.0 mask 0.0.0.0 XXX 10.10.10.10

route print

macOS[edit]

Network configuration files[edit]

networkctl

/lib/systemd/network, the volatile runtime network directory /run/systemd/network

/etc/systemd/network


Related commands: ip route [show|xxx]

PAN-OS[edit]

Related terms[edit]

See also[edit]

Advertising: