LinuxMCE Forums
May 24, 2013, 01:33:43 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: How to setup eth2 for dedicated VOIP line and not break eth0,1 setup for LMCE ?  (Read 1478 times)
bulek
Administrator
wants to work for LinuxMCE
*****
Posts: 868

Living with LMCE


View Profile
« on: March 18, 2008, 02:15:37 pm »

Hi,

I've made agreement with national ISP provider to test VOIP connection directly through dedicated network card instead of going through ADSL gateway with analog phone port - SPA 3000 - Asterisk.

I need to have eth2 set on dhcp (to retrieve IP automatically) and then work with it under Asterisk as dedicated VOIP trunk.

Anyone with more insight how to setup such situation without breaking anything (or as least as possible) with eth0,1 setup under LMCE ?

Thanks in advance,

regards,

Bulek.
Logged

Thanks in advance,

regards,

Bulek.
Zaerc
Alumni
LinuxMCE God
*
Posts: 2256


Department of Redundancy Department.


View Profile
« Reply #1 on: March 18, 2008, 05:18:25 pm »

You'll probably have to add this to /etc/network/interfaces for starters:
Code:
auto eth2
iface eth2 inet dhcp

And you may want to check /etc/udev/rules.d/70-persistent-net.rules to see wether kubuntu added the right MAC for eth2.
Logged

"Change is inevitable. Progress is optional."
-- Anonymous

bulek
Administrator
wants to work for LinuxMCE
*****
Posts: 868

Living with LMCE


View Profile
« Reply #2 on: March 19, 2008, 08:13:38 am »

You'll probably have to add this to /etc/network/interfaces for starters:
Code:
auto eth2
iface eth2 inet dhcp

And you may want to check /etc/udev/rules.d/70-persistent-net.rules to see wether kubuntu added the right MAC for eth2.
Thanks, this seems to work, but the problem is that it takes over my outside connections - it sets up own gateway and own nameservers, so my other eth0,eth1 setup for LMCE stops working... I would only like to use eth2 as dedicated VOIP connection to my ISP (Asterisk needs to register as SIP client through it)- I don't know much about routing, but I would like to use that network card beside those two existing...

This dedicated line gets itw own ip and other info - it's basically how ADSL Gateway connects to VOIP line to give you analog phone port working (which is SIP client to their server )  - this is what I have on gateway (have XXXed vital info):

Quote
VOIP - SIP
Local host:   interface vif1 (10.XXX.XXX.XXX) port 5060
SIP Proxy:   xxx.xxx.xxx port 5060
SIP Registrar    xxx.xxx port 5060

And ifconfig (eth2 is down at the moment, so my LMCE network works) :

Quote
ifconfig
eth0      Link encap:Ethernet  HWaddr xxxx
          inet addr:192.168.80.2  Bcast:192.168.80.255  Mask:255.255.255.0
          inet6 addr: fe80::210:4bff:feb4:d07f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1096 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1732 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1152947 (1.0 MB)  TX bytes:196370 (191.7 KB)
          Interrupt:10 Base address:0x4000

eth1      Link encap:Ethernet  HWaddr xxxx
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:7dff:fe95:b88b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:786174 errors:0 dropped:0 overruns:0 frame:0
          TX packets:875988 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:454061134 (433.0 MB)  TX bytes:110392467 (105.2 MB)
          Interrupt:11 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:195951 errors:0 dropped:0 overruns:0 frame:0
          TX packets:195951 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:40094222 (38.2 MB)  TX bytes:40094222 (38.2 MB)

ifconfig eth2
eth2      Link encap:Ethernet  HWaddr xxxx
          inet addr:10.xxx.xxx.xxx  Bcast:10.xxx.xxx.xxx  Mask:255.255.192.0
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:239 errors:0 dropped:0 overruns:0 frame:0
          TX packets:885 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:55056 (53.7 KB)  TX bytes:66318 (64.7 KB)
          Interrupt:5 Base address:0xe000


Any advice ?

Thanks in advance,

regards,

Bulek.
« Last Edit: March 19, 2008, 08:16:45 am by bulek » Logged

Thanks in advance,

regards,

Bulek.
Zaerc
Alumni
LinuxMCE God
*
Posts: 2256


Department of Redundancy Department.


View Profile
« Reply #3 on: March 19, 2008, 12:07:24 pm »

I guess what you now need is a way to tell the dhcp client not to set a default route and resolving nameservers for eth2.
Logged

"Change is inevitable. Progress is optional."
-- Anonymous

chewi
Veteran
***
Posts: 69


View Profile
« Reply #4 on: March 22, 2008, 11:10:33 pm »

I guess you would want to setup the ADSL-Gateway after eth2, so the VoIP-Stuff gets overwritten with the ADSL-Stuff. Currently I guess it's the other way around.
with 2 dhcp-client-interfaces, the one that is initialized the later is the one providing nameservers and default gateway.

You could manually override and add the ADSL-Gateway's Name-server to /etc/resolv.conf
and do something like "route add default gw 192.168.0.adslrouter"

or make an additional "dhclient eth0/1" after bootup.

see /etc/rc.local for these commands to be executed automatically at the end of the boot-sequence.
Logged
bulek
Administrator
wants to work for LinuxMCE
*****
Posts: 868

Living with LMCE


View Profile
« Reply #5 on: June 10, 2008, 01:55:34 pm »

Hi,

I'm back to this problem again (haven't solved it for the first time). If I put eth2 to dhcp SIP connection works, but none other network traffic doesn't (on other two network cards that LMCE is using)... Now I'm trying to setup all cards at once and I cannot ping 10.145.64.1 gateway in such setup...

Can anyone help me with this setup ?

/etc/network/interfaces:
Quote
auto lo
   iface lo inet loopback
   
auto eth0
iface eth0 inet static
   address 192.168.80.2
   netmask 255.255.255.0
   gateway 192.168.80.1
auto eth1
iface eth1 inet static
   address 192.168.0.1
   netmask 255.255.255.0
auto eth2
#iface eth2 inet dhcp
iface eth2 inet static
   address 10.145.105.79
   netmask 255.255.192.0
        post-up /etc/network/sip_route_up
        pre-down /etc/network/sip_route_down


/etc/network/sip_route_up:
Quote
#!/bin/sh
route add -net 10.233.1.0 netmask 255.255.255.0 gw 10.145.64.1 dev eth2
route add -net 10.145.64.0 netmask 255.255.192.0 gw 10.145.64.1 dev eth2


/etc/network/ sip_route_down:
Quote
#!/bin/sh
route del -net 10.233.1.0 netmask 255.255.255.0 gw 10.145.64.1 dev eth2
route del -net 10.145.64.0 netmask 255.255.192.0 gw 10.145.64.1 dev eth2

The SIP server I'm trying to connect to is at 10.233.1.54, but I even cannot ping gateway at 10.145.64.1

Any advice from more experienced ?

Thanks in advance,

regards,

Bulek.

Logged

Thanks in advance,

regards,

Bulek.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!