Re: [CentOS] Persisting Routes In A Routing Table Other Than The Default

2018-05-16 Thread Chris Adams
Once upon a time, Adam Tauno Williams  said:
> On Tue, 2018-05-15 at 13:04 -0500, Chris Adams wrote:
> > Once upon a time, Adam Tauno Williams  said:
> > > Rules load automatically via the /etc/sysconfig/network-
> > > scripts/rules-
> > > {interface} files.  Routes added to /etc/sysconfig/network-
> > > scripts/routes-{interface} are always added to the default policy.
> > What are you putting in the routes- file?  I just put something
> > like:
> > table 200 default via 192.168.41.1 dev eth1
> 
> My route-ens192 file looks like -
> 
> ...
> ADDRESS20=192.168.10.0
> NETMASK20=255.255.255.0
> GATEWAY20=192.168.1.6
> METRIC20=0
> ADDRESS21=192.168.40.0
> NETMASK21=255.255.255.0
> GATEWAY21=192.168.1.6
> METRIC21=0
> ...
> 
> Adding a ^table line doesn't do anything.

You can't mix and match the two styles of route file entries, and IIRC
the only way to set a "table" is with the type I posted.  So, you'd have
to replace the contents of the file like:

table 123 192.168.10.0/24 via 192.168.1.6 dev eth1
table 123 192.168.40.0/24 via 192.168.1.6 dev eth1

and so on.  Each line in the file is all the arguments to "ip route add"
for a single entry.
-- 
Chris Adams 
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Persisting Routes In A Routing Table Other Than The Default

2018-05-16 Thread Adam Tauno Williams
On Tue, 2018-05-15 at 13:04 -0500, Chris Adams wrote:
> Once upon a time, Adam Tauno Williams  said:
> > Rules load automatically via the /etc/sysconfig/network-
> > scripts/rules-
> > {interface} files.  Routes added to /etc/sysconfig/network-
> > scripts/routes-{interface} are always added to the default policy.
> What are you putting in the routes- file?  I just put something
> like:
> table 200 default via 192.168.41.1 dev eth1

My route-ens192 file looks like -

...
ADDRESS20=192.168.10.0
NETMASK20=255.255.255.0
GATEWAY20=192.168.1.6
METRIC20=0
ADDRESS21=192.168.40.0
NETMASK21=255.255.255.0
GATEWAY21=192.168.1.6
METRIC21=0
...

Adding a ^table line doesn't do anything.

-- 
Adam Tauno Williams  GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Persisting Routes In A Routing Table Other Than The Default

2018-05-15 Thread Chris Adams
Once upon a time, Adam Tauno Williams  said:
> Rules load automatically via the /etc/sysconfig/network-scripts/rules-
> {interface} files.  Routes added to /etc/sysconfig/network-
> scripts/routes-{interface} are always added to the default policy.

What are you putting in the routes- file?  I just put something
like:

table 200 default via 192.168.41.1 dev eth1

-- 
Chris Adams 
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Persisting Routes In A Routing Table Other Than The Default

2018-05-15 Thread Adam Tauno Williams
I need to add persistent routes to a policy routing table.  I can add
rules to an IP policy table after installing  NetworkManager-config-
routing-rules;  but I have not found how to add routes to a table other
than the specific table.

Manually I do a: 
  ip route add default via 192.168.1.6 dev ens192 table pods

Rules load automatically via the /etc/sysconfig/network-scripts/rules-
{interface} files.  Routes added to /etc/sysconfig/network-
scripts/routes-{interface} are always added to the default policy.

[root@aqueduct rc.d]# ip rule
0:  from all lookup local 
32763:  from 192.168.65.0/24 lookup pods 
32764:  from 192.168.41.0/24 lookup pods 
32765:  from 192.168.43.0/24 lookup pods 
32766:  from all lookup main 
32767:  from all lookup default 

-- 
Adam Tauno Williams  GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos