removing static routes

removing static routes

Postby jiml8 » Dec 16th, '19, 00:23

Having upgraded to Mageia 7, my system now wishes to set a static route on me.

Here is the default routing table it gives me:
Code: Select all
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    10     0        0 eth0
72.183.45.0     0.0.0.0         255.255.255.0   U     0      0        0 vmnet5
link-local      0.0.0.0         255.255.0.0     U     1002   0        0 eth0
link-local      0.0.0.0         255.255.0.0     U     1003   0        0 eth1
link-local      0.0.0.0         255.255.0.0     U     1004   0        0 eth2
link-local      0.0.0.0         255.255.0.0     U     1008   0        0 vlan0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 vlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 vmnet6
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.11.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 eth2
192.168.218.0   0.0.0.0         255.255.255.0   U     0      0        0 vmnet8


Note the route on 192.168.0.0 specifying eth0 as the destination that is right ahead of the route specifying vlan0 as the destination, and note that the route to eth0 will prevent the proper route (to vlan0) from working.

After booting the system, if I want things to work right, I have to delete that route. This is something I should not have to do.

I've looked in /etc/sysconfig/network-scripts, where this sort of thing is supposed to be set up, and I have also rooted around in /etc and in /lib/systemd and its various subdirectories, and I have not found where this rule is being set.

So. Can anyone tell me where this rule is being set? So that I can stomp all over it, and drag its bleeding bits into the bit bucket, and flush it into oblivion?
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: removing static routes

Postby jiml8 » Dec 17th, '19, 01:23

I don't have this completely sorted out yet, but it looks to me like it could be a bug in Mageia 7.

There are some fairly substantial changes in network-scripts between Mageia 6 and Mageia 7, and it just could be that the scripting change is the origin of the problem.

Among other things, the scripts seem to go through the various ifcfg files to pick up information that is used to create the basic static routing that enables the networking to work initially.

Now, my system has an ifcfg-eth0, an ifcfg-eth0.6, and an ifcfg-vlan0. The ifcfg-vlan0 sets up a logical interface to the physical interface, which is vlan tag 6 on interface eth0 (eth0.6). I have not yet gone through the scripting, but looking at this my routing table looks very much like the script is checking ifcfg-eth0 and writing a route, then checking ifcfg-eth0.6 and writing a route to eth0, then checkingifcfg-vlan0 and writing a route to vlan0.

This would be wrong. No route should be written for eth0.6. ifcfg-eth0.6 has to be there to set up the vlan because the tag must be identified, but all references to the vlan need to go through the vlan0 interface; there should be no routes written against eth0.6 (which would actually be written to eth0).
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: removing static routes

Postby wintpe » Jan 10th, '20, 09:28

hi jim
i believe if its same as most redhat configs you can add

DEFROUTE=no

to each of the ifcfg files you want ignored for routing

also nopeerdns if you want a static resolv.conf .

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: removing static routes

Postby jiml8 » Jan 23rd, '20, 22:24

OK, I tried that. Next time I reboot, I'll see if it works.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron