Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I recently installed Red Hat 6.2 in a machine. I did not configure the network during the installation process. Therefore, when the installation was complete, I attempted to edit ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    106

    Network configuration


    Hi,

    I recently installed Red Hat 6.2 in a machine.
    I did not configure the network during the installation process.

    Therefore, when the installation was complete, I attempted to edit the /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/resolv.conf files.

    Into the first, I added these lines :

    HTML Code:
    BROADCAST = X.X.X.X
    IPADDR = X.X.X.X
    NETWORK = X.X.X.X
    NETMASK = X.X.X.X
    GATEWAY = X.X.X.X
    The X.X.X.X actually have their separate values for each line. However, I do not remember them now.

    And for the latter, I added these :

    HTML Code:
    domain persistent.co.in
    nameserver X.X.X.X
    nameserver X.X.X.X
    search persistent.co.in
    After editing these files, I restarted the network service :

    Code:
    #service network restart
    However, when I tried to ping this machine's ip address, it does not ping, and I even couldn't access the machine via putty.

    On the other hand, when I use the command

    Code:
    #setup
    from the terminal, a GUI appears that have these options :

    HTML Code:
    Network configuration
    Under Network Configuration, there are these sub-options :

    HTML Code:
    Device Configuration
    DNS Configuration
    And I added the lines above into these configuration options instead.

    It worked!! Now I can ping!!

    My questions are :

    a) In the option for Device Configuration, there are lines that allow us to add the STATIC IP, NETMASK, DEFAULT GATEWAY IP and even DNS. And even for the DNS configuration option, we can add the DNS addresses. So is it right to add the DNS addresses in both the Device configuration boxes and DNS Configuration options or does it not make a difference?

    b) Is it right to put the GATEWAY value for the DEFAULT GATEWAY IP option for the Network Configuration? Is there any difference between GATEWAY & DEFAULT GATEWAY IP?

    b) Why did it not work the first time when I added those lines in the files?? Why did it work only when I added the lines into the GUI interface for Device and DNS configuration??

    Thanks,
    ana

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,752
    Google: rhel6 network configuration

    Top Link

    At the bottom of the page:

    The /etc/sysconfig/networking/ directory is used by the now deprecated Network Administration Tool (system-config-network). Its contents should not be edited manually. Using only one method for network configuration is strongly encouraged, due to the risk of configuration deletion. For more information about configuring network interfaces using graphical configuration tools, refer to Chapter 8, NetworkManager.

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Would have helped a lot if you had posted the original files before you used the script to set them up.
    I was just wondering if you had the 'ONBOOT=' set to ON? That might have explained why you could not ping.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. #4
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    106
    Yes, I had ONBOOT = ON.

    What are the original files ??

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Quote Originally Posted by anaigini45 View Post
    What are the original files ??
    That would be the files before they were altered in /etc/sysconfig/network-scripts.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    106
    So it would ping if ONBOOT = No??


  7. #7
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    ONBOOT statement tells the system if the interface should be started at boot time. If NO is there then the interface does not get started and no traffic will pass through that 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
  •