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.
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.
- ForHiperSockets, z/VM guest LAN and VSWITCH interfaces, the qetharp command supports only the --query option.
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.
- -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.
- <interface>
- specifies the qeth interface to which the command applies.
- -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 usage information and exits. To view the man page, enter man qetharp.
Examples
- Show all ARP entries of the OSA defined as encf500:
# qetharp -q encf500
- Show all ARP entries of the HiperSockets
interface that is defined as enca1c0 including IPv6 entries:
qetharp -6q enca1c0
- Show all ARP entries of the OSA defined as encf500,
without resolving host names:
# qetharp -nq encf500
- Show all ARP
entries, including IPv6 entries, of the HiperSockets interface
that is defined as enca1c0 without resolving host names:
qetharp -n6q enca1c0
- Flush the OSA ARP cache for encf500:
# qetharp -p encf500
- Add a static entry for encf500 and IP address 1.2.3.4
to the OSA ARP cache, with MAC address aa:bb:cc:dd:ee:ff:
# qetharp -a encf500 -i 1.2.3.4 -m aa:bb:cc:dd:ee:ff
- Delete the static entry for encf500 and IP address
1.2.3.4 from the OSA ARP cache.
# qetharp -d encf500 -i 1.2.3.4