On every version of Fedora in the last ten years or so, the basic network configuration is stored in files under /etc/sysconfig. When the machine boots or I run "systemctl restart network" (or "service network restart"), those files determine how the network gets set-up. After that, I can change the configuration with several tools. For example, I can run something like,
# ip address add 192.168.0.37/24 dev eth0 label eth0:xx
and a new interface alias will be created. But how do I make this alias resilient so that it will appear automatically after a boot or a network restart?
For a primary interface with a static address, I may be able to add the information as IPADDR2 (etc) in ifcfg-eth0. But how do I do this if the primary interface gets its address via DHCP?
On 4/2/19 12:24 PM, CLOSE Dave wrote:
For a primary interface with a static address, I may be able to add the information as IPADDR2 (etc) in ifcfg-eth0. But how do I do this if the primary interface gets its address via DHCP?
Install "nm-connection-editor". It gives you a lot more capabilities, including doing that.
I wrote:
For a primary interface with a static address, I may be able to add the information as IPADDR2 (etc) in ifcfg-eth0. But how do I do this if the primary interface gets its address via DHCP?
Samuel Sieb answered:
Install "nm-connection-editor". It gives you a lot more capabilities, including doing that.
I've tried that and it doesn't. When the connection method is DHCP, the additional address area is grayed out.
On 4/2/19 1:40 PM, CLOSE Dave wrote:
I wrote:
For a primary interface with a static address, I may be able to add the information as IPADDR2 (etc) in ifcfg-eth0. But how do I do this if the primary interface gets its address via DHCP?
Samuel Sieb answered:
Install "nm-connection-editor". It gives you a lot more capabilities, including doing that.
I've tried that and it doesn't. When the connection method is DHCP, the additional address area is grayed out.
I just tried it and it worked. I was able to add a static address to my wifi connection while keeping the dhcp one. "nm-connection-editor" has to be run from the command line, there is no icon for it. The Gnome connection editor doesn't support doing this.
Samuel Sieb wrote:
I just tried it and it worked. I was able to add a static address to my wifi connection while keeping the dhcp one. "nm-connection-editor" has to be run from the command line, there is no icon for it. The Gnome connection editor doesn't support doing this.
Perhaps there is a difference depending on the Fedora version. I'm trying to apply this to an older release (which I'm not allowed to upgrade). Since it worked for you, can you tell me what changes were made to the configuration files. I'm happy to do this manually.
On 4/2/19 2:43 PM, CLOSE Dave wrote:
Samuel Sieb wrote:
I just tried it and it worked. I was able to add a static address to my wifi connection while keeping the dhcp one. "nm-connection-editor" has to be run from the command line, there is no icon for it. The Gnome connection editor doesn't support doing this.
Perhaps there is a difference depending on the Fedora version. I'm trying to apply this to an older release (which I'm not allowed to upgrade). Since it worked for you, can you tell me what changes were made to the configuration files. I'm happy to do this manually.
It's always good to mention which release you're using. Otherwise, people will assume you're using something current.
It appears that it just added entries for "IPADDR=" and "PREFIX=". It's possible that the NetworkManager version you have won't support it though. And btw, this doesn't create an alias, it just adds another IP address to the existing interface.