ifconfig: SIOCIFCREATE2: Invalid argument

I am trying to create a network alias for a jail I want to install NextCloud in, but when I run ifconfig nxt0 create, I get the following error:

ifconfig: SIOCIFCREATE2: Invalid argument

I read on this forum post that there may be something wrong with my kernel modules but unfortunately there was no real solution offered.

My server recently suffered multiple repeated power losses when my house lost power due to a storm (the power would come back on for a few seconds before getting cut off, taking the server with it), so there is a very good chance that there is some sort of corruption or out of sync issues going on but I am not sure how to fix the problem.

I am running FreeBSD 12.1-RELEASE.
 
Do you really have an interface called "interface"?
ifconfig():
Code:
     interface
             This parameter is a string of the form "name unit", for example,
             "ed0".
 
Do you really have an interface called "interface"?
ifconfig():
Code:
     interface
             This parameter is a string of the form "name unit", for example,
             "ed0".

No, I am trying to create a new interface called 'nxt0' but when I try to do that I get the error. The command I am using is ifconfig nxt0 create. I also updated my original post to correct the mistake in commands I made.
 
First make sure you have the correct name for the interface by querying:
pciconf -lv| grep -B3 -i network
Then check to make sure it exists:
ifconfig
If it exists there you will need to configure it for either DHCP or a Static IP address.
 
First make sure you have the correct name for the interface by querying:
pciconf -lv| grep -B3 -i network
Then check to make sure it exists:
ifconfig
If it exists there you will need to configure it for either DHCP or a Static IP address.


This is a network alias for a jail. My actual physical network device is perfectly functional and I am able to connect to a network and the Internet. I am getting the error when I try to create a new alias for my jail to use.
 
apropos nxt ... man bnxt(4) is this what you mean? Obsoleted by previous post

Code:
root@server:/home/brian # apropos nxt
CMSG_DATA, CMSG_FIRSTHDR, CMSG_LEN, CMSG_SPACE, CMSG_NEXTHDR, CMSG_NXTHDR(3) - socket control message routines for ancillary data access
sysdecode_mask, sysdecode_atflags, sysdecode_fcntl_fileflags, sysdecode_fileflags, sysdecode_filemode, sysdecode_flock_operation, sysdecode_mlockall_flags, sysdecode_mmap_flags, sysdecode_mmap_prot, sysdecode_mount_flags, sysdecode_msg_flags, sysdecode_msync_flags, sysdecode_open_flags, sysdecode_pipe2_flags, sysdecode_reboot_howto, sysdecode_rfork_flags, sysdecode_sctp_nxt_flags, sysdecode_sctp_rcv_flags, sysdecode_sctp_snd_flags, sysdecode_semget_flags, sysdecode_sendfile_flags, sysdecode_shmat_flags, sysdecode_socket_type, sysdecode_thr_create_flags, sysdecode_umtx_cvwait_flags, sysdecode_umtx_rwlock_flags, sysdecode_vmprot, sysdecode_wait4_options, sysdecode_wait6_options, sysdecode_accessmode, sysdecode_capfcntlrights(3) - print name of various bitmask values
bnxt, if_bnxt(4) - Broadcom NetXtreme-C/NetXtreme-E Family Ethernet driver
 
This is a network alias for a jail. My actual physical network device is perfectly functional and I am able to connect to a network and the Internet. I am getting the error when I try to create a new alias for my jail to use.
Alias would need to be created in /etc/rc.conf or from the command prompt like this:
ifconfig nxt0 192.168.1.5 netmask 255.255.255.255 alias

Have you had a look at this page. It is really informative about VNET jails..
 
Phishfry, where do you have all this knowledge you are presenting to us? Do you put every link you're stumbling across into a knowledge database? Or do you look it up in a search engine?
 
I do like to read. My sources are here on the forum, the mailing lists and reddit. SirDice has been a valuable asset.

So OP as you can see. There is no nxt interface on FreeBSD.
If you don't believe me check the source at /usr/src/sys/dev. There is no nxt directory.
So maybe share with us what the interface you actually have and then we can help you better.
You probably don't have corrupt files as I get the same response as you.
Code:
rootbeer@E6420:~ # ifconfig nxt0 create
ifconfig: SIOCIFCREATE2: Invalid argument
 
This is a network alias for a jail. My actual physical network device is perfectly functional and I am able to connect to a network and the Internet. I am getting the error when I try to create a new alias for my jail to use.
I think you have made the same mistake I have. The name for the new interface isn't arbitary as I also assumed.

You can only create interfaces that are supported by FreeBSD.

In this case you need to create a epair interface (see the epair man page for more info), but briefly...

ifconfig epair0 create

this will create epair0a locally, you then have epair0b used in the jail. These act like two ends of an ethernet cable.

So in the jail you would do something like:

Code:
ifconfig epair0b 192.168.1.2 netmask 255.255.255.0

then add the epair0a interface to the bridge on the host.

You can use something like this in the host section of jail.conf:

Code:
        vnet;
        vnet.interface="epair0b";
        exec.prestart="ifconfig epair0 create up";
        exec.prestart+="ifconfig bridge0 addm epair0a";
        exec.poststop="ifconfig bridge0 deletem epair0a";
        exec.poststop+="ifconfig epair0a destroy";
 
Back
Top