You are not logged in.

#1 2015-03-03 11:32:33

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Trying to configure a network connection on Fresh installation!

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

#2 2015-03-03 12:10:08

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Trying to configure a network connection on Fresh installation!

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

#3 2015-03-03 13:02:05

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

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

#4 2015-03-03 13:15:54

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

Re: Trying to configure a network connection on Fresh installation!

zabrielza wrote:

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

#5 2015-03-03 13:59:42

aaroncaffrey
Banned
Registered: 2014-06-04
Posts: 13

Re: Trying to configure a network connection on Fresh installation!

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

#6 2015-03-03 22:13:33

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

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

#7 2015-03-04 07:28:56

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Trying to configure a network connection on Fresh installation!

... because you configured your connection correctly. Please ask a better question.

Offline

#8 2015-03-04 14:52:48

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

tomk wrote:

... 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? smile

Offline

#9 2015-03-04 14:56:03

nullified
Member
From: Massachusetts, USA
Registered: 2013-12-09
Posts: 468

Re: Trying to configure a network connection on Fresh installation!

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

#10 2015-03-04 23:44:43

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

Ok, Here it comes smile ,

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

#11 2015-03-05 00:31:48

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

Re: Trying to configure a network connection on Fresh 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

#12 2015-03-05 07:52:44

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

jasonwryan wrote:

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

#13 2015-03-07 18:09:41

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

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

#14 2015-03-07 18:19:34

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,757
Website

Re: Trying to configure a network connection on Fresh installation!

zabrielza wrote:
# 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

https://wiki.archlinux.org/index.php/Be … e#Hostname

Offline

#15 2015-03-07 21:00:15

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

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

#16 2015-03-09 01:46:04

Mario Chapa
Member
From: Tokyo
Registered: 2013-08-02
Posts: 13

Re: Trying to configure a network connection on Fresh installation!

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

#17 2015-03-09 09:54:04

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

Mario Chapa wrote:

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.

Yes, I have tried no change in my wget time and ping etc.

Offline

#18 2015-03-09 10:20:15

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

Is there any way to figure out if my problem is related to my network card driver?

Offline

#19 2015-03-09 19:53:51

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,757
Website

Re: Trying to configure a network connection on Fresh installation!

How does the connection perform if you try it in the live environment with different distributions?

Offline

#20 2015-03-10 07:12:04

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Trying to configure a network connection on Fresh installation!

Head_on_a_Stick wrote:

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

Board footer

Powered by FluxBB