Date: Mon, 19 Mar 2012 00:47:09 +0100 From: Palle Girgensohn <girgen@FreeBSD.org> To: freebsd-jail@freebsd.org Subject: VMNET - problem with epair in jail, cannot ping itself? Message-ID: <4F6673FD.2040809@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Hi! When I create an epair and pu one end inside a jail, and give that interface an IP address, the jail still seems to want to use the lo0 interface to route traffic to that interface on the inside. Everything else works, I can set up bridges just like it would be an ethernet switch, add services on the inside, it is all fine, except this little annoying bug(?). See here: [root@hostname /home/girgen]# ifconfig epair create epair0a [root@hostname /home/girgen]# jail -c vnet name=bar host.hostname=bar path=/ persist [root@hostname /home/girgen]# jls JID IP Address Hostname Path 1 - bar / [root@hostname /home/girgen]# ifconfig epair0b vnet bar [root@hostname /home/girgen]# ifconfig -a bce0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE> ether 00:23:7d:23:9d:44 inet 1.2.3.144 netmask 0xffffffc0 broadcast 1.2.3.191 inet6 fe80::223:7dff:fe23:9d44%bce0 prefixlen 64 scopeid 0x1 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect (1000baseT <full-duplex>) status: active bce1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE> ether 00:23:7d:23:9d:42 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9 inet 127.0.0.1 netmask 0xff000000 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> epair0a: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8<VLAN_MTU> ether 02:f9:05:00:0a:0a nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) status: active [root@hostname /home/girgen]# jexec bar ifconfig -a lo0: flags=8008<LOOPBACK,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> epair0b: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8<VLAN_MTU> ether 02:f9:05:00:0b:0b nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) status: active [root@hostname /home/girgen]# jexec bar ifconfig epair0b 10.1.1.2 netmask 0xffffff00 up [root@hostname /home/girgen]# jexec bar ping 10.1.1.2 PING 10.1.1.2 (10.1.1.2): 56 data bytes ^C --- 10.1.1.2 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss [root@hostname /home/girgen]# jexec bar route -n get 10.1.1.2 route to: 10.1.1.2 destination: 10.1.1.2 interface: lo0 flags: <UP,HOST,DONE,STATIC> recvpipe sendpipe ssthresh rtt,msec mtu weight expire 0 0 0 0 16384 1 0 [root@hostname /home/girgen]# Now why would the jail think that lo0 is the way to go to find 10.1.1.2? This is a minimal setup, adding an outside address, routing and all other things work, but the jail still tries lo0 to contact itself, no matter if it is ping or regular tcp traffic. Is this a bug or am I missing something? The jail can ping any address in the world, but cannot contact itself. Ideas? Palle
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F6673FD.2040809>