#575444 net-tools: Typo when setting default gateway with 'route' results in extraneous routes being added

Package:
net-tools
Source:
net-tools
Description:
NET-3 networking toolkit
Submitter:
Eric Urban
Date:
2010-03-25 20:09:04 UTC
Severity:
normal
#575444#5
Date:
2010-03-25 15:10:09 UTC
From:
To:
I was checking my default route in a Debian virtual machine and it was set wrong. I went to change it. Here is my terminal session

ericu@wtorrent-debian:~$sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         192.168.12.71   0.0.0.0         UG    0      0        0 eth1
ericu@wtorrent-debian:~$ sudo route del default
ericu@wtorrent-debian:~$ sudo route add defaul gw 192.168.12.70
ericu@wtorrent-debian:~$ sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
208.68.139.38   192.168.12.70   255.255.255.255 UGH   0      0        0 eth1
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
ericu@wtorrent-debian:~$ route --version
-bash: route: command not found
ericu@wtorrent-debian:~$ /sbin/route --version
net-tools 1.60
route 1.98 (2001-04-15)
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +I18N
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE
HW:  +ETHER +ARC +SLIP +PPP +TUNNEL +TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64
ericu@wtorrent-debian:~$


As you can see the command containing the typo 'route add defaul gw 192.168.12.70' adds an unintended route 208.68.139.38. This is very strange
behavior and I believe it to be unintended. This probably will not result in any major problems for most people, but could cause a severe headache
for a systems administrator who is attempting to track down routing problems and makes one unfortunate typo.

Eric Urban