Pages

Ads 468x60px

Thursday, August 11, 2011

NTOP වලට interface එකක් add කරමු.

කලින් වතාවක කිව්වනෙ ubuntu ( linux ) වලට ntop දාන විදිහ. මම අද කියන්න යන්නෙ එහෙම දාගත්ත ntop වලට අලුතින් interface එකක් දාන විදිහ. කලින් මම ntop ගැන දාපු post මෙතනින් බලන්න. මම මුලින්ම ntop වල interface ගැන පොඩ්ඩක් කියන්නම් ඒ ගැනත් පොඩි idea එකක් ගන්න ඕන නිසා. සාමන්‍යයෙන් ntop install කල ගමන් ඒකෙන් ගන්නෙ ntop run වෙන server එකේ eth0 එක තමයි default interface එක විදිහට. අපිට මේක වෙනස් කරල අපේ network එකේ තියෙන router වල interface දීලා ඒ interface වලට වැදිල තියෙන network එකේ host වල performance monitor කරගන්න පුලුවන්.  කලින් වතාවකදි මම කිව්වනෙ ntop වල features ගොඩක් තියෙනව කියලා. ඒ හුගක් features අපි පාවිච්චි කරන්න නම් ඒවා configure කරන්න ඕනෙ. හොදයි, අපිට අලුතින් interface එකක් දාන්න නම් router එකට access තියෙන්නත් ඕනෙ. ඊට කලින් install කරගත්ත ntop වලට අලුතින් interface එකක් දාන්න ඕනෙ. ඒකට පහතින් තියෙන instruction ටික අනුගමනය කරන්න.
                මුලින්ම ntop run කරලා Plugins -> Netflow -> View/Configure වලට යන්න. දැන් netflow device configuration යටතේ තියෙන add netflow device click කරන්න.





                දැන් එන page එකේ netflow device එකට කැමති නමක් දීලා set inteface name click කරන්න. සාමාන්‍යයෙන් මේකට ටිකක් තේරුමක් තියෙන නමක් දෙනවනම් හොදයි.
                ඊට පස්සෙ local collecter udp port වලට udp port එකක් දෙන්න ඕනෙ. මේකට මම දුන්නෙ 9996. හැබැයි මේකෙ කියන විදිහට 2055 දුන්නත් කමක් නෑ. ඊට පස්සෙ set port click කරන්න.
                ඊට පස්සෙ virtual netflow interface network address එකට ඔයාගෙ network එක දීලා. set interface address click කරන්න.


               
                ඊට පස්සෙ flow aggregation none දීලා debug off කරන්න.
                හරි දැන් ntop එකේ configuration ටික ඉවරයි. දැන් තියෙන්නෙ router එකේ netflow activate කරන්න. මෙකට router එකට log වෙන්න ඕනෙ. ඊට පස්සෙ පහලින් තියෙන command ටික පාවිච්චි කරලා ඒකත් කරගන්න පුලුවන්.

router#enable
Password:
router#configure terminal
router(config)#interface <interface>

      මෙතනදි මගෙ interface number එක නම් fa0.

router(config-if)#ip route-cache flow
router(config-if)#exit
router(config)#ip flow-export destination <server_ip> <udp_port_no>

      මෙතනදි දෙන්න ඕනෙ අපේ server එකේ ip එකයි අපි කලින් දීපු udp port එකයි.

router(config)#ip flow-export source <interface>
router(config)#ip flow-export version 5
router(config)#ip flow-cache timeout active 1
router(config)#ip flow-cache timeout inactive 15
router(config)#snmp-server ifindex persist
router(config)#exit
router#write
router#show ip flow export
router#show ip cache flow
      ඔක්කොම හරි. දැන් තියෙන්නෙ Plugins -> Netflow -> Statistics ගිහින් බලන්න ඒ interface එකට අදාල host වල විස්තර. කරල බලලා comment එකක් දාන්න අමතක කරන්න එපා. මම ගිහින් එන්නම් එහෙනම් ....

0 comments:

Post a Comment