Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to start network interface from command line.I usually do it with the GUI but I don't have desktop manager now.I tried

/etc/init.d/network start
,it shows ok,but when I try curl or links,it can't connect.

share|improve this question

2 Answers 2

Can you post /etc/sysconfig/network?

It may be as simple as:

ifup eth0

Fedora 15 uses "Consistent" device naming, which means that your actual device name will likely be something along the lines of em1 or pci3p1 Source

share|improve this answer
    
it worked but it was pci4p1 not eth0.(Fedora 15).I have no idea why. –  Alexander May 13 '11 at 15:36
    
    
Ugh. "Consistent" network device naming. Consistent with absolutely no other distribution, that's what. –  Hyppy May 13 '11 at 16:25
    
Hyppy,can you add the link in the answer for anybody else using Fedora 15 –  Alexander May 13 '11 at 17:18

In Fedora there is a service called NetworkManager.service that automatically makes sure you are connected to the internet as defined in: /etc/sysconfig/network-scripts/ifcfg-em1

Run this command as root to check the status of this service:

systemctl status NetworkManager.service

If it is disabled, enable it, or find out why it was disabled:

systemctl enable NetworkManager.service

Then either reboot the computer or restart the network.service manually:

systemctl restart network.service

Here is the contents of my /etc/sysconfig/network-scripts/ifcfg-em1

UUID="e1a84d44-b53c-43ef-a8b4-df5ce5263ebc"
NM_CONTROLLED="yes"
HWADDR="A8:50:F2:E2:05:7E"
BOOTPROTO="dhcp"
DEVICE="em1"
ONBOOT="yes"
USERCTL="yes"

You would roll your own 'restart network' scripts only if the available ones are non functional or are not adequate for a specific task.

Source:

http://danielgibbs.co.uk/2012/06/fedora-17-set-static-ip-address/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.