Transcription of ip COMMAND - Red Hat Customer Portal
1 Ip COMMAND CHEAT SHEET for Red Hat Enterprise LinuxIP QUERIESSUBCOMMANDDESCRIPTIONS AND TASKS addrDisplay IP Addresses and property information (abbreviation of address )ip addr Show information for all addressesip addr show dev em1 Display information only for device em1linkManage and display the state of all network interfacesip link Show information for all interfacesip link show dev em1 Display information only for device em1ip -s link Display interface statisticsrouteDisplay and alter the routing tableip route List all of the route entries in the kernelmaddrManage and display multicast IP addressesip maddr Display multicast information for all devicesip maddr show dev em1 Display multicast information for device em1neighShow neighbour objects; also known as the ARP table for IPv4ip neigh Display neighbour objectsip neigh show dev em1 Show the ARP cache for device em1helpDisplay a list of commands and arguments for each subcommandip help Display ip commands and argumentsip addr help Display address commands and argumentsip link help Display link commands and argumentsip neigh help Display neighbour commands and argumentsMULTICAST ADDRESSINGSUBCOMMANDDESCRIPTIONS AND TASKS maddr addAdd a static link-layer multicast addressip maddr add 33:33:00:00:00:01 dev em1 Add mutlicast address 33:33:00:00:00:01 to em1maddr delDelete a multicast addressip maddr del 33:33:00:00:00:01 dev em1 Delete address 33:33:00:00:00.
2 01 from em1 MODIFYING address AND LINK PROPERTIESSUBCOMMANDDESCRIPTIONS AND TASKS addr addAdd an addressip addr add dev em1 Add address with netmask 24 to device em1addr delDelete an addressip addr del dev em1 Remove address from device em1link setAlter the status of the interfaceip link set em1 up Bring em1 onlineip link set em1 down Bring em1 offlineip link set em1 mtu 9000 Set the MTU on em1 to 9000ip link set em1 promisc on Enable promiscuous mode for em1 ADJUSTING AND VIEWING ROUTESSUBCOMMANDDESCRIPTIONS AND TASKS route addAdd an entry to the routing tableip route add default via dev em1 Add a default route (for all addresses) via the local gateway that can be reached on device em1ip route add via Add a route to via the gateway at route add dev em1 Add a route to that can be reached on device em1route deleteDelete a routing table entryip route delete via Delete the route for via the gateway at replaceReplace, or add if not defined, a routeip route replace dev em1 Replace the defined route for to use device em1route getDisplay the route an address will takeip route get Display the route taken for IP THE ARP TABLESUBCOMMANDDESCRIPTIONS AND TASKS neigh addAdd an entry to the ARP Tableip neigh add lladdr 1:2:3:4:5:6 dev em1 Add address with MAC 1:2:3:4:5.
3 6 to em1neigh delInvalidate an entryip neigh del dev em1 Invalidate the entry for on em1neigh replaceReplace, or adds if not defined, an entry to the ARP tableip neigh replace lladdr 1:2:3:4:5:6 dev em1 Replace the entry for address to use MAC 1:2:3:4:5:6 on em1 COMPARING NET-TOOLS VS. IPROUTE PACKAGE COMMANDSNET-TOOLS COMMANDSIPROUTE COMMANDSarp -aip neigharp -vip -s neigharp -s 1:2:3:4:5:6ip neigh add lladdr 1:2:3:4:5:6 dev eth1arp -i eth1 -d neigh del dev eth1ifconfig -aip addrifconfig eth0 downip link set eth0 downifconfig eth0 upip link set eth0 upifconfig eth0 addr add dev eth0ifconfig eth0 netmask addr add dev eth0ifconfig eth0 mtu 9000ip link set eth0 mtu 9000ifconfig eth0:0 addr add dev eth0netstatssnetstat -neopass -neopanetstat -gip maddrrouteip routeroute add -net netmask dev eth0ip route add dev eth0route add default gw route add default via 2014 Red Hat, Inc.
4 Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are trademarks of Red Hat, Inc., registered in the and other countries. Linux is the registered trademark of Linus Torvalds in the and other NETWORKING COMMANDS (NOT NECESSARILY PROVIDED FROM IPROUTE)SUBCOMMANDDESCRIPTIONS AND TASKS arpingSend ARP request to a neighbour hostarping -I eth0 Send ARP request to via interface eth0arping -D -I eth0 Check for duplicate MAC addresses at on eth0ethtool Query or control network driver and hardware settingsethtool -g eth0 Display ring buffer for eth0ethtool -i eth0 Display driver information for eth0ethtool -p eth0 Identify eth0 by sight, typically by causing LEDs to blink on the network portethtool -S eth0 Display network and driver statistics for eth0ssDisplay socket statistics. The below options can be combinedss -a Show all sockets (listening and non-listening)ss -e Show detailed socket informationss -o Show timer informationss -n Do not resolve addressesss -p Show process using the socket