Skip to content

Consult about route contentionΒ #456

@gaoxingwang

Description

@gaoxingwang

When I use the following configuration, restart the network service.

Configuration content:
/etc/sysconfig/network-scripts/ifcfg-eth2

STARTMODE='onboot'
BOOTPROTO='static'
IPADDR='192.9.201.21'
NETMASK='255.255.0.0'
MTU='1450'
DEVICE="eth2"

/etc/sysconfig/network-scripts/route-eth2

ADDRESS0=192.9.0.0
NETMASK0=255.255.0.0
GATEWAY0=192.9.201.200

ADDRESS1=10.10.1.0
NETMASK1=255.255.255.0
GATEWAY1=192.9.201.200

ADDRESS2=12.10.110.0
NETMASK2=255.255.255.0
GATEWAY2=192.9.201.200

Before the commit a71dcfd , routes corresponding to gateway 1 and gateway 2 can be added, but the route corresponding to gateway 0 fails to be added, and error message like :"RTNETLINK answers: File exists".

After the patch is merged, the route corresponding to gateway0 can replace the default route added by the kernel. As a result, the other two routes cannot be added, and the error message is displayed: Error: Nexthop has invalid gateway.

The patch aims to solve the race problem between routes and works successfully.But the failure to add gateway1 and gateway2 directly affects my network. In this case, users should not use the configuration like this? Or do we have a better solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions