Difference between revisions of "Route (command)"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(35 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <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. | + | {{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. | ||
== Basic Linux commands == | == Basic Linux commands == | ||
− | * Add default router: <code>route add default gw 192.168.1.254 eth0</code> | + | Man page: https://linux.die.net/man/8/route |
− | * <code>[[netstat]] -rn</code> | + | |
+ | * Add default router: | ||
+ | |||
+ | <code>route add default gw 192.168.1.254 eth0</code> | ||
+ | |||
+ | * Add route to an specific [[subnet]]: | ||
+ | |||
+ | <code>route add -net 10.10.10.0/24 dev eth0</code> | ||
+ | |||
+ | <code>[[netstat]] -rn</code> | ||
+ | |||
+ | <code>[[ip route show]]</code> | ||
+ | |||
+ | <code>[[route del]]</code> | ||
+ | |||
+ | <code>route del -net 0.0.0.0 gw 192.168.178.1 netmask 0.0.0.0 dev eth0</code> | ||
== Basic Windows commands == | == Basic Windows commands == | ||
− | + | <code>route delete 10.10.10.10</code> | |
− | + | ||
+ | <code>route delete 0.0.0.0 mask 0.0.0.0 XXX 10.10.10.10</code> | ||
+ | |||
+ | <code>route print</code> | ||
+ | == [[macOS]] == | ||
+ | {{route add macOS}} | ||
== Network configuration files == | == Network configuration files == | ||
− | * Ubuntu ([[systemd]]): <code>[[networkctl]]</code> | + | * Ubuntu ([[systemd]]): |
− | + | ||
− | + | <code>[[networkctl]]</code> | |
+ | |||
+ | <code>/lib/systemd/network</code>, the volatile runtime network directory <code>/run/systemd/network</code> | ||
+ | |||
+ | <code>/etc/systemd/network</code> | ||
Related commands: <code>[[ip route]] [show|xxx]</code> | Related commands: <code>[[ip route]] [show|xxx]</code> | ||
− | |||
== [[PAN-OS]] == | == [[PAN-OS]] == | ||
− | + | * <code>[[show routing route]]</code> | |
== Related terms == | == Related terms == | ||
* <code>[[/proc/net/]]route</code> | * <code>[[/proc/net/]]route</code> | ||
− | * [[ | + | * <code>[[ip]]</code> |
+ | * <code>[[traceroute]]</code> | ||
+ | * Windows: <code>[[route print]]</code> | ||
+ | * <code>[[route]]</code> directive <code>[[/etc/openvpn/server.conf]]</code> | ||
+ | * [[RTNETLINK]] | ||
+ | * <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.
Contents
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
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]
route add default xx.xx.xx.xx
route del default
route -n get default
sudo route -n add -net 172.17.0/24 192.168.1.62
route -n add -net
Network configuration files[edit]
- Ubuntu (systemd):
/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]
/proc/net/route
ip
traceroute
- Windows:
route print
route
directive/etc/openvpn/server.conf
- RTNETLINK
aws ec2 create-route
aws ec2 describe-route-tables
See also[edit]
route
, IOS:show ip route
, PAN-OS:show routing route
,route add
,route del
- IP:
route
,mtr
,traceroute
,tcptraceroute
,lft
, TTL ip
[link, route]
,ifconfig
netstat
ss
lsof
ping
ethtool
mii-tool
arping
nmcli
(RHEL)route
networkctl
,netplan
,tc
- TCP/IP, Transport protocol, UDP, SCTP, QUIC, subnet mask, Routing protocols: BGP, routing table, Policy based routing, multicast, TCP Fast Open, RDP, TTL, RTT, MPTCP, Large send offload (LSO): (TSO, GRO, GSO, TCP checksum),
ethtool
, SCTP, 5-Tuple, Check TCP connectivity, TCP window size,/proc/sys/net/ipv4/tcp_rmem
, ack, List of TCP ports, localhost, broadcast address
Advertising: