[Bug 1005478] Yast : network settings : route not set via static IP and default IPV4 gateway
http://bugzilla.suse.com/show_bug.cgi?id=1005478
http://bugzilla.suse.com/show_bug.cgi?id=1005478#c18
Marius Tomaschewski
(In reply to Knut Alejandro Anderssen González from comment #9)
Paul, you are using /32 as the netmask, was it intentional?
Now that was a good hint :-) If I use /24 as 'Subnet Mask' in Yast 'Statically Assigned IP Address' then 'route' command now gives the expected paths
linux-64l2:/etc/sysconfig/network # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.131.100 0.0.0.0 UG 0 0 0 eth0 192.168.131.0 * 255.255.255.0 U 0 0 0 eth0
I think Yast should complain about /32 as Subnet Mask instead of creating a system without gateway (and leaving the user clueless) ?
Yes. I do not see a feature here, but a bug -> incomplete IP configuration.
Each route with gateway requires a route without gateway, that is matching
the gateway. Special case: fe80:: link-local addresses in IPv6 -> they're set
automatically by the kernel (derived from the HW/MAC address or e.g. tunnel
endpoints). [IPv6 is not using the MAC address directly / layer 2 protocol like
IPv4 did (arp, IP <-> MAC resolving), but instead L3 multicast fe80 -> ffXX]
That is, to apply the route (default via 192.168.131.100), you need a direct
route without gateway first matching the gateway, e.g.:
# destination [gateway] (netmask) device [optional other options]
192.168.131.100/32 - - eth0
default 192.168.131.100 - eth0
or also using a network (declare the complete network to be directly
connected):
192.168.131.0/24 - - eth0
default 192.168.131.100 - eth0
(default == as 0.0.0.0/0). Netmask field is kind of deprecated (IPv6 is not
using a mask, but always IP/PREFIXLEN cidr notation), better/more consistent
is to use /XX in destination.
An IPADDR=... variable is incomplete without: a) /PREFIXLEN inside IPADDR,
b) PREFIXLEN=... variable or for IPv4 only c) NETMASK=...
Without a prefix len (/24 in this case), that is without a) or b) or c),
it defaults to /32 (/128 in IPv6 case).
Setting an IP address to an interface requires at least two things: the
local address _and_ the network or the address and the peer/remote address,
that is:
IPADDR=192.168.131.103/24
or
IPADDR=192.168.131.103
PREFIXLEN=24
or
IPADDR=192.168.131.103
NETMASK=255.255.255.0
or in point-to-point case, e.g.:
IPADDR=192.168.131.103
REMOTE_IPADDR=192.168.131.105
Using /24 here causes automatic creation of the
192.168.131.0/24 - - eth0
route.
# ip link add dummy1 type dummy
# ip link set up dev dummy1
# ip addr add 192.168.131.103/24 dev dummy1
# ip addr show dev dummy1
6: dummy1:
participants (1)
-
bugzilla_noreply@novell.com