unix:freebsd:system_builds:networking
Differences
This shows you the differences between two versions of the page.
| — | unix:freebsd:system_builds:networking [2023/06/04 03:35] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== BSD Networking ====== | ||
| + | |||
| + | This is actually " | ||
| + | |||
| + | ===== LAPC (bonding) ===== | ||
| + | |||
| + | Edit / | ||
| + | |||
| + | < | ||
| + | ifconfig_bce0=" | ||
| + | ifconfig_bce1=" | ||
| + | cloned_interfaces=" | ||
| + | ifconfig_lagg0=" | ||
| + | </ | ||
| + | |||
| + | * Bring up all interfaces (two shown) | ||
| + | * create the " | ||
| + | * Define the new interface as normal (ifconfig_lagg0 above) | ||
| + | |||
| + | The mode (laggproto) is one of: | ||
| + | * failover | ||
| + | * loadbalance | ||
| + | * fec (old Cisco switches, same as loadbalance) | ||
| + | * lacp (must be configured on switch also) | ||
| + | * roundrobin (USE WITH CAUTION) | ||
| + | |||
| + | Best thing would be to use lacp if you can set up the switch, otherwise use either failover (preferred) or fec | ||
| + | |||
| + | ===== vlan ===== | ||
| + | |||
| + | In / | ||
| + | < | ||
| + | vlans_bce0=" | ||
| + | ifconfig_bce0_10=" | ||
| + | ifconfig_bce0_20=" | ||
| + | ifconfig_bce0_30=" | ||
| + | ifconfig_bce0_40=" | ||
| + | ifconfig_bce0_50=" | ||
| + | </ | ||
| + | |||
| + | NOTE: notice the use of // | ||
| + | |||
| + | ===== vlan plus bonding ===== | ||
| + | |||
| + | In the following configuration, | ||
| + | |||
| + | bce0 and bce1 will be paired into lagg0, and work on vlans 10, 20, 30 and 40. | ||
| + | |||
| + | em0 and em1 will be paired into lagg1, and work only with vlan 50. | ||
| + | |||
| + | when you are done, ifconfig should show you all the interfaces, properly sorted. | ||
| + | |||
| + | < | ||
| + | ifconfig_bce0=" | ||
| + | ifconfig_bce1=" | ||
| + | cloned_interfaces=" | ||
| + | ifconfig_lagg0=" | ||
| + | |||
| + | vlans_lagg0=" | ||
| + | ifconfig_lagg0_10=" | ||
| + | ifconfig_lagg0_20=" | ||
| + | ifconfig_lagg0_30=" | ||
| + | ifconfig_lagg0_40=" | ||
| + | |||
| + | # iscsi interface | ||
| + | ifconfig_em0=" | ||
| + | ifconfig_em1=" | ||
| + | ifconfig_lagg1=" | ||
| + | |||
| + | vlans_lagg1=" | ||
| + | ifconfig_lagg1_50=" | ||
| + | </ | ||
| + | |||
| + | ===== Manual Setup ===== | ||
| + | In a few cases, I've had to manually bring up an interface, so here are the notes on that. This sets up an LACP LAGG (named lagg0) using two ports (igb0 and igb1) on 192.168.1.5/ | ||
| + | NOTE: you are responsible for ensuring the IP is not duplicated, and the default route is correct. | ||
| + | |||
| + | <code bash> | ||
| + | # bring up the two network ports | ||
| + | ifconfig igb0 up | ||
| + | ifconfig igb1 up | ||
| + | # create the link aggregation as lagg0 | ||
| + | ifconfig lagg0 create | ||
| + | # configure lagg0 | ||
| + | ifconfig lagg0 up laggproto lacp laggport igb0 laggport igb1 192.168.1.5/ | ||
| + | # set default route to 192.168.1.1 | ||
| + | route add default 192.168.1.1 | ||
| + | # see routing table | ||
| + | netstat -r | ||
| + | </ | ||
| + | ===== Resources ===== | ||
| + | * https:// | ||
| + | * https:// | ||
unix/freebsd/system_builds/networking.1513575543.txt.gz · Last modified: (external edit)
