How to configure LAN IP in the case of unplugged network cable

This document (000019764) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12 
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Server for SAP Applications 12

Situation

A TCP/IP address needs to be configured on a Network card that is not connected to the network.
 

Resolution

Please follow the steps below to make this work.

Verify Link detection
# /usr/sbin/ethtool eth0

...

Link detected: no

If there is a need to configure a TCP/IP address without connecting to the network, please add the following settings to each individual network card configuration file :
/etc/sysconfig/network/ifcfg-eth*

LINK_REQUIRED='no'

A static IP address can than be added in the network card configuration file 
# cat /etc/sysconfig/network/ifcfg-eth0
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.28.50/24'
MTU=''
NAME='82545EM Gigabit Ethernet Controller (Copper)'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'

After restarting the network service, "ifconfig" and "ip" commands cannot see the network card TCP/IP address 
# rcnetwork restart

# ip a
 eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:0c:29:fc:16:bb brd ff:ff:ff:ff:ff:ff

# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00# rcnetwork restart

# ip a
 eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:0c:29:fc:16:bb brd ff:ff:ff:ff:ff:ff

# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:0C:29:FC:16:BB  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:20952 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69999 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2211956 (2.1 Mb)  TX bytes:5297841 (5.0 Mb):0C:29:FC:16:BB  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:20952 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69999 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2211956 (2.1 Mb)  TX bytes:5297841 (5.0 Mb)

Cause

The network cable is disconnected, or the network cable is unplugged.

Starting with SUSE Linux Enterprise Server 12, network services are controlled by the wicked daemon, and the network interface will activate it's configured TCP/IP address only when a link is detected.  

This is different from the same behavior on SUSE Linux Enterprise Server 11.

Additional Information

From the man page :
 

# man 5 ifcfg

       LINK_REQUIRED { auto | yes | no }

              While a working and connected link is required for further setup steps, such as bridge STP, link authentication, auto configuration of the IP address (dhcp,  ...)  and  duplicate  IP  address

              detection  (enabled  by default), it is required in some cases to continue the setup without to consider the link detection (carrier), e.g.  in well-known static "router like" setups. You may

              want to disable also the duplicate IP detection (see CHECK_DUPLICATE_IP and the ifsysctl(5) manual page).



              This variable permits to configure the waiting for link-detection.  When set to yes, wicked waits until link has been detected before it continues with further steps.  When set to no,  wicked

              is  permitted  to  continue  earlier,  without to wait for a link in a usable state.  When set to auto (default), an internal logic is applied causing to use a "no" for tun/tap devices (which

              require a driver daemon) and for bridges with enabled STP and without any ports.  In other cases, it behaves as "yes".

 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019764
  • Creation Date: 28-Oct-2020
  • Modified Date:28-Oct-2020
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center