Router Ip Accounting

요건 ip accounting이라고 하는 것입니다.
즉, 누가 어디를 얼마나 접속하는지 packet갯수와Byte수를 조사할 때 쓰는 것이지요.
물론 RMON이나 Proxy를 사용하면 자세히 볼 수 있지만,
cisco router에서의 ip accounting은 간단하게 어디서든지특별할 설치없이 조사할 수
있다는 장점이 있습니다.

설정하지 않고 사용할때

예)
router#
router#
router#
router#sh acc?
access-expression  access-lists  accounting  

router#sh accou
router#sh accounting ?
  <cr>

router#sh accounting
router#  
router#
router#
router#sh ip acc?
access-lists  accounting  

router#sh ip account
router#sh ip accounting ?
  access-violations  show access violations in accounting database
  checkpoint         The checkpointed IP accounting database
  output-packets     show output packets in accounting database
  <cr>

router#sh ip accounting
   Source           Destination              Packets               Bytes
220.222.80.132   211.198.96.179                1402               81210
220.222.80.125   211.55.11.223                   46               26325
220.222.80.1     203.231.35.20                    4                 242
220.222.80.132   203.252.3.70                     8                 369
220.222.80.92    129.6.15.28                      6                 248
220.222.80.1     211.35.96.48                     2                 142

Accounting data age is 1
router#
router#
router#
router#



그럼 어떻게 할까요?

1) 가장 중심경로가 되는 interface에 accounting설정
예) #config t
#interface ethernet 0
#ip accounting
#^z
#


2) 어떻게 되나 확인
예)
router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
router(config)#int e0
router(config-if)#ip acc?
access-group  accounting  

router(config-if)#ip accounting
router(config-if)#
router(config-if)#
router(config-if)#
router(config-if)#
router(config-if)#end
router#sh ip accounting
   Source           Destination              Packets               Bytes
220.222.80.23    203.255.112.4                    6                 368
211.198.96.179   220.222.80.132                 207              219950
220.222.80.132   211.198.96.179                2580              149921
220.222.80.125   211.55.11.223                   46               26325
220.222.80.119   203.255.118.14                  26                2104
203.235.118.101  220.222.80.23                    2                 234
220.222.80.23    203.235.118.101                119               14545
203.231.35.20    220.222.80.1                    30                2401
220.222.80.1     203.231.35.20                   22                2666
220.222.80.132   203.252.3.70                    16                 738
220.222.80.1     210.120.128.222                  1                  62
220.222.80.1     210.106.255.188                  1                 103
168.126.63.1     220.222.80.1                     1                 108
220.222.80.1     168.126.63.1                     1                  62
134.75.30.1      220.222.80.1                     1                 108
220.222.80.1     134.75.30.1                      1                  62
202.30.50.50     220.222.80.1                     1                 108
220.222.80.1     202.30.50.50                     1                  62
220.222.80.92    129.6.15.28                      6                 248
220.222.80.3     203.247.159.31                 219              238978
147.47.1.1       220.222.80.1                     1                 108
220.222.80.1     147.47.1.1                       1                  62
220.222.80.23    203.235.118.226                 10                3077
220.222.80.1     211.35.96.48                     3                 213
220.222.80.23    203.235.118.228                 28                2911
203.241.132.60   220.222.80.1                     1                  62
220.222.80.1     203.241.132.60                   1                  62
220.222.80.23    211.169.242.21                   8                 633
220.222.80.1     211.35.96.31                     1                 103
211.35.96.31     220.222.80.1                     2                 135

Accounting data age is 2
router#

이렇게 모두다 나타나죠.
라우터의 processor나 memory를 많이 차지하지는 않더군요.

목적지 address가 어딘지는 nslookup이나 직접 접속해 보면간단히 알 수 있죠.
여러분이 접속하시는 곳도 마음만 먹으면 추적할 수 있다는것이죠.