Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

CentOS - New Problem

  • 01-10-2014 10:13am
    #1
    Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭


    Hate to start a new thread, but I'm having issues with CentOS, that isn't allowing me to resolve issues relating to running updates and package downloads. It appears to be a networking issue.

    The story is, I run CentOS with a Desktop Environment and a sperate CentOS as a CLI on a VM. I run a range of other distributions such as RHEL v6, Fedora 20 and Linux Mint with no problems. The problems I am having with CentOS however, is the ability to connect to the Net using the host machines connection. I have all VMs set to NAT, sharing the host machines IP and connection, but I can't seem to figure out the issue. May I need to copy a few packages to the CentOS VMs to get them up and running, I'm not sure yet. Anyone have any ideas or solutions.


Comments

  • Registered Users Posts: 4,962 ✭✭✭opus


    Tried this just now after letting the VMplayer build a fresh Centos VM as had a ISO on my PC, worked without any problems with the network i/f using NAT. What do you see if you go through the sequence below?
    [root@localhost ~]# ethtool eth0
    Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    1000baseT/Full
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    1000baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000007 (7)
    drv probe link
    Link detected: yes
    [root@localhost ~]# ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 00:0C:29:22:18:18
    inet addr:172.16.166.130 Bcast:172.16.166.255 Mask:255.255.255.0
    inet6 addr: fe80::20c:29ff:fe22:1818/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:49285 errors:0 dropped:0 overruns:0 frame:0
    TX packets:25145 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:73529121 (70.1 MiB) TX bytes:1363666 (1.3 MiB)

    [root@localhost ~]# netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    172.16.166.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    0.0.0.0 172.16.166.2 0.0.0.0 UG 0 0 0 eth0
    [root@localhost ~]# ping -c 1 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=128 time=8.44 ms

    --- 8.8.8.8 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 9ms
    rtt min/avg/max/mdev = 8.447/8.447/8.447/0.000 ms


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    Settings for eth0:
    No Data Available

    That's what I'm getting. So by the looks of it from what I can gather, it's not communicating with the network card.


  • Registered Users Posts: 4,962 ✭✭✭opus


    Itzy wrote: »
    That's what I'm getting. So by the looks of it from what I can gather, it's not communicating with the network card.

    Means you don't have an eth0 device, eg if I try the same command on eth1 I see similar as this VM only has one i/f:
    [root@localhost ~]# ethtool eth1
    Settings for eth1:
    Cannot get device settings: No such device
    Cannot get wake-on-lan settings: No such device
    Cannot get message level: No such device
    Cannot get link status: No such device
    No data available

    I can only suggest making sure the VM's has a network adaptor in it's config but I'm sure you've done this already :)


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    It shows that the Network Adapter is connected and allows the VM to share the hosts IP, but I can't understand what may be misconfigured in the VM, that it won't connect. I've checked for a Mac Address in the VM and I'm getting all 0's, so I'm assuming it doesn't have a Driver for the NAT.


  • Registered Users Posts: 4,962 ✭✭✭opus


    What version of Centos are we talking about here?


  • Advertisement
  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    CentOS 7 with Desktop Environment.


  • Registered Users Posts: 4,962 ✭✭✭opus


    Ok then it's probably got a different device name as #7 based off the newer versions of Fedora, I'm using Centos 6 as 7 is just a bit too new for my tastes.

    Anyway you should if able to see the what it's called using the 'ifconfig -a' command & then have a look in the /etc/sysconfig/network-scripts directory where there should be a script called 'ifcfg-*name*' where *name* is whatever reported by the ifconfig command. Have a look at the file and make sure it's got the parameter ONBOOT set to 'yes'.


  • Registered Users Posts: 104 ✭✭justjustin




  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    opus wrote: »
    Ok then it's probably got a different device name as #7 based off the newer versions of Fedora, I'm using Centos 6 as 7 is just a bit too new for my tastes.

    Anyway you should if able to see the what it's called using the 'ifconfig -a' command & then have a look in the /etc/sysconfig/network-scripts directory where there should be a script called 'ifcfg-*name*' where *name* is whatever reported by the ifconfig command. Have a look at the file and make sure it's got the parameter ONBOOT set to 'yes'.

    Thanks Opus, I'll have a look into it later on.


  • Registered Users Posts: 104 ✭✭justjustin


    Did you read THIS ?

    I wasn't trying to be smart earlier, but did you consult the documentation?

    Network interfaces naming scheme has been changed in RHEL 7, and as a result also in CENT OS 7. There have also been other changes with regard to Network Manager and such...
    As to "breaking expectations": The foregoing example uses a 'traditionally' named network device of: eth0 Other device names are also possible, including for example: em1 or p3p1 and such. Like it or not, this change in approach in interface naming is the future path for Linux. It was previewed in in the upstream's "testing distribution".

    Opus' post should sort you out but it's good to know the reasons why, and by the looks of it this will probably become more common in other distros. Can't say I'm too pleased about it, but, meh, there's probably good reason behind it.

    ...and back to an earlier point, if you ever think that NAT may be the issue, switch to bridged networking and test that way.

    Good luck!


  • Advertisement
  • Closed Accounts Posts: 18,969 ✭✭✭✭syklops


    I know it is deprecated, but if you run ifconfig it should list your interfaces.


Advertisement