Cisco Router Commands

Scrapbook of useful cmd for cisco routers

Make a router a tftp server
Router1#configure t
Router1(config)#tftp-server ?
Router1(config)#tftp-server flash: ?
Router1(config)#tftp-server flash:/c2500-js-l.122-10b

Read text file in flash
Router1#more flash:RTPReport.txt

Ftp client
ip ftp username alexis
ip ftp password alexispass
copy ftp flash:

copy flash:your-ios ftp://alexis:alexispass@

check Md5
verify /md5 flash:c3900e-universalk9-mz.SPA.152-4.M3.bin

Do PCAP capture on a Router Interface
!access-list to filter only SIP messages (port 5060)
access-list 123 permit udp any any eq 5060
access-list 123 permit tcp any any eq 5060

!OR Use extended ACL with IP address
ip access-list extended WANSIDEACL
permit ip any host ! is IP address of the WAN interface
permit ip host any

!create profile
ip traffic-export profile SIP_PCAP_FILE mode capture
incoming access-list 123 !OR WANSIDEACL
outgoing access-list 123 !OR WANSIDEACL

! apply to an interface, default memory is 5M
interface GigabitEthernet0/1
ip traffic-export apply SIP_PCAP_FILE size 5242880

traffic-export interface GigabitEthernet0/1 clear
traffic-export interface GigabitEthernet0/1 start

!capture the problem
traffic-export interface GigabitEthernet0/1 stop

!Export the pcap file to a server
traffic-export interface GigabitEthernet0/1 copy
traffic-export interface GigabitEthernet0/1 copy ftp://alexis:alexis@


About Alexis Katsavras

Working as Freelance Cisco Unified Communications Consultant in the UK.