Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netmask showing wrong data #66

Open
sukeshleel opened this issue May 11, 2022 · 0 comments
Open

Netmask showing wrong data #66

sukeshleel opened this issue May 11, 2022 · 0 comments

Comments

@sukeshleel
Copy link

sukeshleel commented May 11, 2022

Hi @benjaoming,

I'm trying to get interfaces details using the code in this repo in the Linux machine, where in that linux machine "ifconfig" command is deprecated, only "ip" command is available so it using fall back approach.

I'm seeing that netmask value is /16 or /24 or /8 etc., instead of actual netmask value. kindly refer attached screenshot.

Same packages I'm using where "ifconfig" is available there I can see that netmask value is proper. Kindly let me know if this issue can be fixed.

If screenshot is not clear please refer the below text,

  1. Issue data
    'wifi1': {'inet': '169.254.193.75', 'inet4': ['169.254.193.75'], 'ether': None, 'inet6': ['fe80::7d38:44e:84e:c14b'], 'netmask': '/16', 'device': 'wifi1', 'flags': ' <>', 'mtu': '1500', 'broadcast': '169.254.255.255'}}

ifcfg.version
'0.22'

  1. Working data
    {u'lo': {u'ether': None, u'netmask': u'255.0.0.0', u'flags': u'73<UP,LOOPBACK,RUNNING> ', u'device': u'lo', u'mtu': u'65536', u'inet6': [u'::1'], u'inet': u'127.0.0.1', u'inet4': [u'127.0.0.1']}, u'eth0': {u'ether': u'00:0c:29:3e:2e:75', u'broadcast': u'172.16.255.255', u'netmask': u'255.255.0.0', u'flags': u'4163<UP,BROADCAST,RUNNING,MULTICAST> ', u'device': u'eth0', u'mtu': u'1500', u'inet6': [u'fe80::20c:29ff:fe3e:2e75'], u'inet': u'172.16.9.150', u'inet4': [u'172.16.9.150']}}

ifcfg.version
u'0.22'

Issue_ip
Issue_ip1

Regards,
Leel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant