H‌‌i,

I need help with multiple routing tables, because the tutorials on the
Internet is pretty much scarce. The router is Ubiquiti EdgeRouter Lite
running OpenBSD 5.9.


I've got two public IP's attached by DHCP - since I don't want to use
multiple physical NIC's, I use two vether interfaces (with different
MAC's) in bridge with a physical NIC (cnmac0).

Behind the router, I've got a home server with FreeBSD running multiple
jails. The server itself and all jails but one are to use the vether0
NIC on the router with its IP. One jail (running Tor exit node) is to
use the vether1 NIC with its IP.


That's why two routing tables are necessary.

The whole server is in 192.168.11.0/24 class with Tor jail using
192.168.11.13 (other services use other IP's).
All outgoing and incoming traffic from 192.168.11.13 is to use vether1
NIC. Other IP's are to use vether0 for all the traffic.

vether1 is in rdomain 2:
vether1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST>
rdomain 2 mtu 1500

Rdomain 2 currently contains:
# route -T 2 -n show
Routing tables

Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio
Iface
default            gatewayIP_(the same as in rdomain0)      UGS       
1   224536     -     8 vether1
ISP_network   my_2nd_IP      UCP        1    55185     -     4 vether1
gatewayIP_(the same as in rdomain0)      ISP_MAC  UHLc       1   
28142     -     4 vether1
my_2nd_IP      my_MAC  UHLl       0        6     -     1 vether1
brodcast      my_2nd_IP      UHb        0        0     -     1 vether1

When I want to add 192.168.11/24 class to rdomain2, I get:
# route -T 2 add 192.168.11/24 192.168.11.1
route: writing to routing socket: Network is unreachable
add net 192.168.11/24: gateway 192.168.11.1: Network is unreachable


What can I do to make it work? I'm now out of ideas.

Reply via email to