特殊:Badtitle/NS100:NetworkMonitoringBridge
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/NetworkMonitoringBridge }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/af | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Afrikaans| [[::NetworkMonitoringBridge/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ar | • {{#if: UbuntuHelp:NetworkMonitoringBridge|العربية| [[::NetworkMonitoringBridge/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/az | • {{#if: UbuntuHelp:NetworkMonitoringBridge|azərbaycanca| [[::NetworkMonitoringBridge/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/bcc | • {{#if: UbuntuHelp:NetworkMonitoringBridge|جهلسری بلوچی| [[::NetworkMonitoringBridge/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/bg | • {{#if: UbuntuHelp:NetworkMonitoringBridge|български| [[::NetworkMonitoringBridge/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/br | • {{#if: UbuntuHelp:NetworkMonitoringBridge|brezhoneg| [[::NetworkMonitoringBridge/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ca | • {{#if: UbuntuHelp:NetworkMonitoringBridge|català| [[::NetworkMonitoringBridge/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/cs | • {{#if: UbuntuHelp:NetworkMonitoringBridge|čeština| [[::NetworkMonitoringBridge/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/de | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Deutsch| [[::NetworkMonitoringBridge/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/el | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Ελληνικά| [[::NetworkMonitoringBridge/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/es | • {{#if: UbuntuHelp:NetworkMonitoringBridge|español| [[::NetworkMonitoringBridge/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/fa | • {{#if: UbuntuHelp:NetworkMonitoringBridge|فارسی| [[::NetworkMonitoringBridge/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/fi | • {{#if: UbuntuHelp:NetworkMonitoringBridge|suomi| [[::NetworkMonitoringBridge/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/fr | • {{#if: UbuntuHelp:NetworkMonitoringBridge|français| [[::NetworkMonitoringBridge/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/gu | • {{#if: UbuntuHelp:NetworkMonitoringBridge|ગુજરાતી| [[::NetworkMonitoringBridge/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/he | • {{#if: UbuntuHelp:NetworkMonitoringBridge|עברית| [[::NetworkMonitoringBridge/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/hu | • {{#if: UbuntuHelp:NetworkMonitoringBridge|magyar| [[::NetworkMonitoringBridge/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/id | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Bahasa Indonesia| [[::NetworkMonitoringBridge/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/it | • {{#if: UbuntuHelp:NetworkMonitoringBridge|italiano| [[::NetworkMonitoringBridge/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ja | • {{#if: UbuntuHelp:NetworkMonitoringBridge|日本語| [[::NetworkMonitoringBridge/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ko | • {{#if: UbuntuHelp:NetworkMonitoringBridge|한국어| [[::NetworkMonitoringBridge/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ksh | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Ripoarisch| [[::NetworkMonitoringBridge/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/mr | • {{#if: UbuntuHelp:NetworkMonitoringBridge|मराठी| [[::NetworkMonitoringBridge/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ms | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Bahasa Melayu| [[::NetworkMonitoringBridge/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/nl | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Nederlands| [[::NetworkMonitoringBridge/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/no | • {{#if: UbuntuHelp:NetworkMonitoringBridge|norsk| [[::NetworkMonitoringBridge/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/oc | • {{#if: UbuntuHelp:NetworkMonitoringBridge|occitan| [[::NetworkMonitoringBridge/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/pl | • {{#if: UbuntuHelp:NetworkMonitoringBridge|polski| [[::NetworkMonitoringBridge/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/pt | • {{#if: UbuntuHelp:NetworkMonitoringBridge|português| [[::NetworkMonitoringBridge/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ro | • {{#if: UbuntuHelp:NetworkMonitoringBridge|română| [[::NetworkMonitoringBridge/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/ru | • {{#if: UbuntuHelp:NetworkMonitoringBridge|русский| [[::NetworkMonitoringBridge/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/si | • {{#if: UbuntuHelp:NetworkMonitoringBridge|සිංහල| [[::NetworkMonitoringBridge/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/sq | • {{#if: UbuntuHelp:NetworkMonitoringBridge|shqip| [[::NetworkMonitoringBridge/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/sr | • {{#if: UbuntuHelp:NetworkMonitoringBridge|српски / srpski| [[::NetworkMonitoringBridge/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/sv | • {{#if: UbuntuHelp:NetworkMonitoringBridge|svenska| [[::NetworkMonitoringBridge/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/th | • {{#if: UbuntuHelp:NetworkMonitoringBridge|ไทย| [[::NetworkMonitoringBridge/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/tr | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Türkçe| [[::NetworkMonitoringBridge/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/vi | • {{#if: UbuntuHelp:NetworkMonitoringBridge|Tiếng Việt| [[::NetworkMonitoringBridge/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/yue | • {{#if: UbuntuHelp:NetworkMonitoringBridge|粵語| [[::NetworkMonitoringBridge/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/zh | • {{#if: UbuntuHelp:NetworkMonitoringBridge|中文| [[::NetworkMonitoringBridge/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/zh-hans | • {{#if: UbuntuHelp:NetworkMonitoringBridge|中文(简体)| [[::NetworkMonitoringBridge/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NetworkMonitoringBridge | UbuntuHelp:NetworkMonitoringBridge | {{#if: | :}}NetworkMonitoringBridge}}/zh-hant | • {{#if: UbuntuHelp:NetworkMonitoringBridge|中文(繁體)| [[::NetworkMonitoringBridge/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:NetworkMonitoringBridge|:NetworkMonitoringBridge|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :NetworkMonitoringBridge/zh | | {{#ifexist: NetworkMonitoringBridge/zh | | {{#ifeq: {{#titleparts:NetworkMonitoringBridge|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:NetworkMonitoringBridge|1|-1|}} | zh | | }}
Introduction
This document outlines the creation of a network monitoring bridge on Ubuntu 6.06 (Dapper). The bridge can be transparently plugged into any segment of a local subnet to analyze network traffic without disturbing network services. ntop is used for monitoring; it provides comprehensive statistics on network usage and throughput. For more information on what a bridge is see the Linux Documentation Project Bridging Howto.
Sample uses of the network monitor
- Analyze connection problems to local database server
Network configuration: LAN <=> switch <=> Database server Network with monitoring: LAN <=> switch <=> Network Monitoring Bridge <== PATCH CABLE ==> Database server 2. Analyze network usage on a subnet at our University Network configuration: INTERNET <=> Gateway firewall <=> Switch <=> Local network Computers Network with monitoring: INTERNET <=> Gateway firewall <== PATCH CABLE ==> Network Monitoring Bridge <=> Switch <=> Local network Computers
Prerequisites
Begin with a fairly powerful PC with enough RAM, 128MB or more. Install two 100mb/s network cards on this machine and obtain a Patch cable. You may begin with either a Desktop or Server installation of Ubuntu 6.06 (Dapper). See InstallingSoftware for more information.
Install Software
Install bridge utilities from Main repository
sudo apt-get install bridge-utils
Install ntop from Universe repository
sudo apt-get install ntop
/!\ The ntop install will give some errors. This is ok. We will fix it later! /!\
Configure the Bridge
Edit /etc/network/interfaces to reflect your network topology. The following example configuration configures the bridge via DHCP. You could easily modify the line iface bridge01 inet dhcp
to be iface bridge01 192.168.1.2 netmask 255.255.255.0 up
for a static IP address.
Sample /etc/network/interfaces file
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto bridge01 iface bridge01 inet dhcp pre-up ifconfig eth0 down pre-up ifconfig eth2 down pre-up brctl addbr bridge01 pre-up brctl addif bridge01 eth0 pre-up brctl addif bridge01 eth2 pre-up ifconfig eth0 0.0.0.0 pre-up ifconfig eth2 0.0.0.0 post-down ifconfig eth0 down post-down ifconfig eth2 down post-down ifconfig bridge01 down post-down brctl delif bridge01 eth0 post-down brctl delif bridge01 eth2 post-down brctl delbr bridge01
Restart networking
sudo /etc/init.d/networking restart
Configure ntop
Edit ntop configuration
sudo nano /var/lib/ntop/init.cfg
Change the INTERFACES line to the name of your bridge. Something like...
INTERFACES="bridge01"
configure NTOP to recognize your local subnet
sudo nano /etc/default/ntop
Change the GETOPTS variable to something like...
GETOPTS="--local-subnets=192.168.1.0/24"
Set the admin password for NTOP (Enter the password for your sudo account)
sudo ntop --set-admin-password
Restart NTOP
sudo /etc/init.d/ntop restart
Test ntop by browsing to http://localhost:3000
Install and begin monitoring
- To begin monitoring choose a place on your network that you would like to monitor as shown in the examples above
- Plug the patch cable to one of the network devices on the Network Monitoring Bridge
- Unplug the network cable from the computer you would like to monitor and plug the cable into the other network device of the Network Monitoring Bridge
- Plug free end of the patch cable to the computer that will be monitored
- Restart networking on the Network Monitoring Bridge
sudo /etc/init.d/networking restart
View network traffic statistics at http://ip_address_of_network_monitor:3000
Additional Information
Another description of how to enable Connection Bridging, including Internet Connection Bridging, is available at NetworkConnectionBridge. `It would be great for a knowledgeable person to assist with integrating both of these pages as they are closely related, but slightly divergent.`