Bug 6548

Summary: "route del" can't delete default routes
Product: Busybox Reporter: uros7272
Component: NetworkingAssignee: unassigned
Status: RESOLVED INVALID    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.19.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:

Description uros7272 2013-10-14 14:55:53 UTC
At the boot, dhcp client sets following routing table:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.2.6.1        0.0.0.0         UG    0      0        0 eth0
10.1.1.111      10.2.6.1        255.255.255.255 UGH   0      0        0 eth0
10.1.1.112      10.2.6.1        255.255.255.255 UGH   0      0        0 eth0
10.2.6.0        0.0.0.0         255.255.254.0   U     0      0        0 eth0
10.2.6.1        0.0.0.0         255.255.255.255 UH    0      0        0 eth0

Trying to delete default route with:

$ route del default gw 10.2.6.1 eth0

didn't succeed, the table still reads:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.2.6.1        0.0.0.0         UG    0      0        0 eth0
10.1.1.111      10.2.6.1        255.255.255.255 UGH   0      0        0 eth0
10.1.1.112      10.2.6.1        255.255.255.255 UGH   0      0        0 eth0
10.2.6.0        0.0.0.0         255.255.254.0   U     0      0        0 eth0
10.2.6.1        0.0.0.0         255.255.255.255 UH    0      0        0 eth0

On a related note, similar route also can't be removed

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 eth1
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1

$ route del default eth1

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 eth1
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1

(I have checked on Fedora 19 that its default routes can be removed without problems using above commands.)
Comment 1 uros7272 2013-10-23 06:29:38 UTC
This turned out to be ConnectionManager "feature" to automatically add back default gateway, even when user wants to remove it.