1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

FreeBSDでLAGG+VLAN tagを使う

Last updated at Posted at 2018-06-02

はじめに

laggでNICを束ね、そこにVLAN tagを通します。

NICを束ねる

em0em1はNICです。

# ifconfig em0 up
# ifconfig em1 up
# ifconfig lagg0 laggproto lacp laggport em0 laggport em1

スイッチとリンクが確立されると以下のようになります。

# ifconfig lagg0
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
        ether 00:15:17:6f:55:ee
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        groups: lagg 
        laggproto lacp lagghash l2,l3,l4
        laggport: em0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
        laggport: em1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>

VLAN用IFを作る

VLAN-IDが101のNICを作ります。

# ifconfig lagg0.101 create
# ifconfig lagg0.101 inet 192.168.1.10 netmask 255.255.255.0

/etc/rc.confに設定を書く

/etc/rc.confには以下のように記述します。

cloned_interfaces="lagg0 lagg0.101"
ifconfig_em0="up"
ifconfig_em1="up"
ifconfig_lagg0="laggproto lacp laggport em0 laggport em1"
ifconfig_lagg0_101="inet 192.168.1.10 netmask 255.255.255.0"
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?