1

I'm new using FreeBSD and one of the things that we need is two link aggregation interfaces. Looking for on Internet I found out that we can put the configuration on /etc/rc.conf. I tried to config my two interfaces but just one been up.

Here my rc.conf:

hostname="freebsd-t1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
# 
# Enable LACP aggregation -> team0
ifconfig_em2="up"
ifconfig_em2="-lro -tso"
cloned_interfaces="lagg0"
ifconfig_lagg0_name="team0"
ifconfig_team0="laggproto lacp laggport em2"
#
# Enable LACP aggregation -> team1
ifconfig_em0="up"
ifconfig_em1="up"
ifconfig_em0="-lro -tso"
ifconfig_em1="-lro -tso"
cloned_interfaces="lagg1"
ifconfig_lagg1_name="team1"
ifconfig_team1="laggproto lacp laggport em0 laggport em1"
#

The link-aggregation team1 works fine but I nothing about team0. Is there any limit to create link aggregation by default?

Any one pass through this problem?

Just a note: If I try to run all commands on terminal all works fine.

Best regards.

Richard Smith
  • 12,834
  • 2
  • 21
  • 29
Kalil
  • 7
  • 4

1 Answers1

0

The syntax of your rc.conf file is wrong. It is a sh(1) source file. When you set the same variable for a second time, it replaces the previous value. So you need to make all of your values a space separated list.

Try this:

hostname="freebsd-t1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"

cloned_interfaces="lagg0 lagg1"

# Enable LACP aggregation -> team0
ifconfig_em2="-lro -tso up"
ifconfig_lagg0_name="team0"
ifconfig_team0="laggproto lacp laggport em2"

# Enable LACP aggregation -> team1
ifconfig_em0="-lro -tso up"
ifconfig_em1="-lro -tso up"
ifconfig_lagg1_name="team1"
ifconfig_team1="laggproto lacp laggport em0 laggport em1"
Richard Smith
  • 12,834
  • 2
  • 21
  • 29
  • Hello Richard. Very thank for you answer. Know is working fine, just like you putted there. Best regards. – Kalil Dec 09 '15 at 17:51