No announcement yet.

Setup a `veth` Virtual Network

  • Filter
  • Time
  • Show
Clear All
new posts

  • Setup a `veth` Virtual Network

    Want to setup 3 virtual network interfaces (veth) which can communicate with each other. To simulate a three node cluster, each program then binds to one veth interface. Is it possible to do without LXC if possible.
    I tried using:
    • Created three veth pairs: sudo ip link add type veth
    • Created a bridge sudo brctl addbr br0
    • Added one of each pair to the bridge:
      • sudo brctl addif br0 veth1
      • sudo brctl addif br0 veth3
      • sudo brctl addif br0 veth5
    • Configured the interfaces:
      • sudo ifconfig veth0 netmask up
      • sudo ifconfig veth2 netmask up
      • sudo ifconfig veth4 netmask up
    Then I verified if is works using: ping -I veth0 but it fails to work
    The I added IP addresses to veth1,veth3,veth5 and br0 interfaces in the 10.0.1.x/24 range. But that doesn't help.
    Any ideas?