Well, it seems to me you can conserve the benefit of having only one IP to move 
even if there is a second listener which differs only by port number. 

I generally do 5060 for external and 5080 for internal in my configs. I agree 
that it might be nicer to have just one listener, but having two really reduces 
the cognitive load trying to read the config. :-)

-- Alex

> On May 25, 2023, at 10:44 AM, Calvin E. <calv...@gmail.com> wrote:
> 
> Hi Alex,
> 
> You make a good point about the listener resources, however, all external 
> traffic is being passed to internal resources so the load on them would be 
> similar. I was more focused on having "one port for all traffic" and only one 
> IP to move between HA hosts. It turns out that may require a lot of work for 
> very little reward now that I know there are literally three people who would 
> care about the port number for internal traffic. I'd still like to have this 
> configuration, but other parties agreed they are just as happy with a two 
> listener configuration using an alternate port. 
> 
> On Thu, May 25, 2023 at 7:25 AM Alex Balashov <abalas...@evaristesys.com> 
> wrote:
> Calvin,
> 
> But if you are okay with having two listeners, remember that you can use the 
> `socket_workers`[1] configuration directive to limit the number of worker 
> processes associated with the lesser-utilised listener. 
> 
> This produces a simpler configuration while satisfying one's sense that twice 
> the listeners shouldn't incur twice the resource commitment, or something 
> like that.
> 
> -- Alex
> 
> [1] https://www.kamailio.org/wikidocs/cookbooks/5.6.x/core/#socket_workers
> 
> > On May 23, 2023, at 2:09 AM, Daniel-Constantin Mierla <mico...@gmail.com> 
> > wrote:
> > 
> > Hello,
> > you can skip setting advertise for listen and try to play with 
> > set_advertised_address() and record_route_preset() along with domain alias 
> > for public address.
> > Cheers,
> > Daniel
> > On 22.05.23 19:11, Calvin E. wrote:
> >> Using 5.6.x, a scenario designed for a public IP now needs to support life 
> >> in the cloud behind NAT. I'd like to avoid having two listeners to 
> >> separate on-net from off-net traffic. In a HA  scenario, it would be nice 
> >> to have only one floating IP.
> >> 
> >> Is it possible to use the same local address and port for external/public 
> >> and internal/private traffic?
> >> Should set_advertised_address() override the listen advertise address?
> >> 
> >> Initial testing did not produce the expected result. I want to make sure 
> >> I'm following a sane pattern before going down a rabbit hole. The idea is 
> >> to toggle the advertised address by checking if the sender or recipient is 
> >> rfc1918().
> >> 
> >> For the dispatcher module, is it possible to use socket names like below? 
> >> In testing it appeared that only one of the two names was valid.
> >> 
> >> listen=udp:10.0.0.10:5060 name "onnet"
> >> listen=udp:10.0.0.10:5060 advertise 11.11.11.11:5060 name "offnet"
> >> 
> >> 
> >> 
> >> __________________________________________________________
> >> Kamailio - Users Mailing List - Non Commercial Discussions
> >> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> >> Important: keep the mailing list in the recipients, do not reply only to 
> >> the sender!
> >> Edit mailing list options or unsubscribe:
> >> 
> > -- 
> > Daniel-Constantin Mierla -- www.asipto.com
> > www.twitter.com/miconda -- www.linkedin.com/in/miconda
> > Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
> > __________________________________________________________
> > Kamailio - Users Mailing List - Non Commercial Discussions
> > To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> > Important: keep the mailing list in the recipients, do not reply only to 
> > the sender!
> > Edit mailing list options or unsubscribe:
> 
> -- 
> Alex Balashov
> Principal Consultant
> Evariste Systems LLC
> Web: https://evaristesys.com
> Tel: +1-706-510-6800
> 
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:

-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to