Was this page helpful?

Assign Static IP to SUSE Installation

    Table of contents
    1. 1. Overview
    2. 2. Goal
      1. 2.1. Assigning a Static IP
    3. 3. What's Next
    4. 4. Related

    Overview

    Assign a static IP to your SUSE server

    Goal

    After completing this tutorial you will have a static IP assigned to your SUSE installation

    Assigning a Static IP

    Login to your SUSE server via SSH and run the following command:

    nano /etc/sysconfig/network/ifcfg-eth0

    This will load the file that contains the configuration options for eth0. You will see something similar to this:

    BOOTPROTO='dhcp'
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    IPADDR=''
    MTU=''
    NAME='AMD PCnet - Fast 79C971'
    NETMASK='255.255.255.0'
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='auto'
    UNIQUE='rBUF.weGuQ9ywYPF'
    USERCONTROL='no'
    _nm_name='bus-pci-0000:02:00.0'

    In order to switch from DHCP to a static IP address, we need to change a few of these values. In the following example, you will need to change the values so they match your network:

    BOOTPROTO='static'
    BROADCAST='192.168.168.255'
    ETHTOOL_OPTIONS=''
    IPADDR='192.168.168.221'
    MTU=''
    NAME='AMD PCnet - Fast 79C971'
    NETMASK='255.255.255.0'
    NETWORK='192.168.168.0'
    REMOTE_IPADDR=''
    STARTMODE='auto'
    UNIQUE='rBUF.weGuQ9ywYPF'
    USERCONTROL='no'
    _nm_name='bus-pci-0000:02:00.0'

    In this file, we changed the following configuration options: BOOTPROTO, BROADCAST, IPADDR, NETMASK (if applicable), NETWORK (if applicable). Leave everything else as is. Once you have updated this file to reflect your network settings, save the file by hitting Ctrl-O and then exit nano by hitting Ctrl-X. Now we need to restart the network service by running the following command:

    service network restart

    Once the service has been restarted run ifconfig and make sure the IP address has been assigned to the adapter.

    What's Next

    This is what was achieved and what was omitted in this tutorial.

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by