Netctl でブリッジ接続
表示
関連記事
インストール
設定
/etc/netctl/examples/bridgeを/etc/netctl/bridgeにコピー。- 以下の例では、
br0という名前のブリッジを作成して、実際の Ethernet アダプタeth0と (任意) tap デバイスtap0を接続します。もちろん、br0,eth0,tap0は必要に応じて編集してください。
/etc/netctl/bridge
Description="Example Bridge connection" Interface=br0 Connection=bridge BindsToInterfaces=(eth0 tap0) IP=dhcp
- 以下の例では
br0という名前の静的なブリッジを作成して、実際の Ethernet アダプタeth0を接続します。必要に応じてInterface,BindsToInterfaces,Address,Gatewayを編集してください。
/etc/netctl/bridge
Description="Example Bridge connection" Interface=br0 Connection=bridge BindsToInterfaces=(eth0) IP=static Address='192.168.10.20/24' Gateway='192.168.10.200' ## Ignore (R)STP and immediately activate the bridge SkipForwardingDelay=yes
ヒント 固定 IP を使う場合は、netctl の man ページを見て下さい。また、必要に応じて
/etc/resolv.conf を編集してください。以下の例ではイーサネットデバイスの MAC アドレスをブリッジに割り当てます (参照: https://github.com/joukewitteveen/netctl/issues/111):
/etc/netctl/bridge
Description="Bridge eth0-tap0" Interface=br0 Connection=bridge BindsToInterfaces=(eth0 tap0) IP=no ExecUpPost="ip link set dev br0 address $(cat /sys/class/net/eth0/address); IP=dhcp; ip_set" ExecDownPre="IP=dhcp" ## Ignore (R)STP and immediately activate the bridge SkipForwardingDelay=yes