# Attach to specific IP (or at least identify which IP ASL is using)

**URL:** <https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729>\
**Category:** AllStarLink\
**Created:** [July 7, 2021, 9:54pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729 "2021-07-07T21:54:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![KenHorse](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/k/fbc32d/32.png) [@KenHorse](https://community.allstarlink.org/u/KenHorse)\
**Post date:** [July 7, 2021, 9:54pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/1 "2021-07-07T21:54:47Z")

</div>

My Pi has 2 IP addresses (1 from eth0 and the other from wlan0). The Wifi connection connects to an AREDN router which is in the same VLAN as other ASL nodes/servers. But I can’t get any other node on the same VLAN to connect or be able to be connected to.

This is my [nodes] stanza from the one on the Pi I’m discussing:

1100 = [radio@10.150.180.35](mailto:radio@10.150.180.35)/1100,NONE ; Local node  
1101 = [radio@10.48.13.20](mailto:radio@10.48.13.20)/1101,NONE ; Remote node  
1102 = [radio@10.150.180.37](mailto:radio@10.150.180.37)/1102,NONE ; Remote node  
1103 = [radio@10.150.180.36](mailto:radio@10.150.180.36)/1103,NONE ; Remote node

1100 is the one. I tried [radio@127.0.0.1](mailto:radio@127.0.0.1) but that just attaches to localhost. I would have thought using the IP of wlan0 (10.150.180.35) would attach ASL to that IP but it doesn’t seem to help

When I had node 1100 on it’s own dedicated Pi (with only 1 active NIC), everything worked fine. But I’m trying to consolidate things

---

<div class="post-metadata">

**Author:** ![N4IRS](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n4irs/32/548_2.png) [@N4IRS](https://community.allstarlink.org/u/N4IRS)\
**Post date:** [July 7, 2021, 10:25pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/2 "2021-07-07T22:25:15Z")

</div>

Ken, If I read this correctly, you have 4 nodes each on it’s own IP. If that is correct, each node would have the following [nodes] stanza

; This is on node 1100

```auto
1100 = radio@127.0.0.1/1100,NONE ; Local node
1101 = radio@10.48.13.20/1101,NONE ; Remote node
1102 = radio@10.150.180.37/1102,NONE ; Remote node
1103 = radio@10.150.180.36/1103,NONE ; Remote node

```

; This is node 1101

```auto
1101 = radio@127.0.0.1/1101,NONE ; local node
1100 = radio@10.150.180.35/1100,NONE ; remote node
1102 = radio@10.150.180.37/1102,NONE ; Remote node
1103 = radio@10.150.180.36/1103,NONE ; Remote node

```

and so on.

---

<div class="post-metadata">

**Author:** ![KenHorse](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/k/fbc32d/32.png) [@KenHorse](https://community.allstarlink.org/u/KenHorse)\
**Post date:** [July 7, 2021, 10:26pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/3 "2021-07-07T22:26:48Z")

</div>

That is correct. Each node has the appropriate [nodes] stanza(s). As I said, everything was working fine before I moved the “hub” ASL to the “shared” Pi

---

<div class="post-metadata">

**Author:** ![N4IRS](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n4irs/32/548_2.png) [@N4IRS](https://community.allstarlink.org/u/N4IRS)\
**Post date:** [July 7, 2021, 10:39pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/4 "2021-07-07T22:39:17Z")

</div>

What error do you get?  
Show the output of netstat -unap on the hub

---

<div class="post-metadata">

**Author:** ![KenHorse](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/k/fbc32d/32.png) [@KenHorse](https://community.allstarlink.org/u/KenHorse)\
**Post date:** [July 7, 2021, 10:54pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/5 "2021-07-07T22:54:44Z")

</div>

Active Internet connections (servers and established)  
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name  
udp 0 0 0.0.0.0:2074 0.0.0.0:\* 1720/ispeaker  
udp 0 0 0.0.0.0:2075 0.0.0.0:\* 1720/ispeaker  
udp 0 0 0.0.0.0:68 0.0.0.0:\* 25943/dhclient  
udp 0 0 0.0.0.0:68 0.0.0.0:\* 378/dhclient  
udp 0 0 0.0.0.0:5198 0.0.0.0:\* 31590/asterisk  
udp 0 0 0.0.0.0:5199 0.0.0.0:\* 31590/asterisk  
udp 0 0 0.0.0.0:58966 0.0.0.0:\* 419/avahi-daemon: r  
udp 0 0 0.0.0.0:39529 0.0.0.0:\* 1723/imike  
udp 0 0 0.0.0.0:5353 0.0.0.0:\* 419/avahi-daemon: r  
udp 0 0 0.0.0.0:4569 0.0.0.0:\* 31590/asterisk  
udp6 0 0 :::5353 :::\* 419/avahi-daemon: r  
udp6 0 0 :::35235 :::\* 419/avahi-daemon: r

---

<div class="post-metadata">

**Author:** ![N4IRS](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n4irs/32/548_2.png) [@N4IRS](https://community.allstarlink.org/u/N4IRS)\
**Post date:** [July 7, 2021, 10:57pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/6 "2021-07-07T22:57:11Z")

</div>

Look at iax.conf

[general]  
bindport = 4569 ; bindport and bindaddr may be specified  
; NOTE: bindport must be specified BEFORE  
; bindaddr or may be specified on a specific  
; bindaddr if followed by colon and port  
; (e.g. bindaddr=192.168.0.1:4569)

; bindaddr = 192.168.0.1 ; more than once to bind to multiple  
; addresses, but the first will be the  
; default

---

<div class="post-metadata">

**Author:** ![Tony](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Tony](https://community.allstarlink.org/u/Tony)\
**Post date:** [July 7, 2021, 11:03pm UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/7 "2021-07-07T23:03:32Z")

</div>

Don’t use wlan0 and eth0 at the same time. Either use hardwired or wireless not both.

---

<div class="post-metadata">

**Author:** ![KenHorse](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/k/fbc32d/32.png) [@KenHorse](https://community.allstarlink.org/u/KenHorse)\
**Post date:** [July 8, 2021, 12:26am UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/8 "2021-07-08T00:26:28Z")

</div>

The Pi is fully capable of doing so. Why not?

---

<div class="post-metadata">

**Author:** ![N4IRS](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n4irs/32/548_2.png) [@N4IRS](https://community.allstarlink.org/u/N4IRS)\
**Post date:** [July 8, 2021, 12:31am UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/9 "2021-07-08T00:31:03Z")

</div>

Did you look at iax.conf?  
OK, let me be more “complete” Asterisk or more precisely. IAX will bind to the first interface presented, which in your case is the wired Ethernet. You have 2 choices, either change the order the interfaces come up or change the bind address in iax.conf. If you want to see this in action, disable the wired interface and try to connect to the RPi on the WiFi address.

---

<div class="post-metadata">

**Author:** ![KenHorse](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/k/fbc32d/32.png) [@KenHorse](https://community.allstarlink.org/u/KenHorse)\
**Post date:** [July 8, 2021, 12:50am UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/10 "2021-07-08T00:50:18Z")

</div>

Aha! Ok, bind to the wlan0 IP in iax.conf and it’s all good. Thanks!

(another lesson learned)

---

<div class="post-metadata">

**Author:** ![Mike](https://community.allstarlink.org/user_avatar/community.allstarlink.org/mike/32/1569_2.png) [@Mike](https://community.allstarlink.org/u/Mike)\
**Post date:** [July 10, 2021, 11:14am UTC](https://community.allstarlink.org/t/attach-to-specific-ip-or-at-least-identify-which-ip-asl-is-using/18729/11 "2021-07-10T11:14:33Z")

</div>

A problem ‘might’ exist if you are operating a Pi node mobile tethered to a smartphone.  
As the pi will try the next connection in your connection list on failure. Which often happens during slow tower switching events.

In this case, to save time, you would only want 1 connection described. Or you will have to wait for all the connection descriptions to time-out before the desired connection is tried again.

I used a old linksys router loaded with ddwrt and tethered it to the smartphone and a wired connection to the Pi. The wired connection is the same as the one in the house. So it only has one connection description. And is faster than using the Pi’s wifi interface.
