This is very much a learning question if someone would be happy to explain a couple of concepts.
I'm using iproute2 to set up policy routing as follows:
echo 200 $table >> /etc/iproute2/rt_tables
ip rule add from $my_ip table $table
ip route add default via $gw_ip dev $dev table $table
ip route flush cache
Where $dev is a device set-up by OpenVPN. This way everything bound to $my_ip, would go through $gw_ip.
I need to know how we can find the size of the kernel routing table.
I have knowledge that the routing table is stored in /proc/net/route
I am presently using wc to count the number of characters in this routing file.
Ranmaru wrote:I think the problem is that NetworkManager generally prefers ethernet over WiFi and thus tries to route all traffic through eth0 as soon as you connect the cable.I guess you could fix it by using your routing table to prefer the wireless connection over ethernet, but then you would have the problem the other way around.
Is it possible to add in the routing table a description for a route?
Something like:
ip route add 192.168.10.1/24 via 192.168.1.1 description "route to the example network"
I would like when I am running ip route show to see these descriptions to be able to manage easier the routing table.
My mac routing table usually is very simple.
I know it's based on bsd , but what's it doing or trying to do.
My routing table is usually very simple
however, the second one, default was point to link5 ?
Is this normal, or is this IPV6 craziness at work?
Can somehelp me understand what OSX/BSD is doing?
nternet:
Destination Gateway Flags Refs Use Netif Expi
Hi,
I've created a script in /etc/network/if-up.d/my_script so that when an interface gets up, it creates a new routing table (and deletes it when the interface goes down):
Here is the script:
Code:
echo "Setup routing table \"$IFACE\" for address \"$IF_ADDRESS\", gateway \"$IF_GATEWAY\""
ip rule add from $IF_ADDRESS table $IFACE
# cree la
i am trying to set up policy routing on my home server. My network looks like this:
Host routed VPN gateway Internet link
through VPN
192.168.0.35/24 ---> 192.168.0.5/24 ---> 192.168.0.1 DSL router
10.200.2.235/22 .... .... 10.200.0.1 VPN server
The traffic from 192.168.0.32/27 should be and is routed through VPN.
My windows laptop is directly connected to 192.168.1.0/24 (wireless lan). I access 10.21.0.0/16 though a router that is connected to both networks. The routing works fine with this configuration.
I have a VPN, that connects to 10.0.0.0/8. The VPN network doesn't actually use any IPs in the 10.21.0.0/16 range.