Thank you Mikael
I read your post and tried before I posted.
I'm sure there's no problem with routing.
Let me detail on my platform.
Debian 4 with iproute2
three NICs
sw01:/etc/iproute2# cat rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
201 net59
202 net220
203 net192
sw01:/etc# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:76:80:5D:00
inet addr:59.124.100.86 Bcast:59.124.100.95 Mask:255.255.255.224
eth1 Link encap:Ethernet HWaddr 00:0C:76:80:5D:01
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
eth2 Link encap:Ethernet HWaddr 00:02:B3:38:E8:B8
inet addr:220.228.43.182 Bcast:220.228.43.191
Mask:255.255.255.192
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
sw01:/etc# cat rc.local
P1_NET=59.124.100.64
IF1=eth0
IP1=59.124.100.86
P1=59.124.100.65
T1=net59
P2_NET=220.228.43.128
IF2=eth2
IP2=220.228.43.182
P2=220.228.43.129
T2=net220
P3_NET=192.168.1.0
IF3=eth1
IP3=192.168.1.5
P3=192.168.1.1
T3=net192
ip route add $P1_NET dev $IF1 src $IP1 table $T1
ip route add default via $P1 dev $IF1 table $T1
ip route add $P2_NET dev $IF2 src $IP2 table $T2
ip route add default via $P2 dev $IF2 table $T2
ip route add $P3_NET dev $IF3 src $IP3 table $T3
ip route add default via $P3 dev $IF3 table $T3
ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2
ip route add $P3_NET dev $IF3 src $IP3
ip rule add from $IP1 table $T1
ip rule add from $IP2 table $T2
ip rule add from $IP3 table $T3
ip route flush cache
I tested with ping and udp echo and tcpdump so that I'm sure UDP packets are
sent via correct eth interface to correct gateway. The problem is that
callweaver (or asterisk) sets identical source IP address in all UDP
packets.
Mikael your case is a little different. Your server is behind a NAT so that
you can force non-local packets to ONE SINGLE identical source IP address.
You're lucky. I will be glad if you can try a server with TWO public
addresses and tell me I'm wrong understanding.
But anyway, thank you for your response.
Franz
----- Original Message -----
From: "Mikael Bjerkeland" <[EMAIL PROTECTED]>
To: "Developers Mailing List" <[email protected]>
Sent: Saturday, May 26, 2007 9:45 PM
Subject: Re: [Callweaver-dev] Multihomed server
> lør, 26.05.2007 kl. 12.07 +0800, skrev Franz Wu:
>> Hi List
>>
>> I just tested a server with two NICs, say
>> NIC#1: IP A, eth0
>> NIC#2: IP B, eth1
>>
>> IP A and IP B are public IP on different IP subnets
>>
>> I sniffered and found, like asterisk, callweaver always uses the IP A as
>> source IP in all UDP packets.
>> That causes problem with SIP clients that register themselves to IP B.
>>
>> I think there're several scenarios:
>> 1. clients initiate transactions like INVITE. callweaver needs to keep
>> track
>> of what interface and IP received SIP method.
>> 2. callweaver initiates transactions. callweaver needs to remember what
>> interface got REGISTER from a specific client.
>> 3. manual config for a specific client, especially those won't register.
>> 4. need more consideration about multiple registration.
>>
>>
>> anybody interested in making multihomed servers working?
>> I'm trying to make it work, but help needed.
>>
>> Franz Wu
>>
>> _______________________________________________
>> Callweaver-dev mailing list
>> [email protected]
>> http://lists.callweaver.org/mailman/listinfo/callweaver-dev
>
>
> Hi Franz,
>
> this is probably a routing issue. In my setup this works great. I have
> internal clients, external clients on NIC 1 and external clients on NIC
> 2.
>
> Take a look at the page I created about multihoming OpenPBX.org. The
> same scenario will work in CallWeaver and Asterisk.
>
> See http://wiki.openpbx.org/tiki-index.php?page=OpenPBX.org%20Multihomed
>
>
>
> Mikael
>
> _______________________________________________
> Callweaver-dev mailing list
> [email protected]
> http://lists.callweaver.org/mailman/listinfo/callweaver-dev
>
_______________________________________________
Callweaver-dev mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-dev