UlricE / pen

Pen
Other
250 stars 41 forks source link

Multiple DSR VIPs on a single Machine, FreeBSD (+bhyve) #39

Open daviddpd opened 6 years ago

daviddpd commented 6 years ago

I'm running FreeBSD 12.0-CURRENT r32008, in a bhyve VM, on a 12-current r32008 hypervisor. I have the latest pen.

Can pen do multiple DSR VIPs on a single FreeBSD box ? I get that it may require multiple NICs (side question, why?)

If I don't allocate IPs the the NICs, then when starting the second , the entire VM just freezes, including the console. However, I am able to break into the debugger and go a kernel dump.

sudo pen -t 1 -r -O "dsr_if vtnet1" 10.246.0.100:80 10.246.0.93 10.246.0.94 10.246.0.95 10.246.0.96
sudo pen -t 1 -r -O "dsr_if vtnet2" 10.246.0.121:80 10.246.0.93 10.246.0.94 10.246.0.95 10.246.0.96

Why doesn't PEN need to the ARP ? Can't PEN just bind to the VIP IP on the interface, and let the interface/OS do the ARP ? I'm not sure this is the actual issue, but would seemly simplify my use case, unless I have a misunderstanding how the MAC header rewrites work.

vm-bhyve:

loader="bhyveload"
cpu=2
memory=2048M
network0_type="virtio-net"
network0_device="tap191"

network1_type="virtio-net"
network1_device="tap192"

network2_type="virtio-net"
network2_device="tap193"

network3_type="virtio-net"
network3_device="tap194"

network4_type="virtio-net"
network4_device="tap195"

disk0_type="virtio-blk"
disk0_name="disk0"
disk0_dev="sparse-zvol"
network0_mac="0A:DE:AD:BE:EF:00"
network1_mac="2A:DE:AD:BE:EF:00"
network2_mac="2A:DE:AD:BE:EF:01"
network3_mac="2A:DE:AD:BE:EF:02"
network4_mac="2A:DE:AD:BE:EF:03"
uuid="4f2a2491-6b7e-11e7-8860-0cc47a7fc32e"