I have a Raspi connected through WiFi in which I plug-in a Huawei stick I use for SMS sending. Unfortunately when doing this, it changes the routes to the following:

pi@raspberrypi:/opt/pi/printer $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         hi.link         UG    0      0        0 eth1
default         hi.link         UG    204    0        0 eth1
default         UG    303    0        0 wlan0        *        U     303    0        0 wlan0     *        U     204    0        0 eth1

One would guess that it should be easy to remove the route, but it doesn't work:

pi@raspberrypi:/opt/pi/printer $ ping hi.link
PING hi.link ( 56(84) bytes of data.
64 bytes from hi.link ( icmp_seq=1 ttl=64 time=1.05 ms
pi@raspberrypi:/opt/pi/printer $ route del default via
# does NOT work, displays the usage howto

I can only get this working by adding an additional route:

pi@raspberrypi:/opt/pi/printer $ route add default gw wlan0

Question: how do I either prevent this hi.link route being created when the Huawei stick is plugged in respective how can I delete this route

Many thanks!

  • 1
    Have you tried it as user root?
    – rudimeier
    Oct 13, 2016 at 7:23
  • Oh damn, my fault, sorry for that! route add default gw wlan0 worked now nicely, but I am still not able to delete the default via and have it in there...
    – George M.
    Oct 13, 2016 at 8:41

1 Answer 1


Either using the route command:

route del default gw dev eth1

or better ip command if available:

ip route del default via dev eth1

The ip command is easier to use because add and del usually accept the same syntax as printed by show.

  • I deleted as you said and it worked fine. However, from time to time, the route appears again and I keep having the same problem (I have to redo that). Any idea what could cause this?
    – silgon
    Oct 31, 2017 at 20:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .