User avatar
Mettauk
Posts: 235
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Which WiFi hub am I connecting to?

Wed Jul 17, 2019 5:17 pm

Within wpa_supplicant.conf I have a number of WIFi connections listed in priority as

Code: Select all

...
network={
    ssid="Name01"
    psk="xxxxxxx"
    priority=1
    id_str="A1"
}

network={
    ssid="Name02"
    psk="xxxxxxx"
    priority=2
    id_str="Net2"
}
How do I tell which connection the Pi is connecting to via ssh? (All on same LAN, just over a big area and no mesh so various WiFi access points)

ifconfig tells me a few thing but I can't see which id_str.

Code: Select all

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.x.xx  netmask 255.255.255.0  broadcast 192.168.x.xx
        inet6 fe80::ec5:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>
        inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x0<                   global>
        ether b8:27:eb:bc:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 549835  bytes 40176526 (38.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 966039  bytes 1483147065 (1.3 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

Andyroo
Posts: 4212
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Which WiFi hub am I connecting to?

Wed Jul 17, 2019 5:44 pm

Simplest way i know is:

Code: Select all

iwlist wlan0 scan | grep ESSID

By the way - for local addresses you do not need to hide the IP - can make debugging much much harder for folk helping.

Routers will not allow access to them from outside the LAN
Need Pi spray - these things are breeding in my house...

drgeoff
Posts: 9755
Joined: Wed Jan 25, 2012 6:39 pm

Re: Which WiFi hub am I connecting to?

Wed Jul 17, 2019 6:03 pm

Andyroo wrote:
Wed Jul 17, 2019 5:44 pm

By the way - for local addresses you do not need to hide the IP - can make debugging much much harder for folk helping.

Routers will not allow access to them from outside the LAN
The router will never be troubled by external traffic to those addresses. It won't even reach the router as those addresses are not routeable over the internet.

User avatar
Mettauk
Posts: 235
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: Which WiFi hub am I connecting to?

Wed Jul 17, 2019 10:14 pm

Andyroo wrote:
Wed Jul 17, 2019 5:44 pm
Simplest way i know is:

Code: Select all

iwlist wlan0 scan | grep ESSID

By the way - for local addresses you do not need to hide the IP - can make debugging much much harder for folk helping.

Routers will not allow access to them from outside the LAN
Thanks for that and the info re LAN addresses, does that equally apply to IPv6 addressing, given unique id's??
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

Andyroo
Posts: 4212
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Which WiFi hub am I connecting to?

Wed Jul 17, 2019 10:43 pm

From my understanding fe80::/64 are not routable and SLAAC creates these but your router may issue addresses that are routable.

My ISP would not know IPv6 if they tripped over the cable carrying the data!
Need Pi spray - these things are breeding in my house...

Return to “Networking and servers”