# 2 VLan +2 Jail  - how can I set the default route ?



## ricardopl (Jun 13, 2009)

Please Helpme :e
this is my configuration:
rc.conf

```
cloned_interfaces="vlan1 vlan2"
ifconfig_vlan1="inet 200.42.0.162 netmask 255.255.255.192 vlan 12 vlandev bce1"
ifconfig_vlan2="inet 200.42.0.82 netmask 255.255.255.192 vlan 11 vlandev bce1"
ifconfig_vlan2_alias0="inet 200.42.0.81 netmask 255.255.255.192"
```
I use ezjail -

```
export jail_qmci01hr_prima_com_ar_hostname="qmci01hr.prima.com.ar"
export jail_qmci01hr_prima_com_ar_ip="200.42.0.82"
export jail_qmci01hr_prima_com_ar_rootdir="/usr/jails/qmci01hr.prima.com.ar"
export jail_qmci01hr_prima_com_ar_exec="/bin/sh /etc/rc"
export jail_qmci01hr_prima_com_ar_mount_enable="YES"
export jail_qmci01hr_prima_com_ar_devfs_enable="YES"
export jail_qmci01hr_prima_com_ar_devfs_ruleset="devfsrules_jail"
export jail_qmci01hr_prima_com_ar_procfs_enable="YES"
export jail_qmci01hr_prima_com_ar_fdescfs_enable="YES"
export jail_qmci01hr_prima_com_ar_image=""
export jail_qmci01hr_prima_com_ar_imagetype=""
export jail_qmci01hr_prima_com_ar_attachparams=""
export jail_qmci01hr_prima_com_ar_attachblocking=""
export jail_qmci01hr_prima_com_ar_forceblocking=""
```
how can I set the default route to 2 jails ??
Please helpme and sorry for my bad English


----------



## anomie (Jun 13, 2009)

ricardopl said:
			
		

> ```
> cloned_interfaces="vlan1 vlan2"
> ifconfig_vlan1="inet 200.42.0.162 netmask 255.255.255.192 vlan 12 vlandev bce1"
> ifconfig_vlan2="inet 200.42.0.82 netmask 255.255.255.192 vlan 11 vlandev bce1"
> ...



First of all, 200.42.0.82 and 200.42.0.81 are on the same network, so you want: 

```
ifconfig_vlan2_alias0="inet 200.42.0.81 netmask 255.255.255.255"
```

(See the ifconfig(8) manpages - alias section - for details on that.) 

-------



			
				ricardopl said:
			
		

> I use ezjail -
> ...
> how can I set the default route to 2 jails ??



I don't use ezjail (so I'm not familiar with it). But I would think this could be solved by adding static route(s). See the rc.conf(5) manpages - static_routes section.


----------

