Powered by eUKhost®

Announcement

Collapse
No announcement yet.

Setup a `veth` Virtual Network

Collapse
X
  • 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 10.0.0.201 netmask 255.255.255.0 up
      • sudo ifconfig veth2 10.0.0.202 netmask 255.255.255.0 up
      • sudo ifconfig veth4 10.0.0.203 netmask 255.255.255.0 up
    Then I verified if is works using: ping -I veth0 10.0.0.202 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?
ban-img
Working...
X