Server on Hosting VDS/VPS
HOST SYSTEM FreeBSD 11 Release (last update - use subversion)
Provider give IP addresses 200.100.200.100/29 (example adresses)
Gateway 200.100.200.97
DNS 8.8.8.8
Host SYSTEM
# ifconfig
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=98<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 00:50:57:7d:f7:f2
inet 200.100.200.98 netmask 0xfffffff8 broadcast 200.100.200.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
# ifconfig tap0 create
# ifconfig bridge0 create
# ifconfig bridge0 addm em0 addm tap0 up
# ifconfig
tap0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:bd:ee:6e:fa:00
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
groups: tap
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:ba:05:cb:3e:00
nd6 options=9<PERFORMNUD,IFDISABLED>
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 20000
member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 6 priority 128 path cost 2000000
# sysctl -a | grep net.link.bridge
net.link.bridge.ipfw: 0
net.link.bridge.allow_llz_overlap: 0
net.link.bridge.inherit_mac: 0
net.link.bridge.log_stp: 0
net.link.bridge.pfil_local_phys: 0
net.link.bridge.pfil_member: 0
net.link.bridge.ipfw_arp: 0
net.link.bridge.pfil_bridge: 0
net.link.bridge.pfil_onlyip: 0[/CODE]
When guest boot and open shell
On the HOST enter commands
Guest FreeBSD 11.0
Guest boot and open shell
Yes, gateway for VM will be host and use this address (when try use gateway 200.100.200.97 no ping too)
Guest system
no ping.....
Maybe I'm missing something or Hosting VDS/VPS must turn on some options ?
Help please
HOST SYSTEM FreeBSD 11 Release (last update - use subversion)
Provider give IP addresses 200.100.200.100/29 (example adresses)
Gateway 200.100.200.97
DNS 8.8.8.8
Host SYSTEM
Code:
# uname -simnr
FreeBSD srv-vds 11.0-RELEASE-p8 amd64 SRV-VDS
Use bhyve
[CODE]# kldload vmm
# ifconfig
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=98<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 00:50:57:7d:f7:f2
inet 200.100.200.98 netmask 0xfffffff8 broadcast 200.100.200.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
# ifconfig tap0 create
# ifconfig bridge0 create
# ifconfig bridge0 addm em0 addm tap0 up
# ifconfig
tap0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:bd:ee:6e:fa:00
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: no carrier
groups: tap
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:ba:05:cb:3e:00
nd6 options=9<PERFORMNUD,IFDISABLED>
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 20000
member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 6 priority 128 path cost 2000000
# sysctl -a | grep net.link.bridge
net.link.bridge.ipfw: 0
net.link.bridge.allow_llz_overlap: 0
net.link.bridge.inherit_mac: 0
net.link.bridge.log_stp: 0
net.link.bridge.pfil_local_phys: 0
net.link.bridge.pfil_member: 0
net.link.bridge.ipfw_arp: 0
net.link.bridge.pfil_bridge: 0
net.link.bridge.pfil_onlyip: 0[/CODE]
When guest boot and open shell
On the HOST enter commands
Code:
# ifconfig tap0 up
# ifconfig bridge0 up
Guest FreeBSD 11.0
Code:
# cat bhyve_freebsd
#!/bin/sh
bhyve -c 1 -s 7,fbuf,tcp=200.100.200.98:5920,wait \
-s 0,hostbridge \
-s 3,ahci-hd,/vmdata/virtual.hdd \
-s 4,ahci-cd,/vmdata/FreeBSD-11.0-RELEASE-amd64-disc1.iso \
-s 10,virtio-net,tap0 \
-s 31,lpc -l bootrom,/vmdata/BHYVE_UEFI.fd \
-m 2G -H -w fbsd
Guest boot and open shell
Code:
# ifconfig vtnet 200.100.200.101 255.255.255.248
# ifconfig
vtnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
ether 00:a0:98:a1:89:eb
inet 200.100.200.101 netmask 0xfffffff8 broadcast 200.100.200.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet 10Gbase-T <full-duplex>
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
Yes, gateway for VM will be host and use this address (when try use gateway 200.100.200.97 no ping too)
Code:
# route add default 200.100.200.98
Guest system
Code:
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
33 packets transmitted, 0 packets received, 100.0% packet loss
no ping.....
Maybe I'm missing something or Hosting VDS/VPS must turn on some options ?
Help please