You are not logged in.
Hello,
I am new here. I am trying to configure a network connection. I prefer to configure a static Ip connection. So, i want to follow this guide-article:
https://wiki.archlinux.org/index.php/Systemd-networkd .
At the bottom of the page Static ip Network is located. So my main question is what is container and what is host?
Also, i would like a tip if possible, My computer is connected to a switch which gives IP to many computers. For this situation what is best? DHCP or static IP?
Thanks in advance!
Offline
That wiki page was apparently written by someone who uses containers, and therefore decided that the systemd-networkd wiki page should be littered with his/her particular use of it in container configurations. Id suggest you ignore it, and read the relevant man pages instead.
We can't tell you if DHCP or static is "best" - first of all, "best" is totally subjective, but more importantly, you haven't detailed your requirements, apart from your need to "configure a network connection". Based on that alone, use either.
Last edited by tomk (2015-03-03 12:13:34)
Offline
Where can i Find those man pages? And man pages of what? For example, this: https://wiki.archlinux.org/index.php/Ne … figuration suggests to configure with netctl or dhcpd or systemd-networkd. Maybe i am wrong about this. Should i use netctl and then read man pages of it? I am a bit confused. I wanted to configure with systemd-networkd ( if this is a package ).
Offline
Where can i Find those man pages?
On your hard drive or on the internet, see https://wiki.archlinux.org/index.php/Man_page
And man pages of what?
Whatever you want to use, but this thread was about systemd-networkd, so start with `man systemd-networkd`.
Offline
Your switch cannot assign you an IP - https://en.wikipedia.org/wiki/Network_switch
Depending how your network is constructed (routers, access points, wifi extenders etc, home made routers), you can go either way - https://wiki.archlinux.org/index.php/Ne … _interface
Offline
Sorry for the late reply! Man pages are VERY helpful! I managed to configure a static connection. I am in a room of a building with other students. My building hase three switches and i have a router in my room which is connected to the bulding's 1st switch. I have the right settings now. When my machine boots i have internet some seconds/minutes later. Why is that?
Offline
... because you configured your connection correctly. Please ask a better question.
Offline
... because you configured your connection correctly. Please ask a better question.
HAHA, I mean it is not connected immediately after boot. And sometimes not connected at all and i have to restart. Better now?
Offline
You have to supply more information if you want people to be able to help: https://bbs.archlinux.org/viewtopic.php?id=57855
"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace
Offline
Ok, Here it comes ,
My internet connection is slow. I have a laptop next to me with windows on it and the difference is huge.
I am posting several outputs of commands.
# ping -c 3 google.com
PING google.com (194.177.211.120) 56(84) bytes of data.
64 bytes from 194.177.211.120: icmp_seq=1 ttl=60 time=15.2 ms
64 bytes from 194.177.211.120: icmp_seq=2 ttl=60 time=16.3 ms
64 bytes from 194.177.211.120: icmp_seq=3 ttl=60 time=21.4 ms
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 20185ms
rtt min/avg/max/mdev = 15.237/17.679/21.444/2.703 ms
# ping -c 5 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=51 time=72.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=51 time=66.6 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=51 time=61.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=51 time=70.1 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=51 time=65.4 ms
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 61.792/67.407/72.936/3.846 ms
# cat /etc/systemd/network/50-static.network
[Match]
Name=eth0
[Network]
DNS=192.168.7.2 8.8.8.8
Gateway=192.168.7.2
Address=192.168.7.120/24
# time wget [url]http://www.google.com[/url]
--2015-03-05 01:26:33-- [url]http://www.google.com/[/url]
Resolving [url=http://www.google.com]www.google.com[/url] ([url=http://www.google.com]www.google.com[/url])... 194.177.211.113, 194.177.211.117, 194.177.211.121, ...
Connecting to [url=http://www.google.com]www.google.com[/url] ([url=http://www.google.com]www.google.com[/url])|194.177.211.113|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: [url]http://www.google.gr/?gfe_rd=cr&ei=EJX3VLfcB4aJ8Qf-yYDACA[/url] [following]
--2015-03-05 01:26:38-- [url]http://www.google.gr/?gfe_rd=cr&ei=EJX3VLfcB4aJ8Qf-yYDACA[/url]
Resolving [url=http://www.google.gr]www.google.gr[/url] ([url=http://www.google.gr]www.google.gr[/url])... 194.177.211.121, 194.177.211.122, 194.177.211.116, ...
Reusing existing connection to [url=http://www.google.com:80]www.google.com:80[/url].
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’
index.html [ <=> ] 17.89K --.-KB/s in 0.04s
2015-03-05 01:26:43 (427 KB/s) - ‘index.html’ saved [18317]
real 0m10.441s
user 0m0.010s
sys 0m0.010s
# wget [url]http://www.google.com[/url]
Resolving [url=http://www.google.com]www.google.com[/url] ([url=http://www.google.com]www.google.com[/url])... 194.177.211.117, 194.177.211.116, 194.177.211.119, ...
Connecting to [url=http://www.google.com]www.google.com[/url] ([url=http://www.google.com]www.google.com[/url])|194.177.211.117|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: [url]http://www.google.gr/?gfe_rd=cr&ei=KZf3VM7SB6mH8Qeu_ICIBA[/url] [following]
--2015-03-05 01:35:35-- [url]http://www.google.gr/?gfe_rd=cr&ei=KZf3VM7SB6mH8Qeu_ICIBA[/url]
Resolving [url=http://www.google.gr]www.google.gr[/url] ([url=http://www.google.gr]www.google.gr[/url])... 194.177.211.123, 194.177.211.122, 194.177.211.119, ...
Reusing existing connection to [url=http://www.google.com:80]www.google.com:80[/url].
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.1’
index.html.1 [ <=> ] 17.92K --.-KB/s in 0.03s
2015-03-05 01:35:50 (573 KB/s) - ‘index.html.1’ saved [18346]
# lspci -v
.......
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)
Subsystem: Gigabyte Technology Co., Ltd Motherboard
Flags: bus master, fast devsel, latency 0, IRQ 26
I/O ports at de00 [size=256]
Memory at fdbff000 (64-bit, prefetchable) [size=4K]
Memory at fdbe0000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at fde00000 [disabled] [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=2 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78
Kernel driver in use: r8169
Kernel modules: r8169
...........
# cat /etc/resolv.conf
# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.
nameserver 192.168.7.2
nameserver 8.8.8.8
# cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain zabArch
::1 localhost.localdomain zabArch
# End of file
# dmesg | grep r8169
[ 4.695019] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 4.695029] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 4.695227] r8169 0000:02:00.0: irq 26 for MSI/MSI-X
[ 4.695411] r8169 0000:02:00.0 eth0: RTL8168c/8111c at 0xffffc9000063e000, 00:24:1d:d1:44:ea, XID 1c4000c0 IRQ 26
[ 4.695414] r8169 0000:02:00.0 eth0: jumbo features [frames: 6128 bytes, tx checksumming: ko]
[ 6.859386] r8169 0000:02:00.0 eth0: link down
[ 6.859425] r8169 0000:02:00.0 eth0: link down
[ 8.479455] r8169 0000:02:00.0 eth0: link up
# time dig google.com
bash: dig: command not found
real 0m0.002s
user 0m0.000s
sys 0m0.000s
# time echo -e 'GET /HTTP/1.0\nHost: google.com\n\n'|nc 74.125.79.99:80
Error: Couldn't resolve host "74.125.79.99:80"
real 0m0.003s
user 0m0.000s
sys 0m0.000s
My motherboard is GIGABYTE GA-MA785GMT-UD2H
My network card is Realtek 8111C Gigabit Ethernet (10/100/1000Mbit)
I am trying firefox and uzbl-browser.
If any information is missing, please do not hesitate to ask.
Thanks in advance!
Last edited by zabrielza (2015-03-05 07:51:03)
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code
Thanks, I did not know how to do this.
Offline
I Have to Ask. Could somebody point me to the right direction about my problem? Should i Give more information about my system? Thanks
Offline
# cat /etc/hosts # # /etc/hosts: static lookup table for host names #
#<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 localhost.localdomain zabArch ::1 localhost.localdomain zabArch # End of file
Isn't it supposed to look like this:
127.0.0.1 localhost.localdomain localhost zabArch
::1 localhost.localdomain localhost zabArch
Offline
Thanks for the reply. Yes U are right! BUT, after doing that when i rebooted a have this:
ping 8.8.8.8
From 192.168.7.2 icmp_seq=.. Destination Net Unreachable
EDIT: Actually i have internet but no difference in the speed etc. What can i do ?
Last edited by zabrielza (2015-03-08 09:07:30)
Offline
Have you tried using netctl?
https://wiki.archlinux.org/index.php/netctl
Follow the instructions there in the configuration section. You just need to find the interface name in you system with "ip link", for example something like enp2s0.
~Simplicity is the ultimate sophistication.
Offline
Have you tried using netctl?
https://wiki.archlinux.org/index.php/netctlFollow the instructions there in the configuration section. You just need to find the interface name in you system with "ip link", for example something like enp2s0.
Yes, I have tried no change in my wget time and ping etc.
Offline
Is there any way to figure out if my problem is related to my network card driver?
Offline
How does the connection perform if you try it in the live environment with different distributions?
Offline
How does the connection perform if you try it in the live environment with different distributions?
I do not know yet. But I will try this and will post results. But i should mention that, in the same computer, i have been working with various linux distros for the past 7-8 years. Firstly ubuntu, ubuntustudio, fedora and then I installed debian. In the first 3 distributions I had no problems at all with my network connections. In debian I was struggling a lot with configurations. The only solutions that worked were to use dns server from google and install r8168 driver instead of r8169. Also i would like to mention, when I booted with a kernel option --noapic or something like that, internet was really fast. I do not know why. Maybe you could give me an idea.
Anyway, In arch linux I have installed r8168 and seems to be better. Also, I installed namebench and configured my dns servers with 8.8.8.8. No great changes, still after boot my network connection is established after minutes instead of seconds. Is this information helpful?
Offline