You are not logged in.

#1 2009-08-22 16:43:10

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Trouble Setting up Network Profiles (netcfg) [SOLVED]

I have successfully gotten Arch up and running on my computer, but there is still a lot to do.

Since this is a laptop I would like to ease the transition from one network to another, so I installed netcfg and tried making some network profiles. I took the examples and replaced the pertinent parts.

When I try using netcfg, it complains that they aren't valid connections. The files seem so simple and I cannot find anything wrong with them. They are below for reference.

CONNECTION="home-wireless"
DESCRIPTION="DHCP connection to Wireless ESSID"
INTERFACE="wlan0"
ESSID="Wireless"
IP="dhcp"
CONNECTION="home-wired"
DESCRIPTION="Static ethernet connection"
INTERFACE="eth0"
IP="static"
ADDR="216.240.49.99"
GATEWAY="216.240.49.96"
DNS=("216.240.32.64,216.240.32.65")

Any help would be greatly appreciated!

Last edited by egan (2009-08-22 23:53:02)

Offline

#2 2009-08-22 17:27:18

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

Hello egan!

Did you read the related wiki pages ? Can't wireless/wired work too ? Did you try it with wicd/networkmanager too? What's the output of lspci/lsusb (I don't know which one you use usb or pci). Which chipset do you have ? Which driver do you use, which kernel ? Is your wireless connection open/wep/wpa/wpa2?

Offline

#3 2009-08-22 17:35:12

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

djszapi wrote:

Hello egan!

Did you read the related wiki pages ? Can't wireless/wired work too ? Did you try it with wicd/networkmanager too? What's the output of lspci/lsusb (I don't know which one you use usb or pci). Which chipset do you have ? Which driver do you use, which kernel ? Is your wireless connection open/wep/wpa/wpa2?

I did read the wiki pages, which was what I used to do that configuration

I haven't looked at wicd and networkmanager is too gui...

My network cards work perfectly fine with the standard rc.conf (even my broadcom wireless card with the b43 driver).

My kernel is 2.6.30-ARCH.

The wireless connection is open.

All these settings work when I do them manually with ifconfig and iwconfig + dhcpcd, but not with netcfg. It is annoying to do it manually because using the wireless overwrites my /etc/resolv.conf and I cannot subesquently connect to my ethernet connection.

Offline

#4 2009-08-22 19:19:22

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

Wow, this turns out to be a very stupid mistake on my part. I thought the connections field was there to set the name of the profile, so netcfg couldn't figure out what kind of connections they were.

It connects to my Wireless network fine, but for some reason the DNS is broken on the Wired network. I checked /etc/resolv.conf and indeed the correct nameservers were there. I suppose I'll experiment some more...

Offline

#5 2009-08-22 20:04:40

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

Yes, CONNECTION field can only contain a few fixed choices.

Offline

#6 2009-08-22 22:49:45

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

So after messing around a bit, it seems the problem with my ethernet connection is in the nameservers.

I can ping any server given its IP, but not by its URL. I have tried OpenDNS in addition to my normal nameservers. Does anyone know why this might be? The profile in question is below:

CONNECTION="ethernet-iproute"
DESCRIPTION="Static ethernet connection"
INTERFACE="eth0"
IP="static"
ADDR="216.240.49.99"
GATEWAY="216.240.49.96"
DNS=("216.240.32.64,216.240.32.65,208.67.222.222,208.67.220.220")

Once I am connected with this profile, the nameservers are indeed listed in /etc/resolv.conf, shown below:

nameserver 216.240.32.64,216.240.32.65,208.67.222.222,208.67.220.220

Any help would be very useful.

Last edited by egan (2009-08-22 22:58:31)

Offline

#7 2009-08-22 23:10:07

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

I think your DNS line(s) in the profile needs to look something like like:
DNS1="208.67.222.222"
DNS2="208.67.220.220"
DNS3="........"

leading to a resolv.conf like:
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver ........

According to man resolv.conf, you can have up to three nameservers defined, one per line.

Hope that helps....

Scott

Last edited by firecat53 (2009-08-22 23:10:58)

Offline

#8 2009-08-22 23:52:44

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

firecat53 wrote:

I think your DNS line(s) in the profile needs to look something like like:
DNS1="208.67.222.222"
DNS2="208.67.220.220"
DNS3="........"

leading to a resolv.conf like:
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver ........

According to man resolv.conf, you can have up to three nameservers defined, one per line.

Hope that helps....

Scott

Wow, I didn't realize that! I figured it was some sort of array (like in rc.conf). Every thing works nicely now. Thanks!

Offline

#9 2009-08-23 00:24:23

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

Hmm... I think DNS1, DNS2 etc are ignored by the ethernet-iproute connection script. I've been hacking at the git version of netcfg, so I may not be tracking the released version. But as I remember the code, CONNECTION=ethernet will handle EITHER (i) DNS1=, (ii) DNS1= and DNS2= (it doesn't count higher than that), or (iii) an array, declared like this: DNS=(server1 server2 server3 server4). Note that the servers are separated by whitespace not by commas. If you want to use quotes, you have to do: DNS=("server1" "server2" "server3" "server4").

CONNECTION=ethernet-iproute ignores (i) and (ii) and only handles (iii). So if you've switched to using DNS1 and DNS2 with ethernet-iproute, your settings are just being ignored. Which may be fine; maybe you'll get proper DNS assignments just from your router and you don't need to be specifying them yourself.

Offline

#10 2009-08-23 00:40:41

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: Trouble Setting up Network Profiles (netcfg) [SOLVED]

Profjim wrote:

Hmm... I think DNS1, DNS2 etc are ignored by the ethernet-iproute connection script. I've been hacking at the git version of netcfg, so I may not be tracking the released version. But as I remember the code, CONNECTION=ethernet will handle EITHER (i) DNS1=, (ii) DNS1= and DNS2= (it doesn't count higher than that), or (iii) an array, declared like this: DNS=(server1 server2 server3 server4). Note that the servers are separated by whitespace not by commas. If you want to use quotes, you have to do: DNS=("server1" "server2" "server3" "server4").

CONNECTION=ethernet-iproute ignores (i) and (ii) and only handles (iii). So if you've switched to using DNS1 and DNS2 with ethernet-iproute, your settings are just being ignored. Which may be fine; maybe you'll get proper DNS assignments just from your router and you don't need to be specifying them yourself.

Thanks for the clarification. I did notice that it ignored my secondary nameserver but I figured that wasn't too important (it being there as an auxiliary). Doing method 3 indeed gives me the correct resolv.conf.

Offline

Board footer

Powered by FluxBB