Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2017 17:18:23 -0400
From:      "James B. Byrne" <byrnejb@harte-lyne.ca>
To:        freebsd-questions@freebsd.org
Subject:   IPv6 experimentation in jails.
Message-ID:  <2d8044a2a2d8a5dd0f73d7db03bb962b.squirrel@webmail.harte-lyne.ca>

next in thread | raw e-mail | index | archive | help
How does one enable and properly configure a working ipv6 i/f on a
Freebsd host where the host is presently located on an ipv4 network
with no ipv6 gateway?

I have tried putting this in /etc/rc.conf

### IPv6 setting
ifconfig_em0_ipv6="inet6 accept_rtadv"        # Assign address from rtadv
rtsold_enable="YES"                           # enable router
solicitation
#ipv6_defaultrouter="::00:192.168.209.1"      # Support for IPv6 on
router
ipv6_defaultrouter="::ff:192.168.209.1"       # No support for IPv6 on
router

and this in the relevant ezjail config:

export jail_hllmx18_hostname="hllmx18"
export jail_hllmx18_ip="\
  lo2|127.0.2.1,\
  em0|192.168.209.18,\
  em0|192.168.209.118,\
  em0|::2"


Which results in this:

ezjail-admin list
STA JID  IP              Hostname                 Root Directory
--- ---- --------------- ------------------       -------------------
ZR  1    127.0.2.1       hllmx18                  /usr/jails/hllmx18
    1      em0|192.168.209.18
    1      em0|192.168.209.118
    1      em0|::2


However, ifconfig shows this:

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
	ether 00:1c:c0:f2:1f:9e
	inet 192.168.209.41 netmask 0xffffff00 broadcast 192.168.209.255
	inet 192.168.209.33 netmask 0xffffffff broadcast 192.168.209.33
	inet 192.168.209.133 netmask 0xffffffff broadcast 192.168.209.133
	inet6 fe80::21c:c0ff:fef2:1f9e%em0 prefixlen 64 scopeid 0x1
	nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
	ether 00:0a:cd:1d:44:fe
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (10baseT/UTP <half-duplex>)
	status: no carrier
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>
	groups: lo
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
	inet 192.168.209.33 netmask 0xffffffff
	inet 127.0.1.1 netmask 0xffffffff
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	groups: lo
lo2: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
	inet 192.168.209.18 netmask 0xffffffff
	inet 127.0.2.1 netmask 0xffffffff
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	groups: lo
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33160
	groups: pflog

As well, this configuration breaks the assignment of 192.168.209.18 to
the jail:

ssh 192.168.209.18  -t -Y 'bash || sh'
ssh: connect to host 192.168.209.18 port 22: No route to host

ping 192.168.209.18
PING 192.168.209.18 (192.168.209.18) 56(84) bytes of data.)
>From 192.168.209.2 icmp_seq=2 Destination Host Unreachable


I do not see anything in the way of an ipv6 being made available to
lo2.  What other steps are required?  Why is the existing ipv4 address
mapping broken when I do this?


-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2d8044a2a2d8a5dd0f73d7db03bb962b.squirrel>