Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

routing problem sip client to register on server

4 views
Skip to first unread message

Tamer Higazi

unread,
Nov 21, 2009, 6:00:16 PM11/21/09
to
Hi people!
I have 2 NIC on a server.

eth0 -> 192.168.0.100 GW 192.168.0.1
eth1 -> 192.168.0.101

both NIC are connected to a DSL router with it's IP-Address 192.168.0.1

The router (D-Link Horstbox) should register itself on the asterisk
server with the accounts I saved on the router, and I am not getting
smart why nothing goes through.

Any advise?!


Here is ifconfig:

eth0 Link encap:Ethernet HWaddr 00:18:f3:c1:db:b5
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::218:f3ff:fec1:dbb5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17011 errors:0 dropped:0 overruns:0 frame:0
TX packets:17812 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10565777 (10.0 MiB) TX bytes:2448368 (2.3 MiB)
Interrupt:27 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:40:95:31:65:ab
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::240:95ff:fe31:65ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:64 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7881 (7.6 KiB) TX bytes:6361 (6.2 KiB)
Interrupt:21 Base address:0x2c00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Hosttux


tamer # route -n:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 1 0 0 eth1

UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:239 errors:0 dropped:0 overruns:0 frame:0
TX packets:239 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7529 (7.3 KiB) TX bytes:7529 (7.3 KiB)

route -n:


Tamer

Bill Marcum

unread,
Nov 21, 2009, 6:53:16 PM11/21/09
to
On 2009-11-21, Tamer Higazi <n...@mail.de> wrote:
> Hi people!
> I have 2 NIC on a server.
>
> eth0 -> 192.168.0.100 GW 192.168.0.1
> eth1 -> 192.168.0.101
>
> both NIC are connected to a DSL router with it's IP-Address 192.168.0.1
>
> The router (D-Link Horstbox) should register itself on the asterisk
> server with the accounts I saved on the router, and I am not getting
> smart why nothing goes through.
>
> Any advise?!
>
Is there some reason you think you need two network cards on the same
subnet?

Moe Trin

unread,
Nov 22, 2009, 12:03:35 PM11/22/09
to
On Sun, 22 Nov 2009, in the Usenet newsgroup comp.os.linux.networking, in
article <4b0854e6$0$6578$9b4e...@newsspool3.arcor-online.net>, Tamer Higazi
wrote:

>eth0 -> 192.168.0.100 GW 192.168.0.1
>eth1 -> 192.168.0.101

Are you using policy routing? Don't think so. So what do you hope
to have happen with this configuration? Basic networking assumes
there is ONE route to a destination locally. If there are more than
one, the kernel takes the narrower one (Genmask), but if they are
_equal_ it assumes you fscked up and make a mistake - and uses
the LAST defined route (because it assumes you forgot to remove the
first or wrong route).

>tamer # route -n:
>
>Kernel IP routing table
>Destination Gateway Genmask Flags Metric Ref Use Iface
>192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

So - two roads lead to the local network. Which one should I use?

>0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
>0.0.0.0 192.168.0.1 0.0.0.0 UG 1 0 0 eth1

Different problem here. Two roads lead to everywhere else... which one
should I use? Ahh, one road has a higher cost (Metric) so we _won't_
take that road. Before you say "take the higher cost road when there
is an accident blocking the lower cost road", the rule says to use the
lower cost road. If you want the other road to be used in the event of
an accident, you need to have the police (a routing daemon like routed
or gated) change the cost (Metric) of the lower cost road - that's the
only way we're going to use the eth1 route.

If you really must use two interfaces, you need to be using a policy
routing daemon, which is more complicated to set up.

[compton ~]$ whatis ip tc
ip (8) - show / manipulate routing, devices, policy routing and tunnels
tc (8) - show / manipulate traffic control settings
[compton ~]$

Old guy

Tamer Higazi

unread,
Dec 3, 2009, 5:05:42 PM12/3/09
to
Solved everything!
Was my mistake....

Tahnks people!

Tamer

Moe Trin schrieb:

0 new messages