Find the answer to your Linux question:
Results 1 to 7 of 7
Hello, I am very new to Linux after working with IBM AIX for over 20 years. First time setting up Red Hat Enterprise v6. I used the setup utility to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    6

    Question ifconfig doesn't display ipv4 address


    Hello, I am very new to Linux after working with IBM AIX for over 20 years.

    First time setting up Red Hat Enterprise v6. I used the setup utility to set a static IP address. Now when I run ipconfig it displays the IPv6 address, but not the IPv4 address. The setup utility does show the correct IPv4 address that I entered. I can't ping the IP so I am wondering how I verify that it has the correct IPv4 address. ifconfig does show the interface is up.

    Any help would be appreciated. Thanks

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,356
    Hello and welcome

    which command did you run to configure the ipv4 address?
    It anyway should modify files under /etc/sysconfig/network-scripts/ifcfg-<DEVICENAME>
    You can cat or less these,
    or even modify directly if needed.
    https://access.redhat.com/knowledge/...nterfaces.html

    The ipv6 address is at least the link local, which is always present.

    To look at the actual interfaces, you can use ifconfig, as you know.
    But also
    Code:
    ip addr show
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Nov 2012
    Posts
    6
    Thank you for the response. I used setup to configure the ip. If I go to /etc/sysconfig/sysconfig/network-scripts and vi ifcfg-eth0 it does show the correct IPv4 IP address. When I run ip addr show I get the following:
    eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:a8:66:23 brd ff:ff:ff:ff:ff:ff
    inet6 fe80: :250:56ff:fea8:662f/64 scope link
    valid_lft forever preferred_lft forever

    Everything looks good to me, I just want to verify the IPV4 address, as I can't ping it.

    Thanks

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,356
    There is no ipv4 address.
    I assume you are on a local or out-of-band console.
    Try
    Code:
    ifdown eth0
    ifup eth0
    dmesg
    ip addr show 
    
    or 
    /etc/init.d/network stop
    /etc/init.d/network start
    ip addr show
    You must always face the curtain with a bow.

  5. #5
    Linux Newbie
    Join Date
    Apr 2012
    Posts
    112
    Quote Originally Posted by Irithori View Post
    There is no ipv4 address.
    I assume you are on a local or out-of-band console.
    Try
    Code:
    ifdown eth0
    ifup eth0
    dmesg
    ip addr show 
    
    or 
    /etc/init.d/network stop
    /etc/init.d/network start
    ip addr show
    or

    Code:
    service network restart
    ip addr show

  6. #6
    Just Joined!
    Join Date
    Nov 2012
    Posts
    6
    This worked! I did try using the service command to make sure the network services were up, so ifdown\ifup actually restarts the nw interface? Now ifconfig does show me the IPv4 address and I can ping the server fine.

    Thanks so much for your help. Like I said I am a noob so I know I will be posting more.

  7. #7
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Be aware that just because you configured an ip address you still need to start the interface.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •