Showing posts with label bridge. Show all posts
Showing posts with label bridge. Show all posts

Sunday, 22 May 2022

อย่าลืมปิด Multicast Snooping บน Bridge Interface ถ้าจะติดตั้ง KVM โดยเชื่อมต่อเครือข่ายผ่าน Bridge เพราะอาจะมีปัญหาการใช้งาน IPv6 ของ Guest OS

โดยปกติการติดตั้ง Virtural Machine บน Linux OS หรือ KVM รอบรับใช้งานเครือข่ายระดับ Layer 2 ของ Guest OS ผ่าน Bridge ของ Linux Kernel ซึ่ง Bridge บน Host OS ทำหน้าที่เป็น Switch เชื่อมต่อ Guest OS กับเครือข่าย โดยมี Physical Interface บน Host OS ทำหน้าที่เป็น Uplink port ของ Switch 

แต่เนื่องจาก Bridge ของ Linux มีการเปิด Multicast Snooping เป็นค่าเริ่มต้น โดยนี้จะปิดกั้นการส่ง Multicast บางประเภทไม่ให้ส่งข้าม Bridge ซึ่งฟีเจอร์ Multicast Snooping อาจจะทำให้เครื่อง Guest OS ไม่สามารถเชื่อมต่อกับเครือข่ายผ่าน Bridge ด้วย IPv6 ได้ เนื่องจาก Multicast Snooping ไปปิดกั้นแพคเก็ตของ Neightbor Discovry Protocol (ND) ทำให้ไม่สามารถค้นหาเครื่องที่อยู่อีกฝากของเครือข่ายได้

ดังนั้นเพื่อป้องกันปัญหาได้กลาวมาข้างต้นนั้น จำเป็นต้องปิด Multicast Snooping ด้วยคำสั่งดังนี้

echo -n 0 > /sys/class/net/<brif>/bridge/multicast_snooping


Source : https://askubuntu.com/questions/460405/ipv6-does-not-work-over-bridge


Tuesday, 6 September 2016

How to add network interface card (NIC) to Docker’s container and bridging with phisical NIC


  1. Create Docker Network
    • # docker network create --driver=bridge [docker's network name]
    • *Docker automatically create network bridge with brctl when running command (for linux environment).
  2. Bridge created network with another interface
    • # brctl addif [brid name] [NIC’s name]
    • *brctl show (for lookup bridge name).
    • **Manual add interface to bridge everytime after restart host.
  3. Create Docker Cointainer
  4. Connect Docker to bridge
    • # docker network connect [Network Name] [Container ID]
    • *Container will be connect and automatically create another interface on container that connect with created network.

Import SSH Private Key to Yubikey (PIV) for SSH Authentication

Introduction: This guide will walk you through the process of importing your SSH private key to a Yubikey (PIV) for SSH authentication on y...