rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
558 stars 138 forks source link

Support for virtual ( Alias ) Network Interfaces #985

Open kdbo opened 9 years ago

kdbo commented 9 years ago

You cannot create extra IP addresses on a NIC via the Rockstor management GUI. And when you create one via the commandline, the Management GUI uses the IP address of the Alias instead of the one configured on the main Interface device

Situation before manually adding alias: enp4s0f0 enp4s0f0 XX:XX:XX:XX:XX:XX 1000 Mb/s manual 10.0.5.109 255.255.0.0 10.0.0.1 10.0.3.1,10.0.3.2 Yes

ifcfg-enp4s0f0:

TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=enp4s0f0 UUID=XXXXXXX-XXXX-XXXX-XXXX-XXXXXXX DEVICE=enp4s0f0 ONBOOT=yes IPADDR=10.0.5.109 PREFIX=16 GATEWAY=10.0.0.1 DNS1=10.0.3.1 DNS2=10.0.3.2 IPV6_PEERDNS=yes IPV6_PEERROUTES=yes

Steps to reproduce:

create ifcfg-enp4s0f0:1

TYPE=Alias BOOTPROTO=none IPV4_FAILURE_FATAL=no NAME=enp4s0f0:1 DEVICE=enp4s0f0:1 ONBOOT=yes IPADDR=10.0.5.108 PREFIX=16

then

systemctl restart network

Result:

Rockstor uses the ip of the Alias

enp4s0f0 enp4s0f0 XX:XX:XX:XX:XX:XX 1000 Mb/s manual 10.0.5.108 255.255.0.0 10.0.0.1 10.0.3.1,10.0.3.2 Yes

phillxnet commented 9 years ago

@kdbo From:- http://forum.rockstor.com/t/network-management-implementation-details/441 we have that Rockstor from version 3.8-8 internally uses nmcli to configure it's network. Does this help with other possibly more compatible options for adding an alias?

kdbo commented 9 years ago

Hey phillxnet,

I tried this but the result is the same:

nmcli con mod enp4s0f0 +ipv4.addresses "10.0.5.108/16" nmcli con up enp4s0f0

ip addr show 2: enp4s0f0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc mq state UP qlen 1000 link/ether 10:c3:7b:48:9c:9e brd ff:ff:ff:ff:ff:ff inet 10.0.5.109/16 brd 10.0.255.255 scope global enp4s0f0 valid_lft forever preferred_lft forever inet 10.0.5.108/16 brd 10.0.255.255 scope global secondary enp4s0f0 valid_lft forever preferred_lft forever inet6 fe80::12c3:7bff:fe48:9c9e/64 scope link valid_lft forever preferred_lft forever

But again , in the Admin GUI, Mgmt IP is 10.0.5.108

For the record: ofcourse, I deleted the original alias ifcfg file and restarted prior to testing the above .