You are not logged in.
I have installed Arch Linux on the laptop. At the start of the installation, I use "iwctl" command and at the end of the installation I also install " netctl ".
Now I plug my wired cable in my LAN port and try to use it. Prior I was using Windows 10 on the same machine with the following Static IP address
IP 10.1.81.250
Subnet mask 255.255.255.0
GateWay 10.1.81.1
DNS 8.8.8.8
In my Arch Linux, I use the command
[root@testpc ~]# ip address add 10.1.81.250/24 broadcast + dev eno1
Then I use ip addr command
[root@testpc ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
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: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 0f:1f:bf:22:b4:e0 brd ff:ff:ff:ff:ff:ff
altname enp0s25
inet 10.1.81.250/24 brd 10.1.81.255 scope global eno1
valid_lft forever preferred_lft forever
3: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether e6:23:09:35:f7:51 brd ff:ff:ff:ff:ff:ff permaddr 87:3b:1b:14:16:c5
Then I try to ping my gateway which was successfully done.
[root@testpc ~]# ping 10.1.81.1
PING 10.1.81.1 (10.1.81.1) 56(84) bytes of data.
64 bytes from 10.1.81.1: icmp_seq=1 ttl=255 time=3.19 ms
64 bytes from 10.1.81.1: icmp_seq=2 ttl=255 time=1.15 ms
64 bytes from 10.1.81.1: icmp_seq=3 ttl=255 time=1.15 ms
64 bytes from 10.1.81.1: icmp_seq=4 ttl=255 time=0.867 ms
64 bytes from 10.1.81.1: icmp_seq=5 ttl=255 time=1.08 ms
There is another computer on the same network which I can also ping.
[root@testpc ~]# ping 10.1.81.249
PING 10.1.81.249 (10.1.81.249) 56(84) bytes of data.
64 bytes from 10.1.81.249: icmp_seq=1 ttl=64 time=0.910 ms
64 bytes from 10.1.81.249: icmp_seq=2 ttl=64 time=0.245 ms
64 bytes from 10.1.81.249: icmp_seq=3 ttl=64 time=0.256 ms
64 bytes from 10.1.81.249: icmp_seq=4 ttl=64 time=0.583 ms
64 bytes from 10.1.81.249: icmp_seq=5 ttl=64 time=0.643 ms
64 bytes from 10.1.81.249: icmp_seq=6 ttl=64 time=0.368 ms
^C
--- 10.1.81.249 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5060ms
rtt min/avg/max/mdev = 0.245/0.500/0.910/0.237 ms
[root@testpc ~]#
The following command shows the output.
[root@testpc ~]# ip route
10.1.81.0/24 dev eno1 proto kernel scope link src 10.1.81.250
[root@testpc ~]# ip link show dev eno1
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 0f:1f:bf:22:b4:e0 brd ff:ff:ff:ff:ff:ff
altname enp0s25
[root@testpc ~]#
In the /etc/resolv.conf file I also add nameserver 8.8.8.8 The issue is the machine can not ping any site even 8.8.8.8
My internet is not working. Kindly guide me on where I am doing mistake on how may I fix the issue.
Last edited by gardenair (2021-09-15 09:58:02)
Offline
You haven't added your gateway. You only have one entry in the routing table for 10.1.81.0/24. You need to add a route for hosts outside your network segment:
ip route add default via 10.1.81.1 dev eno1
Or, since you mentioned netctl: https://wiki.archlinux.org/title/Netctl … e_profiles
Offline
Well thanks for guiding me. Appreciate you give me a hint . Well, it means that assigning an IP address to a machine is the 1st step i.e
[root@testpc ~]# ip address add 10.1.81.250/24 broadcast + dev eno1
then
the second command will be to add a route.
[root@testpc ~]# ip route add default via 10.1.81.1 dev eno1
here what default means?
and the 3rd thing will be to add the DNS inside /etc/resolv.conf file which I have already added
Concluding this means there are three steps for it.
1- ip address add
2- ip route add
3- /etc/resolv.conf
So with the combination of these three steps the machine can talk with the rest of the world? am I right?
Last edited by gardenair (2021-09-08 18:22:28)
Offline
Correct, those are also the three steps listed in Network_configuration#Static_IP_address.
#Check_the_connection adds two more steps to the beginning, closer to the hardware.
Edit: the default route is also covered there: https://wiki.archlinux.org/title/Networ … ting_table
Last edited by Raynman (2021-09-08 18:28:52)
Offline
Thanks for your guidance. I have successfully connect my Arch Linux machine. Now
I also use systemd method to connect it.Following are the steps.
root@testpc ~]# cd /etc/systemd/network
[root@testpc network]# touch eno1.network
root@testpc ~]# vim /etc/systemd/network/eno1.network
[Math]
Name=eno1
[Network]
Address=10.1.81.250/24
Gateway=10.1.81.1
DNS=8.8.8.8
[root@testpc ~]# systemctl start systemd-networkd
[root@testpc ~]# systemctl enable systemd-networkd
Now i can ping 8.8.8.8 successfully. One thing I want to ask that i am using XFCE desktop environment on my Arch system. To see my Network Connection on system tray I run
[root@testpc ~]# pacman -S network-manager-applet
then
[root@testpc ~]# nm-applet
I shows the Network Icon but as I press "Ctrl + z" the icon disappear. How may I keep the connect permanent on my system tray ?
Thanks in advance.
Last edited by gardenair (2021-09-15 05:36:23)
Offline
If that's what you want to use you should disable and stop systemd-networkd and start and enable NetworkManager instead and configure the connection in a networkmanager tool. And see: https://wiki.archlinux.org/title/Networ … rt_to_DHCP
You mentioned 4 different networking tools over the course of this thread, this can lead to all sorts of issues. Decide for one if you want system tray integration the only real choice you have is NetworkManager, make sure everything else, systemd-networkd, iwd, netctl have to be disabled for this to work properly.
As for keeping it running, add the nm-applet to your session/DE autostart would be simplest, but if you want to keep it running from within a terminal you can add a &
nm-applet &
Last edited by V1del (2021-09-15 06:15:20)
Offline
Thanks a lot for guiding me.Appreciate it.
Offline