2950 monitor session

May 05, 2006 3 Replies

I am trying to setup a sniffer on a 2950. When I do this the monitoring machine loses network connection on port 12. This machine does SNMP monitoring too, so it needs full network access.



monitor session 1 source interface Fa0/5 both monitor session 1 destination interface Fa0/12



Will I need to install a second NIC to make this work?



Thanks, Lance



here is a show ver Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(9)EA1, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2002 by cisco Systems, Inc. Compiled Wed 24-Apr-02 06:57 by antonino Image text-base: 0x80010000, data-base: 0x804E8000



ROM: Bootstrap program is CALHOUN boot loader



icss-2950-12 uptime is 1 hour, 9 minutes System returned to ROM by power-on System image file is "flash:/c2950-i6q4l2-mz.121-9.EA1.bin"



cisco WS-C2950-12 (RC32300) processor (revision F0) with 20815K bytes of memory. Processor board ID FHK0635Y14J Last reset from system-reset Running Standard Image



12 FastEthernet/IEEE 802.3 interface(s)

I believe at the end of the destination you need the 'ingress' stated.

monitor session 1 dest int fa0/12 ingress

Check the docs to be sure though, not sure if that is enabled on the switch/version you are running.

Ideally you would install another $20 nic in the machine. That way your sniffer won't have to differentiate between the target traffic and its own traffic. The other reply contains an optional method.

J

Lance,

The answer is yes, you will need a second NIC. Unfortunately, that's just the way it works: when you configure a port for monitoring with the SPAN feature, that port receives copy of the traffic to/from the source port and nothing else... it is no longer an "operational" port. I believe it is removed from the switch's forwarding table (no MAC address table maintained for the port = no traffic forwarded to the monitor box's MAC address), and, if I recall right, the state of that port while monitoring will show as shutdown or similar.

I hit that roadblock myself some time ago. I was not able to ssh into a Linux box and run tcpdump (as planned) while having SPAN turned on. So I either had to use console access while monitoring (not an option in my scenario) or get around it with the following, highly cumbersome procedure (assumes Unix/Linux box):

- ssh into the monitoring box; - run tcpdump with the nohup command (nohup tcpdump {options + filtering logic} &), making tcpdump write to a binary file; - exit the ssh session; - configure SPAN on the switch; - run whatever test you need to run (so traffic is captured by the tcpdump process); - remove SPAN configuration on switch; - ssh back into monitoring box and kill the tcpdump process; - analyze binary tcpdump capture file.

Honestly, I recommend getting a hub or second NIC, but if you are in a hurry as I was and did not have either at hand, then this may help you.

HTH,

James

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required