Val:~$ whoami

I am Val Glinskiy, network engineer specializing in data center networks. TIME magazine selected me as Person of the Year in 2006.

Search This Blog

Saturday, February 04, 2012

ip accounting-list

Cisco has interface level command "ip accounting" which records number of bytes and packets passed through the router. If you want to count traffic only for specific IP address, you need to use "ip accounting-list" command. There seems to be a tiny bug in context help in 12.4(15)T14:

R2(config)#ip accounting-list 1.1.1.1 ?
  A.B.C.D  IP address mask

Note that context help says you need to enter address mask. 
R2(config)#ip accounting-list 1.1.1.1 255.255.255.255

After checking
R2(config)#do sho run | i accounting
ip accounting-list 0.0.0.0 255.255.255.255

That's not what I entered. In reality, you are supposed to enter wildcard mask, which makes more sense. Specifying ACL number or name would have made even more sense. So, let's fix it:

R2(config)#no ip accounting-list 0.0.0.0 255.255.255.255
R2(config)#ip accounting-list 1.1.1.1 0.0.0.0
R2(config)#interface fa 0/0
R2(config-if)#ip accounting

and test it. Traffic from R3 to 192.168.12.1 and 1.1.1.1 must pass through R2's Fa0/0 interface: 

R3#ping 192.168.12.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/58/120 ms
R3#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/47/88 ms

R2#sho ip account
   Source           Destination              Packets               Bytes
 192.168.23.3     1.1.1.1                          5                 500

As you can see from the output above, only pings to 1.1.1.1 got counted.

11 comments:

  1. They introduce certain modules and observe the activity through Geolocation by IP modules, with the goal that their on-page substance and inclinations can be tweaked to all the more likely suit the requirements of online guests. Windows USA

    ReplyDelete
  2. VPN is exceptionally advantageous, yet it isn't important in the event that you need remote customers to interface with you Linux or Unix server. how to do a dns flush

    ReplyDelete
  3. They will be straightforwardly keen on you. You won't feel yourself in the situation of offering them into utilizing you or your firm. Keep in mind, the accounting business depends on trust.Tax Preparation San Diego

    ReplyDelete
  4. The blog is created in essential English with no longing towards composing.
    http192.168.0.1

    ReplyDelete
  5. Your website is very beautiful or Articles. I love it thank you for sharing for everyone. js bank car loan - meezan bank car ijarah

    ReplyDelete
  6. Today, I was just browsing along and came upon your blog. Just wanted to say good blog and this article helped me a lot, due to which I have found exactly I was looking. https://192-168-i-i.com/

    ReplyDelete
  7. In some regard, it gives the customers the recognition that they are getting a more prominent worth. They feel if the accountant is bringing about less overhead, maybe some portion of the reserve funds is being passed on to the customers.https://kca.sg/cheap-monthly-sme-accounting-services-for-your-business-needs/

    ReplyDelete
  8. Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us. Arizona tax preparation

    ReplyDelete
  9. The outcome is what is named a fair arrangement of records, identified with an accounting condition.payroll singapore

    ReplyDelete
  10. Attractive, post. I just stumbled upon your weblog and wanted to say that I have liked browsing your blog posts. After all, I will surely subscribe to your feed, and I hope you will write again soon! https://192-168-i-i.com

    ReplyDelete