You are not logged in.
Just installed Arch but can't get a network connection. It was there when booting from the install media (USB) and I accidentally started the firmware looking for a UEFI flash update (stopped before it did anything) prior to loading Arch onto the HDD, so the machine can obviously contact the router without my deliberate interference.
Since loading the response to every ping attempt is connect: Network is unreachable
So far I've discovered that the ethernet kernel module is r8169 and that eth0 is now called enp2s0 (on my system, anyway). I've even managed to switch enp2s0 from down to up.
I have no idea if this is related, but during the partitioning, with which I had some problems, the keyboard switched off UK and defaulted back to USA configuration and the locale went from UK to AU, not sure if that is Australia or Austria. Nowhere near home, anyway, and neither are in the same time zone as the PC I've just loaded with Arch.
I've tried to follow the guidance in several Arch wiki pages to get the network going but without success. Can anyone get me started? I know it's a bit vague but having tried so many things there is too much output from too many commands to try to get it all down. Perhaps we could go through some logical sequence rather than my probing through darkness?,
Last edited by freshscaped (2015-09-07 20:45:53)
Offline
Could you tell us what you've tried? and you want help setting up ethernet, correct?
For example have you tried starting:
dhcpcd@enp2s0.service
Offline
Have you installed any of the networking tools like dhcpcd? Have you tried starting them? With Arch, you configure everything yourself, so if you haven't installed or configured any network tools, you should expect that there is no network connectivity. If you're only using a wired connection try this https://wiki.archlinux.org/index.php/Dhcpcd
Offline
No network = no tool downloaded. So unless it is in there already I can't use it. QED.
Progress so far, got a connection going by following the instructions in the wiki, under neetwork configuration but that, it says, will be destroyed at shutdown or reboot. This was done by setting enp2s0 as up, adding a broadcast range for dev enp2s0 then adding the router's IP address.
So how can I get it to start at boot for the future, please folks?
Last edited by freshscaped (2015-09-07 16:24:29)
Offline
dhcpcd is part of the base group and should be installed if you installed the complete group. How did you connect during the installation?
Offline
dhcpcd netctl iproute2 are all in the base group so should be on the installed system.
Did you try tutti's suggestion and if so what output did you get?
Also see Network_Configuration for alternate commands to setup networking with a dynamic ip address which as your firmware was able to access the internet seems most likely.
--
Edit
Beaten to it by tuttti
Last edited by loqs (2015-09-07 16:39:56)
Offline
Thanks guys. As stated in my OP, the netwrok was connected during the install and only failed on first boot afterwards. I've seen some dhcpcd stuff in /etc/ and was wondering how to try and get one of the examples running to see if it would work for me.
Like I said, the network is working on the PC now. What I need is a way to fix it so it works on boot. Will running dhcpcd@enp2s0.service do that without breaking anything? I need to load some software so I can get working again, i.e. my business not the system. I'm now a working day late!
Offline
Like I said, the network is working on the PC now. What I need is a way to fix it so it works on boot. Will running dhcpcd@enp2s0.service do that without breaking anything?
You have not said what commands you used to get it working so knowing jus that whatever you did does not survive reboot.
This was done by setting enp2s0 as up, adding a broadcast range for dev enp2s0 then adding the router's IP address.
What commands did you use to achieve this?
If you reboot and networking is lost then what is lost in rebooting then trying tutti's suggestion
See
Dhcpcd
Systemd
As long as you start the service but do not enable it the change would not survive another reboot
Edit:
Improved links
Last edited by loqs (2015-09-07 17:02:10)
Offline
These three commands in turn:
ip link set enp2s0 up
ip addr add 192.168.2/24 broadcast 192.168.1.255 dev enp2s0
ip route add default via 192.168.1.1
Offline
Re-read the network configuration article. All of the information you need is there.
Offline
Thanks Scimmia. I'll go through it again. Doubtless I've missed something important.
Offline
Those commands as noted will not survive a reboot so either reboot or delete the route and addr and then try either dhcpcd.service or the dhcpcd@.service template service just starting the service as noted above not enabling it until its shown to work.
Links in my previous post to the wiki for systemd to start the service and to dhcpcd for the the format the template service needs.
Offline
To clarify :your network worked on the liveCD because it is configured to start a DHCP client automatically on boot. Your installed system was not configured to do this, as it is up to you to decide what is the best method to connect is, and configure it yourself, as outlined in the Networking pages on the wiki.
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
freshscaped, The commands you did provide are for static addresses. Do you need that? Is there a particular reason you are not just enabling the dhcpcd service to start dhcpcd and being done with it?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
dhcpcd@enp2s0.service gave the response --bash: dhcpcd@enp2s0.service command not found, as it did in my earlier attempts prior to starting this thread. But now I'm confused because I must have skipped over the simpler version, dhcpcd enp2s0 which actually gave me a connection after rebooting. Both look to me like dhcpcd commands.
Which means you are correct, ewaller. I just want a stable connection. I have to understand how it works because things do go wrong and there's only me here to fix it. In fact I have to understand because there's only me here to set it up in the first place. So I'm now wading through the acres of verbiage trying to discover where the overlap, if any, is and how I can get something, probably systemctl, to start it on boot. And I'd much rather have the router doing the IP setting so DHCP if I can find a way.
Offline
Read the wiki. "dhcpcd@enp2s0.service" is not a command.
Offline
To enable a systemd service, you will want to look into using the systemctl command. Specifically, look at the enaable and start directives for that command.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
@2ManyDogs, I neither said nor implied that it was. I was asked to give its output. You are reading the output, not my opinion.
Last edited by freshscaped (2015-09-07 19:30:31)
Offline
https://wiki.archlinux.org/index.php/Be … uide#Wired
I neither siad nor implied that it was. I was asked to give its output, which I did.
Not really. You were asked if you had tried starting the service.
https://wiki.archlinux.org/index.php/Dhcpcd#Running
Last edited by 2ManyDogs (2015-09-07 19:36:45)
Offline
In which case I misunderstood what I was being asked to do. The fact is, until I feel I understand what is going on within any part of a system, I am agnostic about it.
In any event, I am grateful to you for the link. Having enabled the service I was able to start it. Having read so much, I am not certain but suspect that I am at, or very close to, a point where I can relax about the network and move on to other things.
Offline
Oy! There have been a lot of miscommunications in this thread. Before this starts to go south, let me applaud freshcscaped on his/her patience. We all can take much of the basics for granted, and despite repeated demonstrations of this, I think freshscaped's attitude has remained very productive never blaming any one or anything other than their current lack of a correct configuration and understanding. I hope we can all remember what it's like to be new and cut him/her some slack.
That said, freshscaped, you have been pointed to all the right documentation. Start checking out the links. Perhaps one of the biggest sources of confusion and miscommunication in this thread is that there is a command `dhcpcd`, but there is also a service dhcpcd@.service. You can read about systemd to understand services: these are used with the command `systemctl` with the appropriate parameters. So, for example, the following two commands would have effectively the same results:
dhcpcd enp2s0
systemctl start dhcpcd@enp2s0
Neither of these would survive a reboot, but the following one would:
systemctl enable dhcpcd@enp2s0
While this would work after a reboot, it would not take effect until a reboot. So often one would be advised to start and enable a service they want to always run.
Note that these examples are assuming you do not need a static IP address. If you are not sure if you need a static IP, you probably don't, and the examples above will work "out of the box". If you do need a static IP read the parts I think ewaller linked to (edit: he referred to them, but not linked. I will not either as I've never needed static IPs)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Just to note you do not need to enable a service to start it.
Offline
In which case I misunderstood what I was being asked to do. The fact is, until I feel I understand what is going on within any part of a system, I am agnostic about it.
Yeah, I'll confess. Most of us here could feed you the commands you need to run. What you are seeing is a group effort to aim you in the right direction so you don't have to read all the documentation at once -- only a subset.
You'll thank us one day
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
... a group effort to aim you in the right direction
Oops, I broke that
But sometimes 10 people pointing in ten directions that don't seem quite the same on the surface is less educational than one functional example that someone can hopefully extrapolate from for future use.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
In any event, I am grateful to you for the link. Having enabled the service I was able to start it. Having read so much, I am not certain but suspect that I am at, or very close to, a point where I can relax about the network and move on to other things.
How did you install Arch? If you used the Beginners' Guide it is pretty clear about this command.
If you used some other method you might want to go back and take a look at the BG.
Last edited by 2ManyDogs (2015-09-07 19:56:12)
Offline