Hİ all;
i need your helps on setting the virtual ip. I am trying to setup static virtual ip on CenOS7. but I want my VIP to should not open when rebooting.
My interface settings like this:
*for ens33 NIC -> ifcfg-ens33*
DEVICE=ens33 BOOTPROTO=none ONBOOT=yes PREFIX=24 IPADDR=192.168.2.151
*and for VIP NIC ens33:2* * -> ifcfg-ens33:2*
DEVICE=ens33:2 ONBOOT=no ONPARENT=no PREFIX=24 IPADDR=192.168.2.149
i made up ifcfg-ens33:2 from ifcfg-ens33 by copying it... i dont know where i do wrong??
i am waiting for your help...
best regards....
Something like that?
DEVICE="enp2s0f1" HWADDR="00:25:90:5C:2A:AD" TYPE=Ethernet NM_CONTROLLED="yes" ONBOOT="yes" BOOTPROTO="none" IPADDR=192.168.100.1 NETMASK=255.255.255.0 NAME=„enp2s0f1"
Am 06.07.2017 um 10:17 schrieb Amine Tengilimoglu aminetengilimoglu@gmail.com:
Hİ all;
i need your helps on setting the virtual ip. I am trying to setup static virtual ip on CenOS7. but I want my VIP to should not open when rebooting.
My interface settings like this:
*for ens33 NIC -> ifcfg-ens33*
DEVICE=ens33 BOOTPROTO=none ONBOOT=yes PREFIX=24 IPADDR=192.168.2.151
*and for VIP NIC ens33:2* * -> ifcfg-ens33:2*
DEVICE=ens33:2 ONBOOT=no ONPARENT=no PREFIX=24 IPADDR=192.168.2.149
i made up ifcfg-ens33:2 from ifcfg-ens33 by copying it... i dont know where i do wrong??
i am waiting for your help...
best regards.... _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On Thu, Jul 06, 2017 at 11:17:12AM +0300, Amine Tengilimoglu wrote:
i need your helps on setting the virtual ip. I am trying to setup static virtual ip on CenOS7. but I want my VIP to should not open when rebooting.
It looks like you're trying to add the second IP on an aliased interface, something that you used to have to do in older releases of CentOS.
In C7, you just add multiple IPs to the interface, no need to use eth0:1 style names.
In the ifcfg-<device>, you can just put in IPADDR1=1.2.3.4 and NETMASK1=255.255.255.0, and PREFIX1=1.2.3.0.
The documentation is in /usr/share/doc/initscripts-9.49.37/sysconfig.txt (part of the initscripts package), which says:
Base items: NAME=<friendly name for users to see> Most important for PPP. Only used in front ends. DEVICE=<name of physical device (except dynamically-allocated PPP devices where it is the "logical name")> IPADDRn= PREFIXn= Network prefix. It is used for all configurations except aliases and ippp devices. It takes precedence over NETMASK when both PREFIX and NETMASK are set. NETMASKn= Subnet mask; just useful for aliases and ippp devices. For all other configurations, use PREFIX instead.
The "n" is expected to be consecutive positive integers starting from 0. It can be omitted if there is only one address being configured.
So, you can have IPADDR0, IPADDR1, IPADDR2, etc.
All of these will configure an IP on the device named in the DEVICE line. No need to have multiple alias interfaces.
On Thu, Jul 06, 2017 at 08:17:17AM -0400, Jonathan Billings wrote:
On Thu, Jul 06, 2017 at 11:17:12AM +0300, Amine Tengilimoglu wrote:
i need your helps on setting the virtual ip. I am trying to setup static virtual ip on CenOS7. but I want my VIP to should not open when rebooting.
It looks like you're trying to add the second IP on an aliased interface, something that you used to have to do in older releases of CentOS.
In C7, you just add multiple IPs to the interface, no need to use eth0:1 style names.
In the ifcfg-<device>, you can just put in IPADDR1=1.2.3.4 and NETMASK1=255.255.255.0, and PREFIX1=1.2.3.0.
The documentation is in /usr/share/doc/initscripts-9.49.37/sysconfig.txt (part of the initscripts package), which says:
There's a clearer explanation, IMHO, with examples, here. https://community.spiceworks.com/topic/545859-add-secondary-ip-to-one-interf...
I don't see mention of it in the RHEL-7 release notes, they just say NM is better than it was, and perhaps there's an easy way to do it with NM.
I've left the text that J.Billings kindly included, in below.
Base items: NAME=<friendly name for users to see> Most important for PPP. Only used in front ends. DEVICE=<name of physical device (except dynamically-allocated PPP devices where it is the "logical name")> IPADDRn= PREFIXn= Network prefix. It is used for all configurations except aliases and ippp devices. It takes precedence over NETMASK when both PREFIX and NETMASK are set. NETMASKn= Subnet mask; just useful for aliases and ippp devices. For all other configurations, use PREFIX instead.
The "n" is expected to be consecutive positive integers starting from 0. It can be omitted if there is only one address being configured.
So, you can have IPADDR0, IPADDR1, IPADDR2, etc.
All of these will configure an IP on the device named in the DEVICE line. No need to have multiple alias interfaces.
-- Jonathan Billings billings@negate.org _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On 6 July 2017 at 15:41, Scott Robbins scottro11@gmail.com wrote:
On Thu, Jul 06, 2017 at 08:17:17AM -0400, Jonathan Billings wrote:
On Thu, Jul 06, 2017 at 11:17:12AM +0300, Amine Tengilimoglu wrote:
i need your helps on setting the virtual ip. I am trying to setup static virtual ip on CenOS7. but I want my VIP to should not open when rebooting.
It looks like you're trying to add the second IP on an aliased interface, something that you used to have to do in older releases of CentOS.
In C7, you just add multiple IPs to the interface, no need to use eth0:1 style names.
In the ifcfg-<device>, you can just put in IPADDR1=1.2.3.4 and NETMASK1=255.255.255.0, and PREFIX1=1.2.3.0.
The documentation is in /usr/share/doc/initscripts-9.49.37/sysconfig.txt (part of the initscripts package), which says:
There's a clearer explanation, IMHO, with examples, here. https://community.spiceworks.com/topic/545859-add-secondary-ip-to-one-interf...
I don't see mention of it in the RHEL-7 release notes, they just say NM is better than it was, and perhaps there's an easy way to do it with NM.
I've left the text that J.Billings kindly included, in below.
Base items: NAME=<friendly name for users to see> Most important for PPP. Only used in front ends. DEVICE=<name of physical device (except dynamically-allocated PPP devices where it is the "logical name")> IPADDRn= PREFIXn= Network prefix. It is used for all configurations except aliases and ippp devices. It takes precedence over NETMASK when both PREFIX and NETMASK are set. NETMASKn= Subnet mask; just useful for aliases and ippp devices. For all other configurations, use PREFIX instead.
The "n" is expected to be consecutive positive integers starting from 0. It can be omitted if there is only one address being configured.
So, you can have IPADDR0, IPADDR1, IPADDR2, etc.
All of these will configure an IP on the device named in the DEVICE line. No need to have multiple alias interfaces.
-- Jonathan Billings billings@negate.org
Don't even go near an aliased interface on EL7 ... it's the most painful way to handle this and not NM compatible.
Here's an article I wrote way back on handling this:
https://www.hogarthuk.com/?q=node/6
Note that with NM in use (as should be the case on EL7) it's as simple as: nmcli con mod <conn-name> +ipv4.addr "10.0.0.2/24"