Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Tcpdump on a Cisco Router?

Posted on 2004-10-25
10
Medium Priority
?
18,789 Views
Last Modified: 2010-07-12
I want to be able to watch the packets as they flow through my router similar to tcpdump in *nix.  Is there any such command that can allow me to do this?  I am running IOS 12.2(17a).

Thanks guys and gals.
0
Comment
Question by:mpathetiq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 79

Expert Comment

by:lrmoore
ID: 12404736
Try "debug ethernet-interface"
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 1400 total points
ID: 12404740
You could use "debug ip packet detail"

You can also limit the output with a ACL

access-list 1 permit 144.1.0.0 0.0.255.255
debug ip packet  1 detail

Will only show ip traffic sourced from the 144.1.0.0 network

You can also use an extended ACL to further limit the output.

This may cause a bit of a load on the CPU though and you will need to disable fast-switching.

-Don
0
 

Author Comment

by:mpathetiq
ID: 12404802
i did "debug ip packet detail"  but i saw no packets.  i know there was data flowing through but saw no packets.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:mpathetiq
ID: 12404876
i also did "debug ethernet-interface"

both commands indicate that the debugging is on, but i don't know how to retrieve that data.
0
 
LVL 79

Assisted Solution

by:lrmoore
lrmoore earned 600 total points
ID: 12404941
Are you using the router's console port, or telnet session?
If using telnet session, issue "term mon" command
0
 
LVL 79

Expert Comment

by:lrmoore
ID: 12404953
Else, be sure to allow debug to the console
  router(config)#logg console debug
0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 1400 total points
ID: 12409656
And don't forget to disable fast switching.

In interface configuration mode, "no ip route-cache"

-Don
0
 
LVL 3

Expert Comment

by:MaxQ
ID: 12445943
You really don't want to do "debug ip packet detail" if you're connected via telnet/ssh and are logging to anything other than the internal buffer.  Otherwise the debug will capture the output going to the screen and/or syslog server and you'll get this nifty loop loop of doom as the debug causes more packets to dump from the debug.  Even going to the buffer (which will scroll like crazy if the router is moving much traffic at all) this will still add load to the router's CPU so be careful with this.  If you have a way to narrow down what you're looking for make an ACL to only match those packets, and put the ACL number after the debug command as in "debug ip packet detail 122".  This will give you less output to dig through and limit the overhead of logging every packet.

Finally, if you're really feeling brave or are doing this in a lab where you can take risks, there is an undocumented mode in most IOS version called 'debug ip packet dump" that will dump the entire contents of the packets, as tcpdump would.  All the stuff above about overhead, etc. goes triple for this.  The reason it's undocumented is so people don't complain to Cisco if they crash their router with this command.
0
 

Expert Comment

by:alexcf
ID: 12550337
On your transit port you could setup port monitoring depending on how much traffic is actually going out.

(config)# monitor session 1 <destination/source> 1 int fa 0/bla

http://www.cisco.com/en/US/products/hw/switches/ps4324/products_configuration_guide_chapter09186a00801d616e.html

Then you can just run tcpdump or ethereal on the Linux machine you send the mirrored traffic to. Worked very well when I needed to monitor a machine which was suspected of illegal activity.
0
 

Expert Comment

by:umasscscf
ID: 33188846
How do you turn off the debugging???
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It happens many times that access list (ACL) have to be applied to outgoing router interface in order to limit some traffic.This article is about how to test ACL from the router which is not very intuitive for everyone. Below scenario shows simple s…
We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question