How does the inspector "ip interfaces" work?

I have an interesting case of a kubernetes worker which IP isn’t registered in the OS (if we run the ifconfig, it doesn’t show the IP but the IP is being displayed by the inspector).
s/real_ip/1.2.3.4/

# ifconfig -a  | grep 1.2.3.4
# 

But this query returns them:

# /opt/BESClient/bin/qna
Default masthead location, using /etc/opt/BESClient/actionsite.afxm
Q: addresses whose (it as string != "0.0.0.0") of ip interfaces whose (not loopback of it) of network as string
A: 1.2.3.4
A: 127.0.0.10
A: 172.18.32.0
T: 5753

Nice question @dveiga

The doc page does clarify it for us.
https://developer.bigfix.com/relevance/reference/network-ip-interface.html

We may need a dev to weigh in on this one

In the meantime, let’s find our as much as we can about this object on your Linux box. (which OS specifically, might help) This giant relevance should pull every property that might be available, in hopes it gives a clue to the underlying interface. Note, this relevance includes inspectors not implemented on all OS, so I have some error trapping to avoid those and get some further results.

q: ((if (exists property "address" of type "network ip interface") then (addresses of it as string) else ("address not implemented")) , (if (exists property "alias" of type "network ip interface") then (alias of it as string) else ("alias not implemented")) , (if (exists property "broadcast address" of type "network ip interface") then (broadcast address of it as string) else ("broadcast address not implemented")) , (if (exists property "broadcast support" of type "network ip interface") then (broadcast support of it as string) else ("broadcast support not implemented")) , (if (exists property "cidr address" of type "network ip interface") then (cidr address of it as string) else ("cidr address not implemented")) , (if (exists property "cidr string" of type "network ip interface") then (cidr string of it as string) else ("cidr string not implemented")) , (if (exists property "loopback" of type "network ip interface") then (loopback of it as string) else ("loopback not implemented")) , (if (exists property "mac address" of type "network ip interface") then (mac address of it as string) else ("mac address not implemented")) , (if (exists property "multicast support" of type "network ip interface") then (multicast support of it as string) else ("multicast support not implemented")) , (if (exists property "name" of type "network ip interface") then (name of it as string) else ("name not implemented")) , (if (exists property "point to point" of type "network ip interface") then (point to point of it as string) else ("point to point not implemented")) , (if (exists property "subnet address" of type "network ip interface") then (subnet address of it as string) else ("subnet address not implemented")) , (if (exists property "subnet mask" of type "network ip interface") then (subnet mask of it as string) else ("subnet mask not implemented")) , (if (exists property "up" of type "network ip interface") then (up of it as string) else ("up not implemented"))) of ip interfaces of network

(edited to take down my IP addresses)

I also wonder what ip address show returns on your OS?

Depending on the OS version you might need to show the info some other way. We definitely get the info from the OS.

Does the following command show anything more?

nmcli d show

1 Like

OS is RHEL 7.8
Interesting that ifconfig -a doesn’t show the specific IP but ip addr does. I ll get the nmcli d show output to confirm as well.

ip addr output:

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:71:xx:60:xx:xx brd ff:ff:ff:ff:ff:ff
    inet XXX.XXX.XXX.XXX/27 brd  YYY.YYY.YYY.YYY scope global eth1
       valid_lft forever preferred_lft forever
  >>>>  inet 1.2.3.4/32 scope global eth1 <<<<
       valid_lft forever preferred_lft forever
    inet6 fXX0::4X1:dXXf:fXX0:4XX6/64 scope link 
       valid_lft forever preferred_lft forever

Update: NetworkManager service aren’t running on these containers and I cannot start it, but I am back to
the question why ifconfig isn’t extensive enough to show the other IP from eth1. Anyway thanks, I know where to go now.

$ kubectl exec -n services-system -it $N ${POD} -- nsenter -t 1 -m -u -i -n -- nmcli device show
Error: NetworkManager is not running.
command terminated with exit code 8
1 Like

If it helps, I believe that’s a Red Hat / systemd thing, not a Container thing.