Home Forums HAast (High Availability for Asterisk) Configuration & Optimization No option to configure gateway for VoIP NIC

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Avatar photoCustomer Inquiry
    Post count: 197

    I am using the [voipnic] settings in haast.conf and am able to successfully create a vNIC with an address on my vLAN. The command ifconfig shows:

    eth0.haast: flags=4163 mtu 1500
    inet netmask broadcast
    ether 02:22:5d:f2:28:ac txqueuelen 1000 (Ethernet)
    RX packets 14010138 bytes 3242747570 (3.0 GiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 13347852 bytes 3208082831 (2.9 GiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    But I don’t see a gateway set above, and there is no gateway setting in the [voipnic] settings. I tried placing the default gateway into a file called ifcfg-eth0.haast file but that isn’t having any effect. Is HAAst missing this setting in the [voipnic] stanza?

    Avatar photoTelium Support Group
    Post count: 258

    Some Linux distributions allow you to configure routing information along with the NIC (in the same NIC configuration file); however, this is misleading – in fact, newer Linux distros no longer allow this practice. Routing information has nothing to do with the NIC. Routing information (eg: default gateway / subnet gateway) is added to the routing table not the NIC.

    If you would like to add a route to the routing table from a terminal window then enter a command like:

    route add -net netmask gw

    If you would like this route to persist between reboots you would have to enter this information into a config file/script. If you are using the Commercial Unlimited edition of HAAst then you can add the above line to the pre-start event handler /usr/local/haast/events/asterisk.start.pre This event handler will run before the vNIC is brought up so the route will be present when needed. If you like you can also delete this route by adding a line to the the post-stop event handler /usr/local/haast/events/asterisk.stop.post

    If you are not using the Commercial Unlimited Edition of HAAst, then you will need to find the most suitable place for these routing rules (which varies considerably between Linux distributions). In your case I suspect you are using a RedHat flavour of Linux, so you could create a file called /etc/sysconfig/network-scripts/route-eth0 with:

    default dev eth0 via dev eth0 via dev eth0

    but you should check the guides for your Linux distro to confirm the best place to place ‘persistent routes’. If you are looking for routes to be added/deleted based on HAAst events then you should use the HAAst event handler instead.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.