correctly putting all bhyve vm's on the same internal networtk
Aryeh Friedman
aryeh.friedman at gmail.com
Tue Feb 25 01:25:33 UTC 2014
Forgot that net.inet.ip.forwarding=1
On Mon, Feb 24, 2014 at 8:20 PM, Aryeh Friedman <aryeh.friedman at gmail.com>wrote:
> Setting up a ineternal network on the bridge nic seems to now allow guests
> to communicate (see below for failed attempt transcript)
>
> root at lilith:/tmp # ifconfig bridge0 192.168.0.1
> ...
> Install an instance and put it on 192.168.0.2
> ...
> Host:
>
> root at lilith:/tmp # netstat -nr
> Routing tables
>
> Internet:
> Destination Gateway Flags Refs Use Netif Expire
> default 10.0.10.1 UGS 0 0 re0
> 10.0.10.0/24 link#2 U 0 107642 re0
> 10.0.10.20 link#2 UHS 0 0 lo0
> 127.0.0.1 link#3 UH 0 4 lo0
> 192.168.0.0/24 link#4 U 0 316 bridge
> 192.168.0.1 link#4 UHS 0 68 lo0
> ...
>
> ral0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
> ether 20:10:7a:58:b9:29
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> status: no carrier
> re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
>
> options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
> ether e8:40:f2:97:38:d1
> inet 10.0.10.20 netmask 0xffffff00 broadcast 10.0.10.255
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> media: Ethernet autoselect (1000baseT <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 0x3
> inet 127.0.0.1 netmask 0xff000000
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
> ether 02:66:19:ad:68:00
> inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
> nd6 options=1<PERFORMNUD>
> 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: tap8 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 6 priority 128 path cost 2000000
> member: tap3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 5 priority 128 path cost 2000000
> member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 2 priority 128 path cost 20000
> tap3: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
> options=80000<LINKSTATE>
> ether 00:bd:1a:4b:06:03
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: Ethernet autoselect
> status: no carrier
> tap8: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
> options=80000<LINKSTATE>
> ether 00:bd:65:09:16:08
> inet6 fe80::2bd:65ff:fe09:1608%tap8 prefixlen 64 scopeid 0x6
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: Ethernet autoselect
> status: active
> Opened by PID 1362
> root at lilith:/tmp # ifconfig
> ral0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
> ether 20:10:7a:58:b9:29
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> status: no carrier
> re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
>
> options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
> ether e8:40:f2:97:38:d1
> inet 10.0.10.20 netmask 0xffffff00 broadcast 10.0.10.255
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> media: Ethernet autoselect (1000baseT <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 0x3
> inet 127.0.0.1 netmask 0xff000000
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
> ether 02:66:19:ad:68:00
> inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
> nd6 options=1<PERFORMNUD>
> 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: tap8 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 6 priority 128 path cost 2000000
> member: tap3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 5 priority 128 path cost 2000000
> member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 2 priority 128 path cost 20000
> tap3: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
> options=80000<LINKSTATE>
> ether 00:bd:1a:4b:06:03
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: Ethernet autoselect
> status: no carrier
> tap8: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
> options=80000<LINKSTATE>
> ether 00:bd:65:09:16:08
> inet6 fe80::2bd:65ff:fe09:1608%tap8 prefixlen 64 scopeid 0x6
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: Ethernet autoselect
> status: active
> Opened by PID 1362
> root at lilith:/tmp #
> root at lilith:/tmp #
> root at lilith:/tmp # ifconfig
> ral0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
> ether 20:10:7a:58:b9:29
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> status: no carrier
> re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
>
> options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
> ether e8:40:f2:97:38:d1
> inet 10.0.10.20 netmask 0xffffff00 broadcast 10.0.10.255
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> media: Ethernet autoselect (1000baseT <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 0x3
> inet 127.0.0.1 netmask 0xff000000
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
> ether 02:66:19:ad:68:00
> inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
> nd6 options=1<PERFORMNUD>
> 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: tap8 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 6 priority 128 path cost 2000000
> member: tap3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 5 priority 128 path cost 2000000
> member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 2 priority 128 path cost 20000
> tap3: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
> options=80000<LINKSTATE>
> ether 00:bd:1a:4b:06:03
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: Ethernet autoselect
> status: no carrier
> tap8: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
> options=80000<LINKSTATE>
> ether 00:bd:65:09:16:08
> inet6 fe80::2bd:65ff:fe09:1608%tap8 prefixlen 64 scopeid 0x6
> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> media: Ethernet autoselect
> status: active
> Opened by PID 1362
> ...
> root at lilith:/tmp # ping 128.114.27.16
> PING 128.114.27.16 (128.114.27.16): 56 data bytes
> 64 bytes from 128.114.27.16: icmp_seq=0 ttl=45 time=164.864 ms
> 64 bytes from 128.114.27.16: icmp_seq=1 ttl=45 time=184.155 ms
> 64 bytes from 128.114.27.16: icmp_seq=2 ttl=45 time=222.135 ms
> ...
> $ ping 192.168.0.2
> PING 192.168.0.2 (192.168.0.2): 56 data bytes
> 64 bytes from 192.168.0.2 <http://192.168.0.1>: icmp_seq=0 ttl=64
> time=0.225 ms
> 64 bytes from 192.168.0.2 <http://192.168.0.1>: icmp_seq=1 ttl=64
> time=3.790 ms
> ...
> login into guest
> ...
> $ ping 192.168.0.1
> PING 192.168.0.1 (192.168.0.1): 56 data bytes
> 64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=0.225 ms
> 64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.790 ms
> ^C
> --- 192.168.0.1 ping statistics ---
> 2 packets transmitted, 2 packets received, 0.0% packet loss
> round-trip min/avg/max/stddev = 0.225/2.007/3.790/1.783 ms
> $ ping 10.0.10.20
> PING 10.0.10.20 (10.0.10.20): 56 data bytes
> 64 bytes from 10.0.10.20: icmp_seq=0 ttl=64 time=0.222 ms
> 64 bytes from 10.0.10.20: icmp_seq=1 ttl=64 time=0.121 ms
> ^C
> --- 10.0.10.20 ping statistics ---
> 2 packets transmitted, 2 packets received, 0.0% packet loss
> round-trip min/avg/max/stddev = 0.121/0.171/0.222/0.051 ms
> $ ping 10.0.10.1
> PING 10.0.10.1 (10.0.10.1): 56 data bytes
> ^C
> --- 10.0.10.1 ping statistics ---
>
>
> --
> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>
--
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
More information about the freebsd-virtualization
mailing list