Open bendikro opened 6 years ago
Ah yeah, after we added support for multiple IP addresses per interface, we didn't do anything about the remaining interface properties, that are also per IP binding.
I think this needs to be in a major release change, since basically we need to adapt the whole API to handle multiple bindings.
I haven't been able to replicate this. When I ran sudo ifconfig wlp0s20f3:0 192.168.0.4
to create an alias, it ended up showing the alias and the primary interface separately in the output of ifcfg.interfaces()
. Has this been resolved, or are additional steps needed to replicate?
...
'wlp0s20f3': {'inet': '6.5.75.97',
'inet4': ['6.5.75.97'],
'ether': '0c:dd:24:37:a0:b8',
'inet6': ['fe80::87a2:717e:18f:b687'],
'netmask': '255.255.255.0',
'device': 'wlp0s20f3',
'flags': '4163<UP,BROADCAST,RUNNING,MULTICAST> ',
'mtu': '1500',
'broadcast': '6.5.75.255'},
'wlp0s20f3:0': {'inet': '192.168.0.4',
'inet4': ['192.168.0.4'],
'ether': '0c:dd:24:37:a0:b8',
'inet6': [],
'netmask': '255.255.255.0',
'device': 'wlp0s20f3:0',
'flags': '4163<UP,BROADCAST,RUNNING,MULTICAST> ',
'mtu': '1500',
'broadcast': '192.168.0.255'}
...
@jamalex try on a system without net-tools (the package containing ifconfig). It's on default Unix-based systems for the past ~5 years that ifconfig hasn't been a standard utility.
Red Hat has made a nice cheat sheet for the new commands: https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf
With a physical interface
enp11s0
, and a virtual interface created withifconfig enp11s0:0 192.168.0.4
, the output fromip addr show
looks something like:I've removed
inet6
output lines as well aslocalhost
Trying to parse this gives: