Unable to change sysctl setting

Status
Not open for further replies.

orjan-

Dabbler
Joined
Apr 17, 2018
Messages
20
I'm testing out vnet configuration on my jails, running a fresh install of 11.1U4. This documentation says that four values needs to be set in sysctl when using vnet, and the default values for these are the opposite to what the guide says that they should be. I have tried to set all four values trough the "web gui - Tunables" page, however the setting "net.inet.ip.forwarding=1" does not take effect and remain at the default value 0. Setting the 3 other values works. the net.inet.ip.forwarding should regulate forwarding between interfaces.

Is this a bug, or is there another setting somewhere that will override the "web gui - Tunables" page and set it back to 0?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Shouldn't that be net.inet.ip.forwarding=1 ?
 

orjan-

Dabbler
Joined
Apr 17, 2018
Messages
20
Shouldn't that be net.inet.IP.forwarding=1 ?

It seems that the forum somehow changes lowercase "ip" to uppercase "IP". What i wrote and the setting I'm using has lowercase "ip" in it.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I didn't notice that. Hopefully someone who has made more use of iocage than me will come along. But if you use the jail wizard in the new UI to create a iocage jail selecting dhcp & vnet, then ip forwarding is not set to one on the host, e.g:

Code:
root@freenas:/mnt/iocage/jails # iocage get interfaces LMSJail	
vnet0:bridge0
root@freenas:/mnt/iocage/jails # iocage get vnet LMSJail	  
on
root@freenas:/mnt/iocage/jails # sysctl -a | grep forwarding  
net.inet.ip.forwarding: 0
net.inet6.ip6.forwarding: 0
root@freenas:/mnt/iocage/jails #


FreeNAS network:

Code:
root@freenas:/mnt/iocage/jails # ifconfig
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=2098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
		ether b6:42:07:e4:a1:ea
		hwaddr b6:42:07:e4:a1:ea
		inet 192.168.0.106 netmask 0xffffff00 broadcast 192.168.0.255 
		nd6 options=9<PERFORMNUD,IFDISABLED>
		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 0x2 
		inet 127.0.0.1 netmask 0xff000000 
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
		groups: lo 
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		ether 02:7b:d8:24:05: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: vnet0:1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 4 priority 128 path cost 2000
		member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 1 priority 128 path cost 20000
vnet0:1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		description: associated with jail: LMSJail
		options=8<VLAN_MTU>
		ether 02:ff:60:f5:b9:45
		hwaddr 02:57:10:00:04:0a
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair 


Jail network:

Code:
root@LMSJail:~ # ifconfig
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 0x1 
		inet 127.0.0.1 netmask 0xff000000 
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
		groups: lo 
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:ff:60:f5:b9:46
		hwaddr 02:57:10:00:05:0b
		inet 192.168.0.207 netmask 0xffffff00 broadcast 192.168.0.255 
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair 
root@LMSJail:~ # netstat -rn
Routing tables

Internet:
Destination		Gateway			Flags	 Netif Expire
default			192.168.0.254	  UGS	 epair0b
127.0.0.1		  link#1			 UH		  lo0
192.168.0.0/24	 link#2			 U	   epair0b
192.168.0.207	  link#2			 UHS		 lo0

Internet6:
Destination					   Gateway					   Flags	 Netif Expire
::/96							 ::1						   UGRS		lo0
::1							   link#1						UH		  lo0
::ffff:0.0.0.0/96				 ::1						   UGRS		lo0
fe80::/10						 ::1						   UGRS		lo0
fe80::%lo0/64					 link#1						U		   lo0
fe80::1%lo0					   link#1						UHS		 lo0
ff02::/16						 ::1						   UGRS		lo0
root@LMSJail:~ #
 
Status
Not open for further replies.
Top