Chris14
Posts: 3
Joined: Wed Dec 02, 2015 1:14 pm

Raspi + BandwidthD + 2-NIC: loosing connection on both NIC

Wed Dec 02, 2015 1:48 pm

Hello,

my goal is: Monitor the internet-bandwidth usage in my home-network. (to detect bandwidth-monsters)

problem: i am using a fritzbox 7390. as router, so i can see the complete used bandwidth, but not per IP.

Discarded Solution: Capture.html + Wireshark; Seems to work theoretically, but i would have to let a computer running to grap the capture.html file from the box. Unfortunately this crashes and leaves corrupted files now and then.

Raspberry Solution (Raspi+2NIC+ Bandwidthd +PortMirroring):
The Idea:
* The Router is connected to a cisco SG200-8, Port5
* The RaspiETH0 is connected to a cisco SG200-8, Port8
* The RaspiWLAN0 is connected to the FritzBox Wlan Accesspoint (to access the raspi via network)

MyProblem:
* Whenever I enable the Portmirroring on the Cisco: (Mirror Source Port5 to Destination Port8). The Networkconnection for the WLAN0 is gone.
That ETH0 under 192.168.2.150 is not reachable anymore is to be expected, but why does the WLAN0 also looses connection on 192.168.2.6

my interfaces:

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
# source-directory /etc/network/interfaces.d
#auto wlan0 eth0

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.2.150
netmask 255.255.255.0
broadcast 192.168.2.255
network 192.168.2.0
gateway 192.168.2.1

auto eth1
iface eth1 inet static
address 192.168.2.153
netmask 255.255.255.0
broadcast 192.168.2.255
network 192.168.2.0
gateway 192.168.2.1

allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
address 192.168.2.6
netmask 255.255.255.0
broadcast 192.168.2.255
network 192.168.2.0
gateway 192.168.2.1
wpa_supplicant.conf

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="SSIDSSID"
psk="SECRETSECRET"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

I used this as guide: https://community.spiceworks.com/how_to ... ur-network
I used this for port mirroring, Page 78ff PDF

Thanks Chris

Chris14
Posts: 3
Joined: Wed Dec 02, 2015 1:14 pm

Re: Raspi + BandwidthD + 2-NIC: loosing connection on both N

Fri Dec 04, 2015 4:50 pm

Hello again,

I removed the Wifi Card to get away from the wpa-thingy. And replaced it with a USB-Ethernet Stick.
The stick is up and running and
ifconfig says:
but both NIC disappear when i turn Port Mirroring on!

Code: Select all

pi@raspberrypi ~ $ ifconfig
eth0      Link encap:Ethernet  Hardware Adresse b8:27:eb:c0:f5:53
          inet Adresse:192.168.2.150  Bcast:192.168.2.255  Maske:255.255.255.0
          inet6-Adresse: *secret*a4/64 Gültigkeitsbereich:Global
          inet6-Adresse: *secret*53/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX packets:1093999 errors:0 dropped:2391 overruns:0 frame:0
          TX packets:862 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:1017443887 (970.3 MiB)  TX bytes:101859 (99.4 KiB)

eth1      Link encap:Ethernet  Hardware Adresse 00:e0:7c:c8:45:65
          inet Adresse:192.168.2.153  Bcast:192.168.2.255  Maske:255.255.255.0
          inet6-Adresse: *secret*68/64 Gültigkeitsbereich:Global
          inet6-Adresse: *secret*a7/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX packets:7551 errors:0 dropped:265 overruns:0 frame:0
          TX packets:186 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:627597 (612.8 KiB)  TX bytes:26192 (25.5 KiB)

lo        Link encap:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:65536  Metrik:1
          RX packets:264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:264 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:25774 (25.1 KiB)  TX bytes:25774 (25.1 KiB)

Return to “Beginners”