You are not logged in.

#1 2011-08-12 02:50:54

alienated_humour
Member
From: NYC
Registered: 2011-07-28
Posts: 23

NetworkManager vs. netcfg dynamic IP

I've been running Arch for about a week and a half now (ever since I got my new hard drive).  Up until yesterday I'd been using netcfg to connect to my school's PEAP wired network with dhcpcd since dynamic leasing is required.  This gave me the same IP address every time I restarted the network - from hard restart of the computer to using "netcfg -d wired".  However when I installed NetworkManager to automatically manage and connect to the network I get a different address every time I connect.  This is inconvenient as I am running a samba share so I can store all of my school and media files on my desktop and access them from any networked computer.  This wouldn't be a problem if netcfg would connect automatically to the network but every time at boot I'd have to open up a terminal and run "sudo netcfg wired" to connect.  My question is this: can I (a) make NetworkManager lease the same IP address every time or (b) have netcfg connect at start (prior to this I had net-profiles in my rc.conf file).

For diagnostic purposes here are the networking and daemons parts of my rc.conf:

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="alienation"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#

#Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
#eth0="dhcp"
INTERFACES=(!eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
NETWORKS=(wired)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng dbus hal networkmanager netfs autofs @crond alsa cups samba slim)

Example:  I saved this post and restarted my computer.  Before restarting my IP was *.*.122.176, after restarting it's *.*.122.174.

Is there something I overlooked?  A wiki article (I read both the NetworkManager and netcfg one a few times each) or forum topic I've missed?

EDIT:  Something I forgot to say - I used Ubuntu prior to this (for shame, I know) and NetworkManager there worked flawlessly and gace me the same IP each time so I don't know what the difference is.

Last edited by alienated_humour (2011-08-12 02:52:14)

Offline

#2 2011-08-12 03:43:20

cybertorture
Member
Registered: 2010-05-05
Posts: 339

Re: NetworkManager vs. netcfg dynamic IP

put in DAEMONS

net-profiles

Last edited by cybertorture (2011-08-12 03:43:37)


O' rly ? Ya rly Oo

Offline

#3 2011-08-12 03:44:04

alienated_humour
Member
From: NYC
Registered: 2011-07-28
Posts: 23

Re: NetworkManager vs. netcfg dynamic IP

I had that prior to NetworkManager, that's why I switched over - it wasn't working.

Offline

#4 2011-08-12 03:46:06

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: NetworkManager vs. netcfg dynamic IP

What wasn't working? Were there any error messages? Did you setup your network profile correctly?

Offline

#5 2011-08-12 03:47:00

alienated_humour
Member
From: NYC
Registered: 2011-07-28
Posts: 23

Re: NetworkManager vs. netcfg dynamic IP

Yes, my network connected properly from the terminal - it just wouldn't automatically connect using net-profiles.

EDIT:  And I don't remember seeing any error messages, is there a place I could check for a log?

Last edited by alienated_humour (2011-08-12 03:47:26)

Offline

#6 2011-08-12 03:47:24

cybertorture
Member
Registered: 2010-05-05
Posts: 339

Re: NetworkManager vs. netcfg dynamic IP

It is working just fine, try to comment out INTERFACES, gateway and ROUTES in rc.conf then try again


O' rly ? Ya rly Oo

Offline

#7 2011-08-12 04:12:36

alienated_humour
Member
From: NYC
Registered: 2011-07-28
Posts: 23

Re: NetworkManager vs. netcfg dynamic IP

Just tried that - no luck (though I'm again getting the same IP address using netcfg as opposed to a different one every time with NetworkManager)

┌[ ~ ]
└──➤ ʃ  sudo netcfg wired
:: wired up                                                                                                           [BUSY]  
> DHCP IP lease attempt failed. 
                                                                                                                      [FAIL]

Could it have something to do with the timeout?  I wouldn't think so because the fail happens before 45 seconds have passed.

Here's my /etc/network.d/wired:

CONNECTION='ethernet'
INTERFACE='eth0'
IP='dhcp'
TIMEOUT=45
CONFIGSECTION='
    key_mgmt=IEEE8021X
    eap=PEAP
    phase1="peaplabel=0"
    phase2="auth=MSCHAPV2"
    username="username"
    password="password"'

(username and password are what they should be in the actual file, only thing I changed).

Last edited by alienated_humour (2011-08-12 04:22:29)

Offline

Board footer

Powered by FluxBB