Tomasz Wendlandt

Avatar

Tech blog

NBAR HOWTO

Krótkie HOWTO, jak uruchomić NBAR (Network-Based Application Recognition) na Cisco. Konfigurację zaczynamy od uruchomienia NBAR na interesującym nas interfejsie, np. takim który jest naszym wyjściem na świat.

# conf t
(config)# int gi0
(config-if)# ip nbar protocol-discovery

NBAR standardowo nie rozpoznaje połączeń p2p takich jak bittorrent czy eDonkey dlatego z cisco.com (wymagany dostęp do CCO) zasysamy PDLMy (Packet Description Language Module) na serwer TFTP i wrzucamy je na router.

# copy tftp flash

Weryfikujemy czy PDLM zgrał się na urządzenie

# dir
Directory of flash:/
1 -rw- 15944820 xxx.xxx.xxx.bin
2 -rw- 3148 Aug 29 2006 15:42:55 +02:00 bittorrent.pdlm
3 -rw- 3545 Aug 29 2006 15:54:34 +02:00 eDonkey.pdlm16252928 bytes total (301220 bytes free)

Pliki PDLM pomogą rozpoznać połączenia bittorrenta i eDonkeya. Z ciekawostek od IOS Release 12.4T, BitTorrent PDLM jest natywnie w systemie. Następnie podpinamy PDLMy do IOSa

(config)# ip nbar pdlm bittorrent.pdlm
(config)# ip nbar pdlm eDonkey.pdlm

Sprawdzamy czy się zgadza

# sh ip nbar pdlm
The following PDLMs have been loaded :
bittorrent.pdlm
eDonkey.pdlm

Na koniec można dodać alias, który w prosty sposób pokaże nam 10 najbardziej “aktywnych” protokołów

(config)# alias exec traffic sh ip nbar protocol-discovery stats bit-rate top-n 10

# traffic
GigabitEthernet0
Input Output
Protocol 5 minute bit rate (bps) 5 minute bit rate (bps)
———————— ———————— ————————
http 304000 3117000
secure-http 100000 801000
ssh 36000 134000
smtp 20000 66000
secure-pop3 70000 0
dns 19000 9000
icmp 6000 7000
pop3 0 1000
ftp 0 0
napster 0 0
unknown 2850000 976000
Total 3405000 5111000

I jeszcze info ze strony Cisco http://www.cisco.com/warp/public/63/nbar_acl_codered.shtml

“NBAR is not configurable on the following logical interfaces:
- Fast EtherChannel
- Interfaces where tunneling or encryption is used
- VLANs
- Dialer interfaces
- Multilink PPP
NBAR is configurable on VLANs as of Cisco IOS Release 12.1(13)E, but supported in the software switching path only. “

2 Comments, Comment or Ping

  1. alig

    powinno byc (config)#ip nbar pdlm bittorrent.pdlm itd.

  2. juggler

    Tak oczywiscie nalezy to wykonywac w trybie konfiguracyjnym, jak wszystkie polecenia ktore chcemy wprowadzic do konfiguracji. Poprawiam wpis, dzieki za wrocenie uwagi.

Reply to “NBAR HOWTO”

Poznań

  • Cloud and Visibility OK
  • Temperature: 10°C
  • Visibility: 10km
  • Clouds: Cloud and Visibility OK
  • Wind: E at 9 km/h
  • Barometer: 1014 hPa
  • Humidity: 87.4%
  • Sunrise: 8:53 GMT+2
  • Sunset: 21:00 GMT+2