0

We have network interface eno1 and configured it as br1

allow-hotplug eno1
iface eno1 inet manual

auto br1
    iface br1 inet static
            address 208.43.222.51
            network 255.255.255.248
            netmask 255.255.255.0
            broadcast 208.43.222.55
            gateway 208.43.222.49
            bridge_ports eno1
            bridge_stp off
            bridge_fd 0
            bridge_maxwait 0

Now we want more IPs and ordered one more /29 subnet from ISP 208.43.221.40/29 How to configure it using /etc/network/interfaces to add to existing br1

0

Use a virtual interface such as br1:0 to add a "second" interface.

A rough example would be something like this:

auto br1:0
    iface br1:0 inet static
        address x.x.x.x
        network x.x.x.x
        netmask x.x.x.x
        broadcast x.x.x.x
        gateway x.x.x.x
        bridge_ports eno1
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

Or however you need it specifically. This allows you to have 2 different subnets on 1 interface.

Check out these post for more information on doing this: 1 2 3

0

Finally it's simple in debian:

auto br1
    iface br1 inet static
            address 208.43.222.51
            network 255.255.255.248
            netmask 255.255.255.0
            broadcast 208.43.222.55
            gateway 208.43.222.49
            bridge_ports eno1
            bridge_stp off
            bridge_fd 0
            bridge_maxwait 0

    iface br1 inet static
            address 208.43.221.42
            network 208.43.221.40
            netmask 255.255.255.248
            broadcast 208.43.221.47
            gateway 208.43.221.41
            bridge_ports eno1
            bridge_stp off
            bridge_fd 0
            bridge_maxwait 0

and

systemctl restart networking.service
  • Don't expect having two default gateways to behave as you would like it behaves. Usually multi homing requires policy routing with multiple routing tables. (If those IPs are for vm/containers, expected behaviour can be easier to reach) – A.B Jun 25 '19 at 21:19
  • Yes, we are using additional ips for lxc containers. What i still don't know how to do is not to assign one ip for main server and use it only as route for network. In that case I'll have one more additional IP for LXC container and not wasting it. – marchelly Jun 27 '19 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.