# How to configure IP address in jails for a machine without network card.



## ikevin8me (Aug 25, 2017)

Normally, we have to put the network interface (e.g. em0 or igb0) when setting up jails. For example:

jail_jailname_ip="192.168.1.100"
jail_jailname_interface="igb0"

If the network interface (physical card) is being sent as pass-thru via bhyve to a virtualized operating system running within, the FreeBSD host machine would be just like without a network card. In this case, is it possible to create / assign a virtual network card and assign it to jails? How do I do this?

(To put this question in perspective: how do I configure jails assuming my machine DO NOT have any network cards?)

Thanks!


----------



## SirDice (Aug 25, 2017)

ikevin8me said:


> In this case, is it possible to create / assign a virtual network card and assign it to jails? How do I do this?


You can clone the loopback interface and have the jail attach to that. 
rc.conf example:

```
cloned_interfaces="lo1"
ifconfig_lo1="inet 10.0.0.1 netmask 255.255.255.0"
```

It will behave pretty much like a "physical" network card but it's all virtual.


----------



## ikevin8me (Aug 25, 2017)

Sounds very simple. Thanks! Let me try this on my next deployment!


----------

