qetharp - Query and purge OSA and HiperSockets ARP data
Use the qetharp command to query and purge address data such as MAC and IP addresses from the ARP cache of the OSA and HiperSockets™ hardware.
For OSA hardware, qetharp can also modify the cache.
Before you begin:
- The qetharp command applies only to devices in layer 3 mode.
- The qetharp command supports IPv6 only for real HiperSockets and z/VM® guest LAN HiperSockets.
- For HiperSockets, z/VM guest LAN and VSWITCH interfaces,
the qetharp command supports only the
--queryoption.
qetharp syntax
Where:
- -q or --query
- shows the address resolution protocol (ARP) information about
the specified network interface. Depending on the device that the
interface was assigned to, this information is obtained from an OSA
feature's ARP cache or a HiperSockets ARP
cache.
The default command output shows symbolic host names and includes only numerical addresses for host names that cannot be resolved. Use the -n option to show numerical addresses instead of host names.
By default, qetharp omits IPv6 related information. Use the -6 option to include IPv6 information for HiperSockets.
- <interface>
- specifies the qeth interface to which the command applies.
- -n or --numeric
- shows numeric addresses instead of trying to determine symbolic host names. This option can be used only with the -q option.
- -c or --compact
- limits the output to numeric addresses only. This option can be used only with the -q option.
- -6 or --ipv6
- includes IPv6 information for HiperSockets. For real HiperSockets, shows the IPv6 addresses. For guest LAN HiperSockets, shows the IPv6 to MAC address mappings. This option can be used only with the -q option.
- -a or --add
- adds a static ARP entry to the OSA adapter. Static entries can be deleted with -d.
- -d or --delete
- deletes a static ARP entry from the OSA adapter. Static entries are created with -a.
- -p or --purge
- flushes the ARP cache of the OSA. The cache contains dynamic ARP entries, which the OSA adapter creates through ARP queries. After flushing the cache, the OSA adapter creates new dynamic entries. This option works only with OSA devices. qetharp returns immediately.
- -i <ip_address> or --ip <ip_address>
- specifies the IP address to be added to or removed from the OSA adapter.
- -m <mac_address> or --mac <mac_address>
- specifies the MAC address to be added to the OSA adapter.
- -v or --version
- shows version information and exits
- -h or --help
- displays a short help text, then exits. To view the man page, enter man qetharp.
Examples
- Show all ARP entries of the OSA defined as eth0:
# qetharp -q eth0
- Show all ARP entries of the HiperSockets interface that is
defined as hsi0 including IPv6 entries:
qetharp -6q hsi0
- Show all ARP entries of the OSA defined as eth0, without resolving
host names:
# qetharp -nq eth0
- Show
all ARP entries, including IPv6 entries, of the HiperSockets interface that is
defined as hsi0 without resolving host names:
qetharp -n6q hsi0
- Flush the OSA ARP cache for eth0:
# qetharp -p eth0
- Add a static entry for eth0 and IP address 1.2.3.4 to the OSA
ARP cache, with MAC address aa:bb:cc:dd:ee:ff:
# qetharp -a eth0 -i 1.2.3.4 -m aa:bb:cc:dd:ee:ff
- Delete the static entry for eth0 and IP address 1.2.3.4 from the
OSA ARP cache.
# qetharp -d eth0 -i 1.2.3.4