Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Im having a bit of a weird situation. Ive installed Fedora Linux 19 onto a virtual machine with no GUI. initially eth0 does not show up when I perform ifconfig. when I run dmesg | grep eth I see the adapter but it says it changed names to p2p1. Once I perform the ifconfig p2p1 up command it shows up. Now when I try to edit the /etc/sysconfig/network-scripts/ifcfg-p2p1, it does not exist. the only scripts that are there lo and enp0s3. If I try to create the ifcfg-p2p1 file with the correct settings, I can not restart the network service. I tried editing the enp0s3 file, but that did not work. Im fairly new to linux and not sure what else to put in here, so if you need any more information just let me know and Ill put it in here.

share|improve this question
add comment

migrated from serverfault.com Oct 30 '13 at 3:51

This question came from our site for professional system and network administrators.

1 Answer

Assuming a static config: Create the file /etc/sysconfig/network-scripts/ifcfg-p2p1 and add the following to it:

NM_CONTROLLED=no
DEVICE=p2p1
BOOTPROTO=none
## Change the HWADDR to match your adapter's mac address
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
## Edit the below to match your network
IPADDR=192.168.1.2
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
GATEWAY=192.168.1.1

Or if you want DHCP config:

NM_CONTROLLED="yes"
HWADDR="XX:XX:XX:XX:XX:XX"  
BOOTPROTO="dhcp"
DEVICE="p2p1"
ONBOOT="yes"

Then change onboot=no in your enp0s3 file or move it out of the directory for now (assuming you don't have an interface by the name of enp0s3 in ifconfig)

That should get it working for you, also keep in mind you'll have to add your nameservers manually to /etc/resolv.conf if you aren't running dhcp.

share|improve this answer
add comment

Your Answer

 
discard

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