New IT forum
27 June 2022, 12:19:19 pm *
Welcome, %1$s. Please login or register.

: GertDuino now in stock.
 
Pages: [1]

Author Topic: [SOLVED]eth1, how could I configure it to...?  (Read 10458 times)

PacoLM

  • Full Member
  • ***
  • Posts: 108
[SOLVED]eth1, how could I configure it to...?
« on: 11 March 2011, 11:59:08 pm »

Hi,

 I have my guruplug eth0 connected to the router. The guruplug is acting as a surveillance system running Zoneminder. Actually is working with 2 cameras using the wifi of the router. My idea is to connect another camera to the eth1 of the guruplug, using the cable the speed will be faster, so I would like to use this camera to run at higher capture rate.
 I have searched in the forum and the web, but didn't have success. Is it possible to do this?

 Thanks in advance,

PacoLM
« Last Edit: 14 March 2011, 05:36:06 am by PacoLM »
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: eth1, how could I configure it to...?
« Reply #1 on: 12 March 2011, 10:23:09 am »

Here's how I think it could be done. Not necessarily the best way, but a way:

Configure eth1 to use a fixed IP address in a different subnet to the other interfaces

Set the camera IP address to another address in this same subnet

I assume that someone with better network skills than I could suggest a method whereby all interfaces and IP addresses are on the same subnet, but those are the sort of problems that have always defeated me in the past.

HTH.
Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: eth1, how could I configure it to...?
« Reply #2 on: 12 March 2011, 05:56:09 pm »

Hi,

 I think I got it (following your indications!). This is what I have changed.

 In my init_setup.sh:

Code: [Select]
# start eth1 with fixed ip
ifconfig eth1 10.0.0.1 netmask 255.255.255.0 up
route add -net 10.0.0.0 netmask 255.255.255.0 eth1
route add default gw 10.0.0.1 eth1

 In the webserver of the camera, I have put a static ip for it, in my case 10.0.0.3.

 I have also added these lines to the /etc/network/inferfaces file, but I'm not sure that is doing anything...need to comment them out and retest.

Code: [Select]
auto eth1
iface eth1 inet dhcp

The only think I have noticed is that atfer disconnecting the camera, I need to rerun the first set of commands to have eth1 alive again. Is there any way to make eth1 being up always?.

 Thanks, it really helped!,

PacoLM
« Last Edit: 12 March 2011, 05:58:37 pm by PacoLM »
Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: eth1, how could I configure it to...?
« Reply #3 on: 12 March 2011, 08:59:28 pm »

Removing the last line of the /etc/network/interfaces (iface eth1 inet dhcp), made dissapear a lot of errors in the syslog (dhclient: No DHCPOFFERS received, etc), but the system continues working as expected, well, not really, now seems that the guruplug believes that the network socket eth1 is the one that will provide support to send the postfix mails with the alarms, and since I configured correctly eth1, no message is sent to my email account, I get errors like:

Code: [Select]
Mar 12 21:49:42 guruplug-debian postfix/smtp[9529]: connect to gmail-smtp-in.l.google.com[74.125.39.27]:25: No route to host
Mar 12 21:49:42 guruplug-debian postfix/smtp[9530]: connect to gmail-smtp-in.l.google.com[74.125.43.27]:25: No route to host
Mar 12 21:49:45 guruplug-debian postfix/smtp[9528]: connect to gmail-smtp-in.l.google.com[74.125.43.27]:25: No route to host
Mar 12 21:49:45 guruplug-debian postfix/smtp[9530]: connect to alt1.gmail-smtp-in.l.google.com[74.125.155.27]:25: No route to host
Mar 12 21:49:45 guruplug-debian postfix/smtp[9529]: connect to alt1.gmail-smtp-in.l.google.com[72.14.213.27]:25: No route to host
Mar 12 21:49:46 guruplug-debian zmvideo[9532]: INF [Creating video file Frontal-18604-r1-s1.avi for event 18604]
Mar 12 21:49:48 guruplug-debian postfix/smtp[9528]: connect to alt1.gmail-smtp-in.l.google.com[74.125.155.27]:25: No route to host
Mar 12 21:49:48 guruplug-debian postfix/smtp[9530]: connect to alt2.gmail-smtp-in.l.google.com[74.125.67.27]:25: No route to host
Mar 12 21:49:48 guruplug-debian postfix/smtp[9529]: connect to alt2.gmail-smtp-in.l.google.com[74.125.65.27]:25: No route to host
Mar 12 21:49:51 guruplug-debian postfix/smtp[9528]: connect to alt2.gmail-smtp-in.l.google.com[74.125.67.27]:25: No route to host
Mar 12 21:49:51 guruplug-debian postfix/smtp[9529]: connect to alt3.gmail-smtp-in.l.google.com[74.125.45.27]:25: No route to host
Mar 12 21:49:51 guruplug-debian postfix/smtp[9530]: connect to alt3.gmail-smtp-in.l.google.com[74.125.45.27]:25: No route to host
Mar 12 21:49:51 guruplug-debian zmvideo[9532]: INF [Finished Frontal-18604-r1-s1.avi]
Mar 12 21:49:51 guruplug-debian zmfilter[2231]: INF [Creating notification email]
Mar 12 21:49:54 guruplug-debian postfix/smtp[9528]: connect to alt3.gmail-smtp-in.l.google.com[74.125.45.27]:25: No route to host
Mar 12 21:49:54 guruplug-debian postfix/smtp[9529]: connect to alt4.gmail-smtp-in.l.google.com[74.125.113.27]:25: No route to host
Mar 12 21:49:54 guruplug-debian postfix/smtp[9530]: connect to alt4.gmail-smtp-in.l.google.com[74.125.115.27]:25: No route to host
Mar 12 21:49:54 guruplug-debian postfix/smtp[9529]: 1199346F33: to=<[email protected]>, relay=none, delay=5233, delays=5216/0.11/16/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.113.27]:25: No route to host)
Mar 12 21:49:54 guruplug-debian postfix/smtp[9530]: A82124708F: to=<[email protected]>, relay=none, delay=1044, delays=1028/0.12/16/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.115.27]:25: No route to host)

 So seems that postfix is taking eth1 as the ethernet 'responsible' to do the external mailing, but it should not be that way....Any clue?

Regards,

PacoLM
Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: eth1, how could I configure it to...?
« Reply #4 on: 12 March 2011, 09:53:03 pm »

Note to self:

 Changing the order of the settings of both ethernets fixed the bug!:

Code: [Select]
# start eth1 with fixed ip
ifconfig eth1 10.0.0.1 netmask 255.255.255.0 up
route add -net 10.0.0.0 netmask 255.255.255.0 eth1
route add default gw 10.0.0.1 eth1
sleep 10
# start eth0 with fixed ip
ifconfig eth0 192.168.1.43 netmask 255.255.255.0 up
route add -net 192.168.1.0 netmask 255.255.255.0 eth0
route add default gw 192.168.1.1 eth0
sleep 10

This is part of the init_setup.sh, and this is my /etc/network/interfaces:

Code: [Select]
auto lo
iface lo inet loopback
allow-hotplug eth1
auto eth1

 Apart of being fixed, removing the inet dhcp, has lowered down the cpu load.

Hope it helps someone,

PacoLM
« Last Edit: 13 March 2011, 08:56:52 am by PacoLM »
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: [SOLVED]eth1, how could I configure it to...?
« Reply #5 on: 14 March 2011, 08:28:36 am »

Paco - I can't answer your networking questions, my networking knowledge is about the same as yours. But thanks for letting us know you have things working now.
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!