• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Virtual ip addresses fail to assign to PPOE Interface

Scheduled Pinned Locked Moved HA/CARP/VIPs
6 Posts 4 Posters 913 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    Mr_p
    last edited by Oct 7, 2019, 9:20 PM

    Hello,

    My ISP allocate me a range of 5 ip addresses - One of which i want to use as the outbound address for an OpenVPN VPN.

    In doing so, i've found that my additional virtual ip addresses are not assigned to the pppoe interface when it comes up or when i create the virtual ip addresses.

    Checking the logs i see the following error:

    /firewall_virtual_ip.php: The command '/sbin/ifconfig 'pppoe0' inet '62.249.xxx.123'/'32' c' returned exit code '1', the output was 'ifconfig: ioctl (SIOCAIFADDR): Destination address required'

    and vip doest appear assigned to the pppoe interface when i run ifconfig.

    I can manually add the address using what appears to be the correct syntax:

    /sbin/ifconfig pppoe0 inet 62.249.206.123/32 alias ppoe-isp-gw-ip

    the virtual ip address appears and works as expected - i.e. the Openvpn connects from the virtual ip.

    Clearly, this configuration is lost through a reboot OR when the WAN interface disconnects and reconnected.

    This this a bug or am i missing something?

    Thanks

    Iain

    1 Reply Last reply Reply Quote 0
    • K
      KOM
      last edited by Oct 7, 2019, 11:27 PM

      What type of VIP are you creating? Are you sure the /32 is the correct mask for your 5 IPs?

      1 Reply Last reply Reply Quote 0
      • M
        Mr_p
        last edited by Oct 8, 2019, 7:25 AM

        The VIPs are of type IP Alias - Created in the firewall -> virtual ips screen.

        The primary ip address is assigned to the pppoe interface via DHCP and im not entirely sure what the correct mask would be.....

        The interface shows its ip address as /32

        I also tried /28, but this had the same result.

        The /32 works, but only if I run the command to add the address manually as above.

        Thanks

        1 Reply Last reply Reply Quote 0
        • M
          Mr_p
          last edited by Oct 9, 2019, 9:07 PM

          Ok - I've managed to find the line of code that issues the ipconfig command and "fix" the issue.....

          /etc/inc/interfaces.inc - line 2880.

          mwexec("/sbin/ifconfig " . escapeshellarg($realif) ." {$af} ". escapeshellarg($vip['subnet']) ."/" . escapeshellarg($vip['subnet_bits']) . " alias {$vhid}");

          i'm not entirely sure what $vhid was supposed to be used for/set to - but it appears not to be set when that code runs.

          The "fix" was to add ppoe-isp-gw-ip after the alias parameter, so:

          mwexec("/sbin/ifconfig " . escapeshellarg($realif) ." {$af} ". escapeshellarg($vip['subnet']) ."/" . escapeshellarg($vip['subnet_bits']) . " alias ppoe-isp-gw-ip {$vhid}");

          Now my vips are correctly set when the pppoe interface comes up and Openvpn can bind to the selected vip.

          Iain

          1 Reply Last reply Reply Quote 2
          • R
            Rob
            last edited by Sep 16, 2020, 7:01 PM

            I have what appears to be exactly the same problem.
            ppoe interface with a range of 8 IP addresses.
            Info from ISP:
            ####################
            Number of IP addresses: 8
            IP addresses: XXX.XXX.XXX.168 - XXX.XXX.XXX.175
            Subnet mask: 255.255.255.248
            Subnet in slash notation: XXX.XXX.XXX.168 /29
            Network address: XXX.XXX.XXX.168
            Broadcast address: XXX.XXX.XXX.175
            Router address: XXX.XXX.XXX.174
            Number of IP addresses usable by your hosts: 5
            ####################
            If I try and create a VIP's of .169 through to .173 on the interface with a /32 or /29 mask I get the same errors as the OP. Again similar to the OP I can manually create an alias to .168 and it works as expected but obviously lost on a reboot.

            Is this expected behaviour or am I doing something wrong?

            1 Reply Last reply Reply Quote 0
            • V
              viktor_g Netgate
              last edited by Sep 17, 2020, 5:54 AM

              added to https://redmine.pfsense.org/issues/7132#note-7

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received