IPv4 Address:-
IPv6 Address:-
Service Provider:-
SSL Information:-
HTTP Protocol:-
Database:-
Web:-
Blog Menu


Search articles:
 

Recent articles (showing 61-69 out of 69):

 
Link Aggregation/Bonding in FreeBSD using LACP [29/May/2016]   Speed up FreeBSD reboots by 7 seconds     Zen Broadband with IPv6 using FreeBSD ppp router  

To bond multiple ethernet links together in FreeBSD is fairly simple.  In this example, we'll use LACP which does require some switch configuration to work.

First, we need to ensure the link aggregation module is started at boot, so edit /boot/loader.conf and add the following line:

if_lagg_load="YES" Copy

Now we need to configure the port... in this example we will bond igb0 and bge0 together into a two port LACP bundle.  We will assign the IP 192.0.2.10/24 to the interface.

Add the following to /etc/rc.conf:

cloned_interfaces="lagg0"
ifconfig_igb0="up"
ifconfig_bge0="up"
ifconfig_lagg0="laggproto lacp laggport igb0 laggport bge0 up"
ifconfig_lagg0_alias0="inet 192.0.2.10/24" Copy


Now it's possible to put the IP assignment on the same line as the LACP definitions but I think it looks cleaner separate – so I used an alias instead.

You can use a lagg port in the same way as a normal network port (e.g. clone interfaces from it for vlans etc)

Aggregated ports will use the MAC address from the first "laggport" in the bundle for all ports.

In FreeBSD, LACP is always configured in 'active' mode and system/port priorities use 0x8000 – these are not configurable.

As a quick example, here's how you would configure a Cisco 3750/3850 switchport to support a FreeBSD LACP bundle.  We'll use ports Gi1/0/1 and Gi2/0/1 to create a bundle called Port-channel1.

interface Port-channel1
description LACP Bundle 1
switchport mode access
switchport access vlan 1
switchport nonegotiate
spanning-tree portfast
!
interface Gi1/0/1
description LACP Bundle 1 – 1/2
switchport mode access
switchport access vlan 1
switchport nonegotiate
channel-group 1 mode active
spanning-tree portfast
!
interface Gi2/0/1
description LACP Bundle 1 – 2/2
switchport mode access
switchport access vlan 1
switchport nonegotiate
channel-group 1 mode active
spanning-tree portfast Copy


And you can confirm once it's setup and working (it requires you to have rebooted the FreeBSD server above so that it can negotiate LACP) – you can use the 'show etherchannel summary' command:

Group  Port-channel  Protocol    Ports
-----+-------------+---------+------------------------
1      Po1(SU)         LACP      Gi1/0/1(P) Gi2/0/1(P) Copy


You can see Po1 is up using LACP protocol and both ports in the bundle.

On the FreeBSD server, you can check LACP with 'ifconfig lagg0' command:

    laggproto lacp lagghash l2,l3,l4
    laggport: igb0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
    laggport: bge0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> Copy


You can see both ports are connected and working fine.

  Speed up FreeBSD reboots by 7 seconds     Zen Broadband with IPv6 using FreeBSD ppp router  
Copyright © 2024 Daniel Austin MBCS.
Proudly hosted using the FreeBSD operating system.
 
E-mail me
PGP Key
E-mail me
LOGGED IN
Login
padlock icon
LOGIN ERROR#123: random error here