I've got some systems that are provisioning SLES12sp1 statelessly - the systems come up with their provisioning interface configured, but no default route.

On RedHat I'd set the GATEWAYDEV in /etc/sysconfig/network -- but I can't find an equivalent for openSUSE/SLES.

There is no NetworkManager or ifcfg files:

# ls /etc/sysconfig/network/
config  dhcp  if-down.d  if-up.d  ifcfg-lo  ifcfg.template  network  providers  scripts

Some additional context:

# ifconfig eth2
eth2      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::21e:67ff:fecb:f26f/64 Scope:Link
          RX packets:213248 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35744 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:295970393 (282.2 Mb)  TX bytes:4018621 (3.8 Mb)

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     U     0      0        0 eth2

Create or edit /etc/sysconfig/network/routes and add a line like :

default - -

(where, in case it would not be obvious, is your gateway)

[src: courseware for Suse course 3124 "SUSE Linux Server 12 Administration"]

  • @heritu -- no luck. Tried default <ip> - -, default <ip> - eth2, default - - eth2. Maybe because PXE is bringing up the interface? – John Westlund Aug 19 '16 at 4:04
  • I think your answer is correct -- but won't work in my case because of how the provisioning is happening. – John Westlund Aug 26 '16 at 1:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.