Re: [asterisk-users] How to have Asterisk respond from the IP address used for registration
Hi Andrew, I tried that (ref.: http://www.tipsternet.com/articles/advance%20routing.htm) but althought my packets do seem to be marked (when I used -J LOG with iptables I do see the appropriate packets being logged) but when Asterisk sends back the response, the "mark" seems either to be gone or ignored. I am no routing expert, but coming out of Asterisk the responses back aren't marked are they? I mean, strictly speaking those aren't the same packets as the ones that came in. Mike > -Original Message- > From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- > boun...@lists.digium.com] On Behalf Of Andrew Furey > Sent: Thursday, May 27, 2010 20:32 > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] How to have Asterisk respond from the IP > address used for registration > > On 28/05/2010, Mike wrote: > > That was a simplified example. I actually have two links from different > > ISPs, totally different networks. Those on provider A should talk to > > provider`s A IP address and have their answers come back from provider's > A > > IP, and those on provider B should talk to my provider B NIC and get the > > response back from that IP. > > I think this is more a router issue - we do this with three links, > going into a single Linux-based Linksys which acts as the single > gateway for the LAN (so it has 4 interfaces). You need to look into > the "ip" command, and packet mangling to mark connections as coming > from each provider (so that all related packets go back the same way). > > HTH > Andrew > > -- > Linux supports the notion of a command line or a shell for the same > reason that only children read books with only pictures in them. > Language, be it English or something else, is the only tool flexible > enough to accomplish a sufficiently broad range of tasks. > -- Bill Garrett > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How to have Asterisk respond from the IP address used for registration
Hi Andrew, Thanks, I'll look this up. The term "packet mangling" wasn't used in my many google searches. Mike > > On 28/05/2010, Mike wrote: > > That was a simplified example. I actually have two links from different > > ISPs, totally different networks. Those on provider A should talk to > > provider`s A IP address and have their answers come back from provider's > A > > IP, and those on provider B should talk to my provider B NIC and get the > > response back from that IP. > > I think this is more a router issue - we do this with three links, > going into a single Linux-based Linksys which acts as the single > gateway for the LAN (so it has 4 interfaces). You need to look into > the "ip" command, and packet mangling to mark connections as coming > from each provider (so that all related packets go back the same way). > > HTH > Andrew > -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How to have Asterisk respond from the IP address used for registration
On Thu, 27 May 2010, Mike wrote: > That was a simplified example. I actually have two links from different > ISPs, totally different networks. Those on provider A should talk to > provider`s A IP address and have their answers come back from provider's A > IP, and those on provider B should talk to my provider B NIC and get the > response back from that IP. > > This is all to make sure latency is kept to a minimum. Provider A`s network > doesn't peer to provider B, so latency is horrible when the customer doesn't > use the right IP address. > > The reason why I am not using a diff server per provider is that for some > customers, half the phone will be on provider A and half on provider B > (home-based personnel). They still keep hints and stuf to work as if they > were on the same server. > > So my original question I believe is still valid, even if the IPs used as > exemple made little common sense (as you`ve rightly noted) This isn't really an Asterisk issue, it's network/routing - however ... Two solutions I can think of. The first is the easiest is to get a separate router with three network interfaces - one goes to your LAN with the asterisk server, the other 2 to the 2 ISPs - the router then does all that's needed to keep the streams separate, or does load balancing, or whatever. There are many makes and some even run Linux. The other way is to have 2 NICs on the Asterisk box, each connected to one of the 2 ISPs, then you need some routing magic on the Linux box to keep the streams separate - this example: http://lartc.org/howto/lartc.rpdb.multiple-links.html builds a Linux router, but it should work with applications running on the router (which is jus a Linux box) itself. Good luck! Gordon -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How to have Asterisk respond from the IP address used for registration
On 28/05/2010, Mike wrote: > That was a simplified example. I actually have two links from different > ISPs, totally different networks. Those on provider A should talk to > provider`s A IP address and have their answers come back from provider's A > IP, and those on provider B should talk to my provider B NIC and get the > response back from that IP. I think this is more a router issue - we do this with three links, going into a single Linux-based Linksys which acts as the single gateway for the LAN (so it has 4 interfaces). You need to look into the "ip" command, and packet mangling to mark connections as coming from each provider (so that all related packets go back the same way). HTH Andrew -- Linux supports the notion of a command line or a shell for the same reason that only children read books with only pictures in them. Language, be it English or something else, is the only tool flexible enough to accomplish a sufficiently broad range of tasks. -- Bill Garrett -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How to have Asterisk respond from the IP address used for registration
That was a simplified example. I actually have two links from different ISPs, totally different networks. Those on provider A should talk to provider`s A IP address and have their answers come back from provider's A IP, and those on provider B should talk to my provider B NIC and get the response back from that IP. This is all to make sure latency is kept to a minimum. Provider A`s network doesn't peer to provider B, so latency is horrible when the customer doesn't use the right IP address. The reason why I am not using a diff server per provider is that for some customers, half the phone will be on provider A and half on provider B (home-based personnel). They still keep hints and stuf to work as if they were on the same server. So my original question I believe is still valid, even if the IPs used as exemple made little common sense (as you`ve rightly noted) Michael > -Original Message- > From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- > boun...@lists.digium.com] On Behalf Of Jeff LaCoursiere > Sent: Thursday, May 27, 2010 19:09 > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] How to have Asterisk respond from the IP > address used for registration > > > > On Thu, 27 May 2010, Mike wrote: > > > Hi, > > > > > > > > I have a test server with 2 NICs, each with it own IP address. Let`s say > > 192.168.1.2 and 192.168.1.3. I would like some phones to register by > using > > 192.168.1.2 and some by using 192.168.1.3 as the address. > > > > > > > > Since the default IP is 192.168.1.2, that is the only working address. > Every > > phone connecting to 192.168.1.3 fails to register, presumably because > > Asterisk answers back from 192.168.1.2 and the phone doesn't recognize > this > > as the correct SIP server. > > > > > > > > I am using 1.4.31. Is there any way to have Asterisk answer from the IP > > address used instead of using the default one? > > > > I think you should take a step back and ask yourself why you are trying to > do this in the first place. Presumably you have both of these NIC's > plugged into the same logical LAN or you will have even more difficulties > with routing later. What problem are you actually trying to solve? > > j > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How to have Asterisk respond from the IP address used for registration
On Thu, 27 May 2010, Mike wrote: > Hi, > > > > I have a test server with 2 NICs, each with it own IP address. Let`s say > 192.168.1.2 and 192.168.1.3. I would like some phones to register by using > 192.168.1.2 and some by using 192.168.1.3 as the address. > > > > Since the default IP is 192.168.1.2, that is the only working address. Every > phone connecting to 192.168.1.3 fails to register, presumably because > Asterisk answers back from 192.168.1.2 and the phone doesn't recognize this > as the correct SIP server. > > > > I am using 1.4.31. Is there any way to have Asterisk answer from the IP > address used instead of using the default one? > I think you should take a step back and ask yourself why you are trying to do this in the first place. Presumably you have both of these NIC's plugged into the same logical LAN or you will have even more difficulties with routing later. What problem are you actually trying to solve? j -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] How to have Asterisk respond from the IP address used for registration
Hi, I have a test server with 2 NICs, each with it own IP address. Let`s say 192.168.1.2 and 192.168.1.3. I would like some phones to register by using 192.168.1.2 and some by using 192.168.1.3 as the address. Since the default IP is 192.168.1.2, that is the only working address. Every phone connecting to 192.168.1.3 fails to register, presumably because Asterisk answers back from 192.168.1.2 and the phone doesn't recognize this as the correct SIP server. I am using 1.4.31. Is there any way to have Asterisk answer from the IP address used instead of using the default one? Regards, Mike -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users