LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2015, 02:14 AM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
network configuration for Redhat 7


I just installed Redhat 7 and try to config the network , add the IP address to network card , but I got the problem.

I modify the file /etc/sysconfig/network-scripts/ifcfg-enp0s3 , the configuration is as below , and then reboot .

DEVICE="enp0s3"
NETBOOT="yes"
HWADDR="08:00:27:15:38:B7"
TYPE="Ethernet"
BOOTPROTO="none"
NAME="enp0s3"
UUID="462f4834-4fe7-43a7-84e7-83b2722e94c1"
ONBOOT="yes"
IPADDR="192.168.1.1"
NETMASK="255.255.255.0"

After reboot , I use "ip addr show" still not shown the ip address , the ip address is still blank , would advise what is wrong ? thanks
 
Old 01-08-2015, 03:52 AM   #2
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by byran cheung View Post
I just installed Redhat 7 and try to config the network , add the IP address to network card , but I got the problem.

After reboot , I use "ip addr show" still not shown the ip address , the ip address is still blank , would advise what is wrong ? thanks
If you search in a default Centos 7 installation, you'll see that the actual path to the file is /etc/sysconfig/network-scripts/enp0s3 without the ifcfg preceeding it.

So I'd suggest:
Code:
cd /etc/sysconfig/network-scripts
mv ifcfg-enp0s3 enp0s3
Reboot and see if it works.
 
Old 01-08-2015, 04:04 AM   #3
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
I've tried to move ifcfg-enp0s3 to enp0s3 and the other way around, but in my case it works fine either way.

Try to see if it's only a problem with getting your network card up:

Code:
# ifconfig enp0s3 up
Then check if the configuration from /etc/sysconfig/network-scripts/ifcfg-enp0s3 (or enp0s3) has been applied:

Code:
# ifconfig enp0s3
or
Code:
# ip addr show dev enp0s3
 
Old 01-08-2015, 04:08 AM   #4
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by vincix View Post
If you search in a default Centos 7 installation, you'll see that the actual path to the file is /etc/sysconfig/network-scripts/enp0s3 without the ifcfg preceeding it.

So I'd suggest:
Code:
cd /etc/sysconfig/network-scripts
mv ifcfg-enp0s3 enp0s3
Reboot and see if it works.
thanks reply , but I tried it , not work.
 
Old 01-09-2015, 12:31 AM   #5
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by vincix View Post
I've tried to move ifcfg-enp0s3 to enp0s3 and the other way around, but in my case it works fine either way.

Try to see if it's only a problem with getting your network card up:

Code:
# ifconfig enp0s3 up
Then check if the configuration from /etc/sysconfig/network-scripts/ifcfg-enp0s3 (or enp0s3) has been applied:

Code:
# ifconfig enp0s3
or
Code:
# ip addr show dev enp0s3
thanks reply , but not work ..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
network configuration problems on Redhat 5 sahidul Red Hat 10 02-05-2009 11:05 AM
Where is Redhat's network configuration files? fossilet Linux - Networking 1 07-15-2004 03:44 AM
network configuration files in redhat czarherr Red Hat 5 04-29-2004 09:19 AM
Configuration of Network w/ Redhat 8.0 billiam2003 Linux - Software 7 03-27-2003 12:56 PM
redhat network configuration little_dan Linux - Networking 5 01-02-2003 07:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration