# Network unreachable in jail, dns resolution works fine



## Ralf Rottmann (Oct 5, 2017)

Hi everyone,

I'm not a FreeBSD / Linux pro but hope, you guys can help me resolve an issue I'm having with jails being unable to connect to the Internet.

I've been running my FreeNAS system for a while, having upgraded from FreeBSD 9.x via 10.x to 11.x. I've got a couple of jails (all from the FreeBSD 9 times) which work fine. Today, I created a new jail, based off the official 11.0 standard template here.

When I try to ping a host on the Internet, I do get a network unreachable error.

Here is some more information:


```
root@experimental:/ # host google.com
google.com has address 172.217.22.110
google.com has IPv6 address 2a00:1450:4001:81d::200e
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
```


```
root@experimental:/ # ping google.com
PING google.com (172.217.22.110): 56 data bytes
ping: sendto: Network is unreachable
```


```
root@experimental:/ # traceroute google.com
traceroute: findsaddr: failed to connect to peer for src addr selection.
```


```
root@experimental:/ # netstat -rn
Routing tables
(0) (0) U
(0) (0) UG
(0) (0) UH  13473
(0) (0) U
(0) (0) UHS  13473
(0) (0) U  13473
(0) (0) UHS  13473
(0) (0) U
(0) (0) UHS  13473
```


```
root@experimental:/ # ifconfig
lo0: flags=8048<LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair2b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 4e:61:35:52:5b:18
    inet 192.168.1.118 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
```


----------



## Ralf Rottmann (Oct 5, 2017)

I noticed, that in the older jails, ifconfig reported "status: active" for the epair$b interface, while in the newly created one, there is no "status: active". Does that maybe point to the problem?


----------



## SirDice (Oct 6, 2017)

Is this FreeNAS or FreeBSD? Because epair(4) is not common on FreeBSD but it is standard on FreeNAS.

PC-BSD, FreeNAS, NAS4Free, and all other FreeBSD Derivatives


----------



## Ralf Rottmann (Oct 6, 2017)

SirDice said:


> Is this FreeNAS or FreeBSD? Because epair(4) is not common on FreeBSD but it is standard on FreeNAS.
> 
> PC-BSD, FreeNAS, NAS4Free, and all other FreeBSD Derivatives



It’s FreeNAS, didn’t know that it’s special to FreeNAS. I hope somebody here can help anyway.


----------



## SirDice (Oct 6, 2017)

The 'problem' is that FreeNAS is a highly customized FreeBSD derivative. Solutions that work for FreeBSD may not work or be correct for FreeNAS.


----------

