3

In my Cisco Router I check the arp:

Router>show arp 
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.1.1             -   0001.42D2.AE01  ARPA   GigabitEthernet0/0/0
Internet  192.168.1.2             67  000C.CF4C.99E6  ARPA   GigabitEthernet0/0/0
Internet  192.168.2.1             -   0001.42D2.AE02  ARPA   GigabitEthernet0/0/1
Internet  192.168.2.2             109 0010.114E.A4EC  ARPA   GigabitEthernet0/0/1

I want to match conditions, but I tried bellow, all do not work:

Router>show arp | match 192.168.2.2
                ^
% Invalid input detected at '^' marker.

Router>show arp 192.168.2.2
                ^
% Invalid input detected at '^' marker.

I also tried the begin, or include:

Router#show arp | begin ?
% Unrecognized command

UPDATE

The show version display this:

Cisco IOS XE Software, Version 03.16.05.S - Extended Support Release
Cisco IOS Software, ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version Version 15.5 (3)S5, RELEASE SOFTWARE (fc2)

this is a ISR 4321 Router.

migrated from serverfault.com Nov 15 '18 at 12:08

This question came from our site for system and network administrators.

  • You need to be in config mode, then sh arp | in 192.168.2.2 – Cown Nov 15 '18 at 12:12
  • @Cown hi are you certain about that? gw(config)#sh arp ? => % Unrecognized command, tested on IOS 15.2(4)M3 just now. – jonathanjo Nov 15 '18 at 12:19
  • Sorry not config mode, enable mode. – Cown Nov 15 '18 at 12:20
  • 2
    command | match somehing is used in Juniper. In Cisco it's command | i something – Andrey Prokhorov Nov 15 '18 at 12:23
  • 1
    Ok i found the error i think, you need to use show ip arp | in 192.168.2.2 – Cown Nov 15 '18 at 12:40
4

For most varieties of Cisco IOS. (For the ISR 4321 it appears the answer is different, see later.)

To start with matching, use | begin:

gw>show arp | begin 192.168.0.32
Internet  192.168.0.32            0   90fb.a630.1234  ARPA   Vlan1
Internet  192.168.0.36            0   0004.2012.4321  ARPA   Vlan1
...

There are a few varieties:

gw>show arp | ?
  begin    Begin with the line that matches
  count    Count number of lines which match regexp
  exclude  Exclude lines that match
  format   Format the output using the specified spec file
  include  Include lines that match
  section  Filter a section of output

But there's something funny going on if you can't do the basic:

gw>show arp 192.168.0.32
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.0.32            0   90fb.a630.1234  ARPA   Vlan1

What model and version are you using?

ISR-4321

Per Cown's comment:

Ok i found the error i think, you need to use show ip arp | in 192.168.2.2

Packet tracer

As suggested by Cown in comments, if you're using Packet Tracer, not a real router, you have to be in enable mode.

  • Yeah same output i get here, just a bit more options, since it's a 6500 series. – Cown Nov 15 '18 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.