🔎Julia Evans🔍 on Twitter: “the ip command… “
Posted by jpluimers on 2020/03/06
[Archive.is] 🔎Julia Evans🔍 on Twitter: “the ip command… “
Larger image below the fold; thanks Julia!
Shortened transcript:
ip
- lets you view and change network configuration
ip OBJECT COMMAND
- object: addr, link, neigh, etc
- command: add, show, delete, etc
ip addr list
- shows IP addresses
ip route list
- displays the route table
ip route list table all
ip netsh
- manage network namespaces
ip link
- network devices (like
eth0
)
- network devices (like
ip neigh
- view/edit the ARP table
ip xfrm
- for IPsec
ip -s link
s
is for statistics- shows transmitted/received packets for each device
Lots of additions in the Twitter Thread too, including (and some of them I still need to figure out):
- [Archive.is] François on Twitter: “
ip link set dev $DEV xdp{,generic,offload} obj $OBJFILE
I know you know this one already!… “ - [Archive.is] marcogh on Twitter: “Every option could be shortened: ip a l, ip n l, etc etc.… “ (if you can remember abbreviations that is)
- [Archive.is] Daniel Gibson on Twitter: “Something I somehow didn’t realize for a long time: the corresponding manpages are at “
man ip-route
” “man ip-link
” etc… “ - [Archive.is] Paul Collins on Twitter: ““
ip route get $IP
” is a handy way to avoid manually interpreting the routing table. there’s also a modifier to specify the source IP which I can’t recall offhand, useful in case there is policy routing in play… “ [Archive.is] reuben honigwachs on Twitter: “
alias ip='ip --color'
alias ipb='ip --color --brief'
… “- [Archive.is] Bill Stewart on Twitter: “I tend to accidentally type “
show ip route
” instead of “ip route show
“, because half my shell windows are usually ssh’d to some Cisco device. (When I’m checking the “ip
” man page, it’s usually for the syntax for the “ip route
” command.)…” - [Archive.is] andrew “magical black-footed ferret” rich on Twitter: “This doesn’t come with macOS but it can be installed:
brew install iproute2mac
https://github.com/brona/iproute2mac /via @estelora who showed it to me… “ - [Archive.is] Sean on Twitter: “I recently discovered that “
ip netns exec ns1 ip addr
” can be shortened to “ip -n ns1 addr
“. This works for any ip command.… “ - [Archive.is] Duffie Cooley on Twitter: “
ip
also take a-6
flag to see all the ipv6 things. In my headnetstat
is toifconfig
whatss
is toip
.… “ - [Archive.is] Bob Mahar on Twitter: “The ip command is the work of satan himself, forged in the fires of hell, tempered in the tears of 10000 angels who weep over the death of perfectly good, decades old commands everyone was used to.… “
- [Archive.is] Richard Metzler on Twitter: “I feel like
ip monitor
isn’t known enough. http://man7.org/linux/man… It might not be your day-to-day command, but working with docker containers and other dynamic network config tools, it shows some of the magic of these tools.…” - [Archive.is] Joseph Zikusooka, Jr on Twitter: “Additionally ‘
ip tcp_metrics
‘ for managing TCP metrics… “ - [Archive.is] Andre Sencioles on Twitter: “I feel like each ip sub-command deserve a page in the zine… 😝 Also, love reading the comments. Always learn a new flag or use for the commands. Keep up the great work @b0rk! 👍… “
Many people – including me – that were used to net-tools
have difficulty remembering the new syntax or new features:
- [Archive.is] Nikhil Suvarna on Twitter: “Time to dump that ‘ifconfig’ 😄 ‘ip’ command ftw 💥👍👏… “
- [Archive.is] Tamara Roberson on Twitter: “Thank you. I still end up just defaulting to
net-tools
(e.g.ifconfig
) instead of learningiproute2
. 😳… “ - [Archive.is] Alexander Schrijver on Twitter: “Do people actually use this command? I’ve always used ‘
ifconfig
‘ / ‘iwconfig
‘ / ‘ethtool
‘ / ‘route
‘ / etc. I’ve tried learning the ‘ip
‘ command but I can never remember its syntax.…” - [Archive.is] Pascal Guinet ♪ on Twitter: “What the hell are network namespaces? Yeah, I’m old school and lazy to search ;) Very nice cheat sheet. Like always. Big kudos to you.… “
- [Archive.is] siggy 🐧 on Twitter: “It’s incredible how just colors and a “friendlier” font make these docs so much easier to consume than a summary on a man page. Love this series.… https://t.co/zxgSGLAM52″
- [Archive.is] SherlockInTraining on Twitter: “@b0rk you have inspired me to start reading man pages again, especially for all the command line tools I -thought- I knew (but learned some 15+ years ago). Keep up the great work! I will happily keep buying all your zines.…”
So here is some background reading:
- [WayBack] Introducing Linux Network Namespaces – Scott’s Weblog – The weblog of an IT pro focusing on cloud computing, Kubernetes, Linux, containers, and networking
- [WayBack] ss(8): another utility to investigate sockets – Linux man page
- [WayBack] ip(8) – Linux manual page :
-
-6 shortcut for -family inet6
-
-n, -netns <NETNS> switches ip to the specified network namespace NETNS. Actually it just simplifies executing of: ip netns exec NETNS ip [ OPTIONS ] OBJECT { COMMAND | help } to ip -n[etns] NETNS [ OPTIONS ] OBJECT { COMMAND | help }
-
- [WayBack] ip-monitor(8) – Linux manual page
- [WayBack] Ubuntu Manpage: ip-link – network device configuration
- [WayBack] Ubuntu Manpage: ip-route – routing table management
- [WayBack] ip-tcp_metrics(8) – Linux manual page
- [WayBack] ss(8) – Linux manual page
- iproute2 – Wikipedia:
net-tools utilities obsoleted by iproute2 Legacy utility Obsoleted by Note ifconfig
ip addr
,ip link
,ip -s
Address and link configuration route
ip route
Routing tables arp
ip neigh
Neighbors iptunnel
ip tunnel
Tunnels nameif
ifrename
,ip link set name
Rename network interfaces ipmaddr
ip maddr
Multicast netstat
ip -s
,ss
,ip route
Show various networking statistics - [WayBack] networking:net-tools [Linux Foundation Wiki]
Please keep in mind that most net-tools programs are obsolete now:
program obsoleted by arp
ip neigh
ifconfig
ip addr
ipmaddr
ip maddr
iptunnel
ip tunnel
route
ip route
nameif
ifrename
mii-tool
ethtool
–jeroen
Leave a Reply