Difference between revisions of "Ip (command)"
Jump to navigation
Jump to search
(47 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{lowercase}} |
+ | <code>ip</code> command show / manipulate routing, network devices, interfaces and [[tunnels]]. | ||
+ | * Man page: https://man7.org/linux/man-pages/man8/ip.8.html | ||
+ | * <code>[[ip link]]</code> https://man7.org/linux/man-pages/man8/ip-link.8.html | ||
− | |||
− | |||
− | |||
+ | == Linux == | ||
+ | * <code>[[ip route show]]</code>. See also: <code>[[netstat]] -rnv</code> | ||
+ | * <code>[[ip route add]]</code> | ||
+ | * <code>[[ip route]] del default</code> | ||
− | [[Cisco IOS]] | + | * <code>[[ip address show]]</code> |
+ | |||
+ | |||
+ | * <code>[[ip link show]]</code> or <code>[[ip link ls]]</code> | ||
+ | * <code>[[ip link]] set eth0 up</code> | ||
+ | * <code>[[ip link set]] dev eth0 [[mtu]] 9000</code> ([[Jumbo frames]]) | ||
+ | * <code>[[ip link add]]</code> | ||
+ | |||
+ | [[Policy based routing]] / Source routing policy: | ||
+ | ip route add from <source>/<mask> table <name> | ||
+ | ip route add 1.2.3.4/24 via <router> dev eth4 table <name> | ||
+ | |||
+ | * <code>[[ip link]] add wg0 type [[wireguard]]</code> | ||
+ | |||
+ | * <code>[[ip rule]] add</code> | ||
+ | |||
+ | |||
+ | Set an IP address: | ||
+ | * <code>ip addr add 192.168.0.xx/24 dev eth0</code> | ||
+ | |||
+ | Default [[gateway]]: | ||
+ | * <code>ip route add default via 192.0.2.2 dev eth0</code> | ||
+ | |||
+ | ip route add default via 192.0.2.2 dev eth55 | ||
+ | Cannot find device "eth55" | ||
+ | |||
+ | * <code>[[ip -s neighbor list]]</code> | ||
+ | |||
+ | * <code>[[MACHINE_IP]]=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)</code> | ||
+ | |||
+ | == [[Cisco IOS]] == | ||
* <code>[[debug]] [[ip domain]]</code> | * <code>[[debug]] [[ip domain]]</code> | ||
+ | * <code>[[ip (Cisco IOS)]]</code> | ||
+ | * <code>[[ip route]]</code> | ||
+ | ** <code>[[ip route show table all]]</code> | ||
+ | * <code>[[ip default-gateway]]</code> | ||
+ | == Related terms == | ||
+ | * <code>[[geoiplookup]]</code> | ||
+ | * <code>[[netplan]]</code> | ||
+ | * <code>[[route]]</code> | ||
+ | * [[IP (address)]] | ||
+ | * [[netsh]] ([[Windows]]) | ||
== See also == | == See also == | ||
+ | * {{ip}} | ||
* {{Linux networking commands}} | * {{Linux networking commands}} | ||
− | + | * {{TCP}} | |
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:Linux commands]] | [[Category:Linux commands]] |
Latest revision as of 14:05, 15 August 2023
ip
command show / manipulate routing, network devices, interfaces and tunnels.
- Man page: https://man7.org/linux/man-pages/man8/ip.8.html
ip link
https://man7.org/linux/man-pages/man8/ip-link.8.html
Contents
Linux[edit]
ip route show
. See also:netstat -rnv
ip route add
ip route del default
ip link show
orip link ls
ip link set eth0 up
ip link set dev eth0 mtu 9000
(Jumbo frames)ip link add
Policy based routing / Source routing policy:
ip route add from <source>/<mask> table <name> ip route add 1.2.3.4/24 via <router> dev eth4 table <name>
ip rule add
Set an IP address:
ip addr add 192.168.0.xx/24 dev eth0
Default gateway:
ip route add default via 192.0.2.2 dev eth0
ip route add default via 192.0.2.2 dev eth55 Cannot find device "eth55"
MACHINE_IP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
Cisco IOS[edit]
Related terms[edit]
See also[edit]
ip (command)
,ip link
,ip link show
,ip link add
,ip route
,ip link set
,ip address show
,public ip
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: