You are not logged in.

#1 2015-07-24 06:02:49

Polite Master
Member
Registered: 2015-07-24
Posts: 11

[Solved] Internet Problem for New Installation

Hello Arch Linux Community,

I am a brand new Linux user learning from different distros via VirtualBox. I stumbled on Arch Linux as a natural platform to do that. However, I am having the following issue:

On my non-root account, post-installation...

Attempting to

ping -c 3 www.google.com

results in "ping:unknown host www.google.com".

Attempting to

ping -c 3 8.8.8.8

results in "Network is unreachable".

Attempting to

sudo pacman -S alsa-utils

results in "error: failed retrieving file '<filename>' from <mirror url> : Could not resolve host: <mirror url>" for all files.

I am running a Windows 7 64-bit host and VirtualBox 4.3.28. I have a motherboard with an Intel ethernet NIC (this is the only one connected to my router and the only host OS-enabled adapter), a third-party ethernet NIC, and a WiFi adapter. Network settings in VirtualBox are defaults. Internet works for the host, all other VMs, and for the Arch Linux (2015.07.01) live installation (ping and downloads worked pre-installation).

Here are the exact actions and commands I executed during installation (ignoring my notes). Edit: Pastie redacted the important line (46) xD; it reads "systemctl enable dhcpcd@eth0.service". I can offer other information, such as the VM settings, on request. Thank you kindly for reading and in advance for discussion! smile

Last edited by Polite Master (2015-07-24 23:51:52)

Offline

#2 2015-07-24 06:27:58

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Internet Problem for New Installation

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-07-24 06:38:19

Polite Master
Member
Registered: 2015-07-24
Posts: 11

Re: [Solved] Internet Problem for New Installation

Thank you for your correction, jasonwryan. smile Let me know if I didn't change something you needed.

Last edited by Polite Master (2015-07-24 06:42:36)

Offline

#4 2015-07-24 07:38:34

ayekat
Member
Registered: 2011-01-17
Posts: 1,611

Re: [Solved] Internet Problem for New Installation

Could you paste the output of

ip addr

and

ps aux | grep dhcp

?


pkgshackscfgblag

Offline

#5 2015-07-24 08:15:34

Polite Master
Member
Registered: 2015-07-24
Posts: 11

Re: [Solved] Internet Problem for New Installation

Hi ayekat,

Thank you for your comment!

ip addr

results in
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
   inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
   link/ether <Actual number> brd ff:ff:ff:ff:ff:ff

ps aux | grep dhcp

results in no output (new bash prompt).
Edit: I entered it again and output appeared (weird, as they were identical inputs). Command results in
<User name>   246   0.0   0.0   8996   1608 ttyl      S+      04:21   0:00 grep dhcp

<Actual number> is a 12-digit colon-separated hexadecimal. I omitted it because I am not sure if it is sensitive. I checked for typos, but there may be a mistake from having to type the output.

Last edited by Polite Master (2015-07-24 08:38:23)

Offline

#6 2015-07-24 08:20:48

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] Internet Problem for New Installation

You enabled dhcpcd@eth0.service, but here you see the interface is called enp0s3.

Offline

#7 2015-07-24 08:31:35

Polite Master
Member
Registered: 2015-07-24
Posts: 11

Re: [Solved] Internet Problem for New Installation

Raynman wrote:

You enabled dhcpcd@eth0.service, but here you see the interface is called enp0s3.

Okay. That sounds important, but I am very new to all of this. I have tried entering

sudo systemctl enable dhcpcd@eth0.service

in my non-root account, but that doesn't change the output of ip addr nor the ability to ping. What should I try next?

Last edited by Polite Master (2015-07-24 08:35:03)

Offline

#8 2015-07-24 08:40:29

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,411
Website

Re: [Solved] Internet Problem for New Installation

Please re-read this section of the beginners' guide : https://wiki.archlinux.org/index.php/Be … he_network


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2015-07-24 09:17:52

Polite Master
Member
Registered: 2015-07-24
Posts: 11

Re: [Solved] Internet Problem for New Installation

Thank you for your suggestion, WorMzy. I didn't notice anything new until I saw that eth0 was italicized. I had run ip link before, but I did not realize eth0 was a variable and how ip link was needed (Lifehacker article may need an update). However, I still could not get

sudo systemctl enable dhcpcd@<something>.service

to help. For <something>, I tried io, enp0s3, 1, 2, enp0, eth1, and eth2, as I don't see an example on the wiki. In the end, I imagine I should

sudo systemctl disable dhcpcd@<something>.service

for the ones that did not work (or revert my VM). I will continue to explore this and look for anything else I missed.

Last edited by Polite Master (2015-07-24 09:21:51)

Offline

#10 2015-07-24 09:22:30

ayekat
Member
Registered: 2011-01-17
Posts: 1,611

Re: [Solved] Internet Problem for New Installation

Polite Master wrote:

(Lifehacker article may need an update)

Don't read some guides out there in the internet if you don't know what you are doing. Mostly those guides are outdated or specific to a different distribution.

