How can I match conditions when I show arp?












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.










share|improve this question















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
















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.










share|improve this question















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














3












3








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.










share|improve this question
















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.







cisco arp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 12:39









Cown

6,50431030




6,50431030










asked Nov 15 '18 at 12:00









three-blocksthree-blocks

4407




4407




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


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









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



















  • 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

















You need to be in config mode, then sh arp | in 192.168.2.2

– Cown
Nov 15 '18 at 12:12





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





@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





Sorry not config mode, enable mode.

– Cown
Nov 15 '18 at 12:20




2




2





command | match somehing is used in Juniper. In Cisco it's command | i something

– Andrey Prokhorov
Nov 15 '18 at 12:23





command | match somehing is used in Juniper. In Cisco it's command | i something

– Andrey Prokhorov
Nov 15 '18 at 12:23




1




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





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










1 Answer
1






active

oldest

votes


















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.






share|improve this answer


























  • 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








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "496"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f54735%2fhow-can-i-match-conditions-when-i-show-arp%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









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.






share|improve this answer


























  • Yeah same output i get here, just a bit more options, since it's a 6500 series.

    – Cown
    Nov 15 '18 at 12:21
















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.






share|improve this answer


























  • Yeah same output i get here, just a bit more options, since it's a 6500 series.

    – Cown
    Nov 15 '18 at 12:21














4












4








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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 15 '18 at 12:44

























answered Nov 15 '18 at 12:16









jonathanjojonathanjo

11.8k1936




11.8k1936













  • Yeah same output i get here, just a bit more options, since it's a 6500 series.

    – Cown
    Nov 15 '18 at 12:21



















  • Yeah same output i get here, just a bit more options, since it's a 6500 series.

    – Cown
    Nov 15 '18 at 12:21

















Yeah same output i get here, just a bit more options, since it's a 6500 series.

– Cown
Nov 15 '18 at 12:21





Yeah same output i get here, just a bit more options, since it's a 6500 series.

– Cown
Nov 15 '18 at 12:21


















draft saved

draft discarded




















































Thanks for contributing an answer to Network Engineering Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f54735%2fhow-can-i-match-conditions-when-i-show-arp%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues