[PLUG] Set up default gateway in kernel routing table

Louis Kowolowski louisk at cryptomonkeys.org
Thu Sep 27 16:52:13 UTC 2018


The gateway has to relate to an subnet that is configured on an interface.
If you want to make the default route 192.168.55.4, one interface (physical, or logical) must be on the 192.168.xxx.xxx subnet, where 192.168.55.4 is included.
For example, if the subnet is 192.168.55.0/24, then your interface would need also be in the 192.168.55.0/24 block. If the gateway is .4, and there are no other hosts/devices, your computer's interface could be configured with any IP between 192.168.55.1-3, 192.168.55.5-254.


> On Sep 27, 2018, at 11:44 AM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> 
>  Having been a while since I last set routes I've lost a step when setting
> the default gateway.
> 
>  The routing table has both loopback and LAN routes. Now I need to set the
> default gateway and the kernel tells me there's a SIOCADDRT (address) error.
> 
>  In slackware's rc.inet1.conf interface configuration file the default
> gateway is set on 192.168.55.4. Using this command:
> 
> route add default gw 192.168.55.4
> 
> returns the above error that the network is unreachable.
> 
>  The route man page example has a host name for the gateway and I've tried
> that, too, with the same result.
> 
>  What have I missed here?
> 
>  On a curious, somewhat related issue, while there's only one Ethernet port
> on the motherboard ifconfig sees it as eth1 rather than eth0.
> 
> Rich
> _______________________________________________
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug

--
Louis Kowolowski                                louisk at cryptomonkeys.org
Cryptomonkeys:                                   http://www.cryptomonkeys.com/

Making life more interesting for people since 1977




More information about the PLUG mailing list