Need some fundamental understanding on how the IP addresses are populated on Linux devices

I am quite new(5-6 months) to embedded Linux programming in C and python. I have with me 2 Linux based devices connected to a network.
I am trying to collect the IP address generated by the ethernet and wlan interface and populate it on a web application.
Now Device 1 is giving me 2 IP addresses on the wlan interface. This is after I run ip a .

Namely 10.17.36.31/24 and 10.17.36.33/24

And Device 2 is also giving me 2 IP addresses but both are same.

They are both 10.61.44.27/24 and 10.61.44.27/22

Now I can implement the logic to get the correct IP from these 2 results, but I am not able to figure out where these IP addresses are coming from?
I don't have fundamental knowledge on networking, so not able to understand the output of the ip a command.
Any guidance to a material that clearly describes networking in linux devices would be helpful. Specifically on how to understand what the output of ip a signifies. And also what exactly is the difference between scope global and scope global secondary , and what are they? What is brd, what does /24 and /22 mean. Trying to find answers to all these questions.

Device 1:

5: eth0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
6: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether bb:cc:aa:ee:dd:gg brd ff:ff:ff:ff:ff:ff
    inet 10.17.36.31/24 brd 10.61.44.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet 10.17.36.33/24 brd 10.61.47.255 scope global secondary wlan0
       valid_lft forever preferred_lft forever
    inet6 aaaa::bbbb:2222:ffff:eeee/64 scope link
       valid_lft forever preferred_lft forever

Device 2:

5: eth0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
6: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether bb:cc:aa:ee:dd:gg brd ff:ff:ff:ff:ff:ff
    inet 10.61.44.27/24 brd 10.61.44.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet 10.61.44.27/22 brd 10.61.47.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 aaaa::bbbb:2222:ffff:eeee/64 scope link
       valid_lft forever preferred_lft forever

Can you show output of ip route show as these settings look confusing, especially for device 2.
Have you had a subnet expansion in your network from /24 to /22 perhaps ?

What linux distribution is on those devices ?

Regards
Peasant.

It is a standard yocto based distribution.
Let me check on the subnet expansion and come back to that.

This is the output of ip route show from Device 2

default via 10.61.44.1 dev wlan0
10.61.44.0/24 dev wlan0 proto kernel scope link src 10.61.44.27
10.61.44.0/22 dev wlan0 proto kernel scope link src 10.61.44.27

Does this give any clue?

Can that make sense, two times the same IP addr? And with different subnet masks?

Is this a domestic or business configuration?

Is there more than one connection to the internet?

Do you know where this 10.61.44.0 ip address is coming from? Do you have a local DHCP server? Or is this ip address coming from the web somehow? Or have you set this as a static ip address yourself? Or have you not configured any network parameters since installing yocto and this is default?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.