BCE-C712 Linux System Administration

0 of 74 lessons complete (0%)

TCP/IP Firewall and IP Masquerade

IP Accounting

You don’t have access to this lesson

Please register or sign in to access the course content.

IP accounting is a feature used in network devices, such as routers or layer 3 switches, to track the amount of data (in terms of packets or bytes) that passes through the device for specific IP addresses or protocols. It provides visibility into network traffic patterns, which can be useful for various purposes, including troubleshooting, monitoring, and billing. Here’s an overview of IP accounting:

Key Concepts:

  1. Traffic Tracking:
    • IP accounting records information about inbound and outbound traffic based on criteria like source and destination IP addresses, protocols, and ports.
  2. Data Recorded:
    • Information typically includes the number of packets, bytes, and duration of connections for each tracked session.
  3. Application:
    • IP accounting is often used for monitoring and analysis purposes. For example, an Internet Service Provider (ISP) might use it to bill customers based on their data usage.
  4. Limited Storage:
    • IP accounting data is usually stored in a limited buffer or log, so older information may be overwritten by newer data.

Configuration (Cisco Example):

On Cisco devices, IP accounting can be configured using the following steps:

  1. Access Global Configuration Mode:
enable configure terminal
  1. Enable IP Accounting:
ip accounting
  1. Specify the Access Control List (ACL):
    • Define an ACL to specify which traffic should be accounted for. For example:
access-list 101 permit ip any any
  1. Apply ACL to Interfaces:
    • Apply the ACL to the relevant interfaces where you want to track traffic:
interface GigabitEthernet0/0 ip accounting access-violations ip access-group 101 in

Viewing IP Accounting Information:

After configuration, you can view the IP accounting data:

show ip accounting

This command will display information about the traffic that matches the criteria defined in the ACL.

Clearing IP Accounting Data:

To clear the IP accounting data, you can use:

clear ip accounting


  • IP accounting can have a performance impact on the device, so it should be used judiciously.
  • It may not provide as detailed information as dedicated network monitoring tools.
  • Different vendors may have variations in how they implement IP accounting.

Keep in mind that IP accounting is just one tool in the network administrator’s toolkit. For comprehensive network monitoring and analysis, more advanced solutions and tools may be necessary.