I am running Fedora 22, (Kernel 4.0.4), and trying to add a default route for a custom routing table, SERVINT used by vlan30 on the Ethernet interface, enp3s0.
The VLAN has two IP addresses associated with it, being:
192.168.129.66 & 192.168.129.67, /29 subnet.
The vlan interface in the routing intelligence (ZyXel 110 firewall) is:
192.168.129.65 (on the same subnet as the NIC addresses)
After re-booting the server, I clear all the routes and rules using:
ip route flush cache
ip route flush all
ip rule flush
All the rules and routes are removed.
I then add a route:
ip route add 192.168.129.64/29 dev vlan30 proto static scope global src 192.168.129.67 table SERVINT
So far, all is good. When I go to add the default route to 192.168.129.65, I get "RTNETLINK answers: Network is unreachable", yet the default route is within the sub-net of the route defined previously.
The only way I can get the default route to be accepted is having it defined as an IP address on the NIC, then of course it will not talk to the routing intelligence, for further routing.... so that is a fail as well.
Does anyone have an idea as to what might be wrong?
TEST UPDATE_25062015
If I do the above with the VLAN routed in the "main" table (table Nº 254), everything works correctly, but when it is done on the custom table (table Nº 200), the fault is consistent, as described above.
The KERNEL config has CONFIG_IP_MULTIPLE_TABLES=y, so the multiple tables and Policy Routing functions should be enabled. The custom table is defined in /etc/iproute2/rt_tables file.
Is there anything else that will stop the use of custom routing tables?
Cheers, GM
ip a
show? /29 or /32 on your IP address? If /29, then you shouldn't need to add a route for /29 anyway, that should happen automatically.