You are not logged in.

#1 2012-05-26 23:14:18

stevepoppers
Member
Registered: 2011-05-09
Posts: 11

static ip still getting dhcp'd [SOLVED]

I've got a media server running arch, and the networking/daemons section of rc.conf is below. My router doesn't support dhcp reservations. I still need to use dhcp because I'm not the only person on this network.

The address I've chosen is outside the router's dhcp address pool (2-100). My router still assigns an ip via dhcp, such as 192.168.2.2. It's been like this for weeks, and I've spent hours searching for a solution. It is quite possible that my router is just a piece of crap, but I don't know the nitty gritty of how this stuff works.

The netmask was found in some file on the server while it was already connected via dhcp, and the broadcast address was found using an online calculator for it. Btw, how much of this do I need to fill in myself and how much is automatic?

# NETWORKING
# ----------
HOSTNAME="mcserver"

interface=eth0
address=192.168.2.101
netmask=255.255.248.0
broadcast=192.168.7.255
gateway=192.168.2.1

NETWORK_PERSIST="yes"

# DAEMONS
# -------
#
DAEMONS=(syslog-ng network @crond dbus @cpufreq @alsa @samba @sshd)

EDIT: Okay, seconds after posting this, I recall I found the netmask on the router's homepage, and realized that that was the settings for the actual internet. Looked at lan settings and it's 255.255.255.0. rc.conf has been ammended. Recalculating broadcast to 192.168.2.255. Restarting networking. And I think it worked. Rebooting everything.

Okay, yes, everything works now. *huge sigh of relief* Amazing how such a little detail can cause so much frustration.

Oddly, the router still assigns an ip via dhcp, but both the .101 and .2 work for ssh, etc.

The router is a Belkin N150 with up-to-date firmware. Lack of dhcp reservation made this a lot harder than it had to be, but this still wasn't the router's fault as I was thinking.

I'm going to mark this as solved, but seeing as I solved it myself almost immediately, admins may wish to delete. I don't mind.

Last edited by stevepoppers (2012-05-26 23:37:02)

Offline

#2 2012-05-27 07:36:57

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: static ip still getting dhcp'd [SOLVED]

Good to hear you managed to solve it.

As a small sidenote, it's quite strange that you would still get a dhcp address as well. The way dhcp works, your router shouldn't be assigning a lease unless your client specifically requests one, which leads me to believe you still have something configured somewhere which is doing a dhcp request.

Double check that you don't have any scripts, netcfg profiles,... running which could be responsible for this.


Burninate!

Offline

#3 2012-05-27 17:50:52

stevepoppers
Member
Registered: 2011-05-09
Posts: 11

Re: static ip still getting dhcp'd [SOLVED]

I wouldn't even know where to check. I'm pretty sure the above is the only network setup I've done. I am curious, though, so if anyone knows where I might find clues, let me know.

Offline

Board footer

Powered by FluxBB