[clug] Software ergonomics

Scott Ferguson scott.ferguson.clug at gmail.com
Tue Jan 27 18:09:31 MST 2015


On 28/01/15 11:39, Brett Worth wrote:
> On 28/01/15 04:56, Bryan Kilgallin wrote:
>> Thanks for the explanation, Jason:
>>
>>> SIOCADDRT is one of many "socket I/O commands" that you can issue in an ioctl() system
>>> call.  You can see the whole gory list here:
>>>
>>> http://lxr.free-electrons.com/source/include/uapi/linux/sockios.h#L28
>>
>> Horrors! So as a user, I just have to get used to staggering gobbledegook.
> 
> No.  As a user you should use a GUI to set your default route in your network
> configuration or perhaps just let it accept the default route given to you automatically
> by DHCP.
> 
> There's no point wading in out of your depth and then complaining about it.
> 
> Brett
> 
:)
As an *administrator* you *do* need to learn the commands, only when
they fail do you need to understand the error messages.


Additionally, you don't need to understand the error message in the
stated instance



All that error does is tell you that your actions are unnecessary -


>    route add default gw 192.168.3.2 eth0
> 
> But it is giving me out the following error:
> 
>    *SIOCADDRT: File exists*
> 
> How do I fix this problem? 



i.e. you're trying to fix a problem that *doesn't* exist. Route is
telling you that your attempt to add 192.168.3.2 as the default gateway
failed because it's already the default gateway.

As root, just type "route" to see the current gateway.


E.g.
root at vbserver:/home/scott# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
localnet        *               255.255.255.0   U     0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1


root at vbserver:/home/scott# route add default gw 192.168.1.1
SIOCADDRT: File exists


Note also that "man route" will show you the current maintainers for the
program, and that "reportbug" is IMO the best way to report a bug. In
this case you 'might' report the error message as a "wish list" bug -
though "good luck" getting an error message implemented that says "your
attempted action is redundant" for a package that assumes admin-level
skills of the person using it.


Hope that helps


Kind regards


More information about the linux mailing list