# Setting the tunnelfib of a tun interface



## scotia (Mar 26, 2020)

Hi,

does anyone know of a way to set the fib of the encapsulated packets of a tun interface?


```
# ifconfig tun2 create
# ifconfig tun2 tunnelfib 1
ifconfig: ioctl (SIOCSTUNFIB): Invalid argument
```

gif and gre take the parameter just fine:


```
# ifconfig gif2 create
# ifconfig gif2 tunnelfib 1
# ifconfig gre2 create
# ifconfig gre2 tunnelfib 1
```

I want clients connected via net/ocserv to drop into a different fib from fib0, and I'm fairly sure ocserv can only use tun interfaces for layer 3.

Scott


----------



## scotia (Mar 26, 2020)

Actually I think the premise of my question may be flawed.

tun interfaces do not appear to appear to expose their outer (encapsulating) IPs to the route table.

so the simple 'fib' parameter should do what I want.


----------

