Category: Monitoring Traffic

Troubleshooting Cisco ASA 5500 Firewalls

How to view interfaces and descriptions?
#show nameif

How to remove the entire access list?
# clear config access-list <ACL-Name>
–There are many things you can delete with the clear config command, be careful with how you use this command.

How to view the interface name, IP address and state of the interface, similar to show ip int brief on a router?
# show interface ip brief
— The IP and Interface is backwards compared to a Cisco Router

How to find out what unit is the active and standby units in a HA pair?
# show failover
– This will tell you what unit is active and standby, it will also tell you if the standby unit is ready or not to become active. It will also tell you if the interfaces are monitor and if they are down.

How to view interface statistics and port status
# show interface gigabit <slot/port>
– This is very similar to “show interface” on a router or a switch

How to view line numbers and the hit counters on an access list?
# show access-list -> will show all access lists
# show access-list <ACL-NAME>

How to view information on Cooling fans, Power supplies, Temperature and Voltage
# show environment
***This is going to be different on different models

How to find the IP address a known IP address is NAT’d to?
# show xlate -> Shows all NAT translations
# show xlate | include <known IP address> -> Shows the NAT translation for a specific IP address
– This is very useful on Version 8.3 and above because the public and private IP’s are not together in the configuration. Part of it is up in the object groups, the rest is down in the NAT section.

How to view each connection going through the ASA?
# show conn

How to view the files on the flash card?
# show flash

How to view the IOS file the system will use on the next bootup?
# show bootvar

How to view CPU utilization and process information? ***command may vary by model and software release
# show cpu -> Shows 5 Second, 1 minute, and 5 minute average
# show processes [cpu-hog|cpu-usage|internals|memory] ->

Packet tracer is a great tool to see if a data flow is allowed through the firewall. This only works on Routed firewalls, it does not work in transparent mode. Cisco should get a pat on the back for this one!!

# packet-tracer input <incoming-interface> <Protocol-icmp|rawip|tcp|udp> <source-IP> <Source port> <Destination IP> <Destination port>

Example: #packet-tracer input inside tcp 192.168.1.1 1024 172.16.1.1 80
**Source port does not matter, I like to use 1024
Follow the output down the screen and it will tell you where it fails, or it will tell you it is allowed. Usually when it is dropped by ACL, it does not tell you what ACL is blocking it.

The ASA has a built in packet capture feature built into it. You can easily get a packet capture of any traffic flow going through the ASA.

1. Create your ACL with the specifics of what you are looking for

Access-list 100 permit tcp host <source ip> host <destination ip> eq port
Access-list 100 permit tcp host <destination ip> host <source ip> eq port

2. Create your capture’s and apply them to the inbound interface on the ASA

capture <capture name> access-list <acl name/number> buffer 700000 interface <interface traffic is entering> packet-length <packet length: ex:1518)

3. Have user perform a test
4. Copy the capture to your PC

Use a web browser and go to https://<ASA’s IP>/capture/<capture name>/pcap

It will prompt you to log in, then to download the file.

You can look at the output on the ASA with the “show capture <capture-name>” command.

*** I recommend creating your ACL for traffic in both directions. If you don’t, you will only see traffic in one direction.

Creating a SPAN session on a Nexus 9K

Create SPAN session
=================================
9kswitch# conf t
9kswitch(config)# monitor session 1

Configure destination port (destination cannot be a FEX port or a Port-channel!)
=================================
9kswitch# conf t
9kswitch(config)# interface eth 1/15
9kswitch(config-if)# switchport monitor
9kswitch(config-if)# exit
9kswitch(config)# monitor session 1
9kswitch(config-monitor)# destination interface eth 1/15

Configure source port (or VLAN)
=================================
9kswitch(config-monitor)# source interface eth 1/10
9kswitch(config-monitor)# source interface eth 1/11
or
9kswitch(config-monitor)# source vlan x

Activate a SPAN session
==================================
9kswitch(config)# no monitor session 1 shut

Display SPAN session
==================================
9kswitch# show monitor
or
9kswitch# show monitor session 1

conf t
monitor session 1
exit
int eth 1/15
switchport monitor
exit
monitor session 1
destination int eth 1/15
source int eth 1/10
source int eth 1/11
exit
no monitor session 1 shut

Cisco Nexus 9000: Configuring SPAN

Handy NetFlow Commands

show ip flow interface

displays the NetFlow configuration for an interface

show ip cache flow

Verify that Netflow is operational and display summary of NetFlow statistics.

show ip cache verbose flow

Used to verify that NetFlow is operational and to display the detailed summary of NetFlow statistics.

show ip flow export

Use this command to display statistics for the NetFlow data export, including statistics for the main cache and for all other enabled caches.

show ip flow export template

This command is used to display statistics for the NetFlow data export (such as the template time-out rate and the refresh rate) for template-specific configurations.

NetFlow Configuration Guide

Using NBAR to view Traffic Protocols on your network.

NBAR examines the traffic on a router interface and associates it with an application. This is done by way of mapping ports to Protocols.  In addition it also recognises traffic without a standard port number, useful for things like P2P traffic.

What would you use this for?

If you are trying to identify traffic on an interface for the purpose of applying QoS polices to it.

How does it all work?

show ip nbar protocol-discovery; or

show ip nbar protocol-discovery top-n 10 (shows you the top 10 protocols)

show ip nbar protocol-discovery stats max-bit-rate top-n (show the top protocols by max bit rate)

If you're not making mistakes, then you're not doing anything.
%d bloggers like this: