You are not logged in.

#1 2009-02-09 04:27:54

Vladman
Member
Registered: 2009-01-28
Posts: 118

[solved]---help setup static ip --take2

Ok, I'm stuck again...
So last night I setup my static ip on my laptop and with your help it was working great after several reboots.
Now this morning I went to do the same on my desktop...
After 3 hours I got it going.

desktop ip 192.168.1.50
laptop ip 192.168.1.40

I haven't touched anything on the laptop and now its not working anymore, meaning it jumps to 192.168.1.27 or anything else but 40.

I have a feeling its because of the hosts file
desktop

127.0.0.1       localhost.localdomain   localhost

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost vladman

laptop

127.0.0.1       localhost.localdomain   localhost

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost vlad

is it because they are both using localhost?

Last edited by Vladman (2009-02-10 17:17:52)

Offline

#2 2009-02-09 04:48:07

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: [solved]---help setup static ip --take2

try this
desktop

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost vladman
192.168.1.50         vladman.localdomain    vladman
192.168.1.40         vlad.localdomain          vlad

laptop

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost vlad
192.168.1.50         vladman.localdomain    vladman
192.168.1.40         vlad.localdomain          vlad

Make sure your hostname and ip address is entered correctly in /etc/rc.conf.

Offline

#3 2009-02-09 16:45:56

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

Thanks for your help my0pic,
did what you said but still no change :/
here is my rc.conf just incase

HOSTNAME="vlad"

# 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
#
eth0="eth0 192.168.1.40 netmask 255.255.255.0 broadcast 192.168.1.255"
#eth0="dhcp"
INTERFACES=(lo eth0 wlan0)
# 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.1.1"
ROUTES=(gateway)

any ideas?

Offline

#4 2009-02-09 17:09:43

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [solved]---help setup static ip --take2

from your rc.conf it looks like you've set the static IP for eth0, then you have a few interfaces in the next line.  i'm not sure how but if you want the static IP with both wlan0 and eth0 you should define it for both.  can you just repeat the eth0= line as wlan0=? i've never done it so i dunno.

Offline

#5 2009-02-09 17:20:25

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

I have tried that as well but no luck. I set different IPs for eth0 and wlan0 but they just use some random IPs as if I use dhcp?

Offline

#6 2009-02-09 18:35:00

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

It seems something is loading dhcp...
maybe I load some deamon I'm not supposed to?

DAEMONS=(@network @httpd dhcdbd syslog-ng netfs crond hal fam dbus networkmanager !net-profiles alsa)

Offline

#7 2009-02-09 19:16:15

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: [solved]---help setup static ip --take2

I think you should remove networkmanager from the list of DAEMONS.


In love I believe and in Linux I trust

Offline

#8 2009-02-09 20:36:13

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

ckristi wrote:

I think you should remove networkmanager from the list of DAEMONS.

OK, if I do that, I get the right IP on the eth0 but I lose wireless...

What to do?

Offline

#9 2009-02-09 21:43:03

Lilim
Member
From: Poland
Registered: 2008-02-09
Posts: 37

Re: [solved]---help setup static ip --take2

Vladman wrote:

OK, if I do that, I get the right IP on the eth0 but I lose wireless...

What to do?

In what way you lose the wireless?

Offline

#10 2009-02-09 21:53:18

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

Lilim wrote:
Vladman wrote:

OK, if I do that, I get the right IP on the eth0 but I lose wireless...

What to do?

In what way you lose the wireless?

if I run ifconfig wlan0 is no longer listed.

Offline

#11 2009-02-09 22:01:44

Lilim
Member
From: Poland
Registered: 2008-02-09
Posts: 37

Re: [solved]---help setup static ip --take2

What wireless card are you using? Show me the input of lspci. I'm not using the networkmanager and still use the wireless connection.

Offline

#12 2009-02-09 22:16:24

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: [solved]---help setup static ip --take2

I think the easy way might be to configure your wired network by using network-manager also and not mess with the manual configuration of a wireless card (I'm a console user, but even I hate the CLI methods for wireless networks). And drop the "network" daemon (and the rc.conf configured ip).


In love I believe and in Linux I trust

Offline

#13 2009-02-09 22:24:16

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

Lilim wrote:

What wireless card are you using? Show me the input of lspci. I'm not using the networkmanager and still use the wireless connection.

0c:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)

Keep in mind, everything works fine on dhcp, just the static ip is not working right.

ckristi, I will try dropping the nework deamn and report back.

Offline

#14 2009-02-09 22:46:11

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

OK I'm making a bit of progress...
so if I have the cable in eth0 and restart network
I have the right IPs for both eth0 and wlan0

If I unplug the wire and connect to wireless
I get random IPs on both cards.

If I connect to eth0 again, random IP... unless I restart network

Offline

#15 2009-02-10 05:01:30

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: [solved]---help setup static ip --take2

Disable dhcp in networkmanager. I think networkmanager takes over if the interface state is changing. Check your networkmanager settings and make sure that it is configured to not automatically retrieve ip addresses.


In love I believe and in Linux I trust

Offline

#16 2009-02-10 05:11:21

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

Thanks ckristi, can you explain where to disable dhcp in network manager please, there is nothing in the wiki nor official networkmanager site.

Offline

#17 2009-02-10 06:12:14

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: [solved]---help setup static ip --take2

Well, I'm not a big networkmanager user on Arch myself. But I did a little bit of digging, installed networkmanager and network-manager-applet packages... and this is how I see the problem solved. As I've seen, network manager creates default connections for every network card present (readonly, you cannot modify them). All I had to do was to define my own connection in nm-applet and it will set it as a default connection instead of "Auto eth0". In my own created connection I've been able to choose between auto-detection of my IP or setting it manually.


In love I believe and in Linux I trust

Offline

#18 2009-02-10 15:25:02

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

ckristi you nailed it!
However, can you help me with what to put in the dns/domain field?
So far I set the connection to manual, I filled the address, netmask, gateway and the IP is working but I can't connect to the internet.

Offline

#19 2009-02-10 17:17:16

Vladman
Member
Registered: 2009-01-28
Posts: 118

Re: [solved]---help setup static ip --take2

Never mind I got it now!
Thank you all for your help!

Offline

#20 2009-02-11 10:01:26

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: [solved]---help setup static ip --take2

Vladman wrote:

Never mind I got it now!
Thank you all for your help!

Glad to hear that. I hope you'll have a nice Linux experience ahead. smile


In love I believe and in Linux I trust

Offline

Board footer

Powered by FluxBB