Hey Lindsay,

Am 30.10.2016 um 02:55 schrieb Lindsay Mathieson:
Is it possible to add a 2nd ip to a linux bond using the following?

auto bond0
iface bond0 inet static
        address  10.10.10.243
        netmask  255.255.255.0
        slaves eth0 eth1 eth2
        bond_miimon 100
        bond_mode balance-rr
        mtu 9000

auto bond0:0
iface eth0:0 inet static
    address 192.168.5.243
    netmask 255.255.255.0

yes


And could it be used in place of a bridge?

yes

In short I need two ip addresses (one private, one public) and I'd like
to bond all three ethernet ports.


a slightly better approach would be:
(linux bridge)

interfaces:

iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual

auto bond0
iface bond0 inet manual
        slaves eth0 eth1 eth2
        bond_miimon 100
        bond_mode balance-rr
        mtu 9000
#bond to private and public

auto vmbr1
iface vmbr1 inet static
        address  10.10.10.243
        netmask  255.255.255.0
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0
        post-up ip a add 192.168.5.243/24 dev vmbr1 || true
        pre-down ip a del 192.168.5.243/24 dev vmbr1 || true
#bridge to private and public

downside: no seperation of internal and external traffic, which is bad.

######################

a (imho) better better approach would be:
(you have to deal with vlans)

# apt-get install vlan

interfaces:

iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual

auto bond0
iface bond0 inet manual
        slaves eth0 eth1 eth2
        bond_miimon 100
        bond_mode balance-rr
        mtu 9000
#bond to private and public

auto vlan100
iface vlan100 inet manual
        mtu 9000
        vlan_raw_device bond0
# vlan 100 to private

auto vlan200
iface vlan200 inet manual
        mtu 9000
        vlan_raw_device bond0
# vlan 200 to public

auto vmbr100
iface vmbr100 inet static
        address  10.10.10.243
        netmask  255.255.255.0
        bridge_ports vlan100
        bridge_stp off
        bridge_fd 0
#bridge to private

auto vmbr200
iface vmbr200 inet static
        address  192.168.5.243
        netmask  255.255.255.0
        bridge_ports vlan100
        bridge_stp off
        bridge_fd 0
#bridge to public



#################################

the (imho) best approach in this situation would be:
(you have to deal with vlans and 802.1aq link aggregation)
(https://en.wikipedia.org/wiki/Link_aggregation)

# apt-get install vlan

interfaces:

iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual

auto bond0
iface bond0 inet manual
        slaves eth0 eth1 eth2
        bond_miimon 100
        bond_mode 802.3ad
        mtu 9000
#bond to private and public

auto vlan100
iface vlan100 inet manual
        mtu 9000
        vlan_raw_device bond0
# vlan 100 to private

auto vlan200
iface vlan200 inet manual
        mtu 9000
        vlan_raw_device bond0
# vlan 200 to public

auto vmbr100
iface vmbr100 inet static
        address  10.10.10.243
        netmask  255.255.255.0
        bridge_ports vlan100
        bridge_stp off
        bridge_fd 0
#bridge to private

auto vmbr200
iface vmbr200 inet static
        address  192.168.5.243
        netmask  255.255.255.0
        bridge_ports vlan100
        bridge_stp off
        bridge_fd 0
#bridge to public



Thanks,


Freundliche Grüße / Best Regards

         Lutz Willek

--
________________________________creating IT solutions
Lutz Willek                     science + computing ag
Senior Systems Engineer         Geschäftsstelle Berlin
IT Services Berlin              Friedrichstraße 187
phone +49(0)30 2007697-21       10117 Berlin, Germany
fax   +49(0)30 2007697-11       http://de.atos.net/sc

S/MIME-Sicherheit:
http://www.science-computing.de/cacert.crt
http://www.science-computing.de/cacert-sha512.crt

_______________________________________________
pve-user mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user

Reply via email to