1

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.

2 Answers 2

3

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

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

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/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .