We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

No ping on Freebsd IPAlias


Dan
05-09-2011, 12:57 PM
Quote Originally Posted by Andrei
Hi guys. Just did a fresh install of Freebsd 8.2 x64 and when I attempted to add the Failover IP's as aliases there's no ping... I used this configuration before when I assigned the IP's to jails, but this time I have no need for a jail and simply need them to be used on the host system. Any ideas?

Here's my rc.conf:

Code:
sshd_enable="YES"
ntpdate_enable="YES"
ntpdate_hosts="213.186.33.99"
fsck_y_enable="YES"
named_enable="YES"
ifconfig_em0="inet 188.165.226.123 netmask 255.255.255.0 broadcast 188.165.226.255"
ifconfig_em0_alias0="inet 94.23.86.111/32"
ifconfig_em0_alias1="inet 94.23.170.222/32"
defaultrouter="188.165.226.254"
hostname="host.name.info"
mysql_enable="YES"
apache_enable="YES"
webmin_enable="YES"
When running "/etc/rc.d/netif restart && /etc/rc.d/routing restart" this is the output:

Code:
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
Stopping Network: lo0 em0 em1.
lo0: flags=8048 metric 0 mtu 16384
        options=3
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        nd6 options=3
em0: flags=8802 metric 0 mtu 1500
        options=219b
        ether 00:25:90:11:5c:fa
        media: Ethernet autoselect (1000baseT )
        status: active
em1: flags=8802 metric 0 mtu 1500
        options=219b
        ether 00:25:90:11:5c:fb
        media: Ethernet autoselect
        status: no carrier
Starting Network: lo0 em0.
lo0: flags=8049 metric 0 mtu 16384
        options=3
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3
em0: flags=8843 metric 0 mtu 1500
        options=219b
        ether 00:25:90:11:5c:fa
        inet 188.165.226.123 netmask 0xffffff00 broadcast 188.165.226.255
        inet 94.23.86.111 netmask 0xffffffff broadcast 94.23.86.111
        inet 94.23.170.222 netmask 0xffffffff broadcast 94.23.170.222
        media: Ethernet autoselect
        status: no carrier
add net default: gateway 188.165.226.254
Any help would be greatly appreciated as the OVH support for IPAlias does not cover FreeBSD.
Hi Andrei,

Could you please complete the following steps in SSH.

1. You need to get the name of your primary network interface. You can use the ifconfig command for this operation:
ifconfig

Gives the following output:

comsdvt# ifconfig
nfe0: flags=8843 metric 0 mtu 1500
options=10b
ether 00:24:8c:d7:ba:11
inet 94.23.196.18 netmask 0xffffff00 broadcast 94.23.196.255
inet 87.98.129.74 netmask 0xffffffff broadcast 87.98.129.74
media: Ethernet autoselect (100baseTX )
status: active
lo0: flags=8049 metric 0 mtu 16384
options=3
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000 v comsdvt#

The name of the interface is therefore: nfe0 2. you should copy the file /etc/rc.conf so that you can go back at any time: You can use the cp command:
cp /etc/rc.conf /etc/rc.conf.back

3. Then edit the file /etc/rc.conf You can use nano or vi editor for this operation
ee /etc/rc.conf

Add the following line at end of the file: ifconfig_INTERFACE_alias0="inet IPFAILOVER netmask 255.255.255.255 broadcast IPFAILOVER"
Replace respectively INTERFACE with IPFAILOVER and the name of the interface from step no 1, and then IPFAILOVER with your own ip failover.
Example:
ifconfig_nfe0_alias0="inet 87.98.129.74 netmask 255.255.255.255 broadcast 87.98.129.74"

4. Restart the network interface
/etc/rc.d/netif restart && /etc/rc.d/routing restart

REMEMBER!!!
Type this command in two separate steps in case of loss of access to your server

5. Test the IP
If the operations 1-4 were done correctly, the specified IP in the file must be pingable from the outside and respond to queries. If after the modifications your IP does not respond to pings, let me know and Ill take a look for you.

D.

Andrei
05-08-2011, 01:47 AM
Hi guys. Just did a fresh install of Freebsd 8.2 x64 and when I attempted to add the Failover IP's as aliases there's no ping... I used this configuration before when I assigned the IP's to jails, but this time I have no need for a jail and simply need them to be used on the host system. Any ideas?

Here's my rc.conf:

Code:
sshd_enable="YES"
ntpdate_enable="YES"
ntpdate_hosts="213.186.33.99"
fsck_y_enable="YES"
named_enable="YES"
ifconfig_em0="inet 188.165.226.123 netmask 255.255.255.0 broadcast 188.165.226.255"
ifconfig_em0_alias0="inet 94.23.86.111/32"
ifconfig_em0_alias1="inet 94.23.170.222/32"
defaultrouter="188.165.226.254"
hostname="host.name.info"
mysql_enable="YES"
apache_enable="YES"
webmin_enable="YES"
When running "/etc/rc.d/netif restart && /etc/rc.d/routing restart" this is the output:

Code:
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
Stopping Network: lo0 em0 em1.
lo0: flags=8048 metric 0 mtu 16384
        options=3
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        nd6 options=3
em0: flags=8802 metric 0 mtu 1500
        options=219b
        ether 00:25:90:11:5c:fa
        media: Ethernet autoselect (1000baseT )
        status: active
em1: flags=8802 metric 0 mtu 1500
        options=219b
        ether 00:25:90:11:5c:fb
        media: Ethernet autoselect
        status: no carrier
Starting Network: lo0 em0.
lo0: flags=8049 metric 0 mtu 16384
        options=3
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3
em0: flags=8843 metric 0 mtu 1500
        options=219b
        ether 00:25:90:11:5c:fa
        inet 188.165.226.123 netmask 0xffffff00 broadcast 188.165.226.255
        inet 94.23.86.111 netmask 0xffffffff broadcast 94.23.86.111
        inet 94.23.170.222 netmask 0xffffffff broadcast 94.23.170.222
        media: Ethernet autoselect
        status: no carrier
add net default: gateway 188.165.226.254
Any help would be greatly appreciated as the OVH support for IPAlias does not cover FreeBSD.