Polite Master wrote:

However, I still could not get

sudo systemctl enable dhcpcd@<something>.service

to help. For <something>, I tried io, enp0s3, 1, 2, enp0, eth1, and eth2, as I don't see an example on the wiki. I will continue to explore that and look for anything else I missed.

Have you also started the service? Enabling just ensures that it is started automatically at boot, nothing else.

EDIT

From your `ip addr` output, I guess it should be `systemctl start dhcpcd@enp0s3.service`.

Last edited by ayekat (2015-07-24 09:23:30)


pkgshackscfgblag

Offline

#11 2015-07-24 09:30:21

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [Solved] Internet Problem for New Installation

To be clear, you don't really need to specify the interface name unless you have many interfaces and wish to specify a particular one.

# systemctl enable dhcpcd
# systemctl start dhcpcd

should suffice.

Offline

#12 2015-07-24 09:41:01

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] Internet Problem for New Installation

Polite Master wrote:

Thank you for your suggestion, WorMzy. I didn't notice anything new until I saw that eth0 was italicized. I had run ip link before, but I did not realize eth0 was a variable and how ip link was needed (Lifehacker article may need an update).

You mean eth0 is italicized in some lifehacker article? Because the beginner's guide doesn't mention eth0 at all. It tells you to get the interface name from `ip link` (and also links to "network configuration" page for more details). And like I said (referring to your `ip addr` output):

Raynman wrote:

here you see the interface is called enp0s3

You should indeed disable any wrongly enabled dhpcdcd@.service instances. For testing it is also easier to simply start them and then when you want them to autostart on every boot, you enable them.

Chazza wrote:

To be clear, you don't really need to specify the interface name unless you have many interfaces and wish to specify a particular one.

Or if you want other systemd units to start after the network is configured.

Offline

#13 2015-07-24 15:20:19

Polite Master
Member
Registered: 2015-07-24
Posts: 11

Re: [Solved] Internet Problem for New Installation

The problem is resolved thanks to all of you! smile Allow me to reply:

ayekat wrote:

Have you also started the service? Enabling just ensures that it is started automatically at boot, nothing else.

EDIT

From your `ip addr` output, I guess it should be `systemctl start dhcpcd@enp0s3.service`.

That said it all! From understanding Windows services, I should have realized I needed to start it or reboot before pinging. I also reinstalled from scratch, and

systemctl enable dhcpcd@enp0s3.service

works.

Chazza wrote:

To be clear, you don't really need to specify the interface name unless you have many interfaces and wish to specify a particular one.

# systemctl enable dhcpcd
# systemctl start dhcpcd

should suffice.

Thank you Chazza. I noticed this in the Beginner's Guide, but I wasn't sure if opening dhcpcd to everything is considered bad practice. However, I imagine it is perfect for my own, home computer.

Raynman wrote:

You mean eth0 is italicized in some lifehacker article? Because the beginner's guide doesn't mention eth0 at all. It tells you to get the interface name from `ip link` (and also links to "network configuration" page for more details). And like I said (referring to your `ip addr` output):

The Dhcpcd#Running page linked from the Beginner's Guide mentions eth0 in the second bullet. The Lifehacker article aforementioned had helpful details but a classic copy-paste and no explanation mistake:

systemctl enable dhcpcd@eth0.service

The whole confusion was trying LH's code thinking that interface_name on the Beginner's Guide page was the placeholder for "eth0", when that too is a placeholder. Apart from LH, a suggestion for the Beginner's Guide page is to directly display ip addr or ip link as a step to get interface_name. It was otherwise concise and very nicely presented.

Thank you all again for your kindness. smile I am learning a lot!

Last edited by Polite Master (2015-07-24 15:23:04)

Offline

#14 2015-07-24 15:29:53

ayekat
Member
Registered: 2011-01-17
Posts: 1,611

Re: [Solved] Internet Problem for New Installation

Polite Master wrote:

The whole confusion was trying LH's code thinking that interface_name on the Beginner's Guide page was the placeholder for "eth0", when that too is a placeholder.

To avoid further confusion: the network interface used to have names like eth0 and wlan0 before the advent of systemd. They were replaced by interfaces like enp0s3 to avoid having interfaces change their names when new network interfaces would be plugged to a system. So I guess that article you referred to was just a little out-of-date (although, even for old interface names, it could have been eth1, eth2, wlan0, etc. - I consider not marking placeholders with Xs a bad practice)

That said, you will always encounter some guides from the past referring to the old names. Just apply common sense when applying to your system smile

Last edited by ayekat (2015-07-24 15:36:41)


pkgshackscfgblag

Offline

#15 2015-07-24 15:34:40

Polite Master
Member
Registered: 2015-07-24
Posts: 11

Re: [Solved] Internet Problem for New Installation

Ah great! Yea eth0 was just black box code at first; I am glad I understand it now. The article was also from 2012, so I take your point about websites to heart.

Offline

#16 2015-07-24 18:30:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Internet Problem for New Installation

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB