deregular

You guys will probably be able to help me with this.

I have a dev server here that I use for production work.

It is connected directly to my router and Im accessing from my home

net

 work with Samba.

Everytime I do a server reboot however, the IP changes, and I have to manually go in and alter all the

net

 work settings again, to be able to get it all operating again pro

perl

 y.

My router is setup to distribute local ips... (re.. 192.168.0.*) to the boxes on the

net

 work.

<>How do ensure that the freebsd

mac

 hine, always connects back to the

net

 work using the same IP? (192.168.0.10)

Probably an easy one, but I cant seem to find anything on it. (well nothing that gets through my thick skull anyway)

perkiset

The

mac

 hine sounds like it's set for DHCP rather than a static address, that's all.

I don't know enough FreeBSD to tell you how to do it, but if you can get to the GUI there will certainly be a

net

 work admin cpanel that will allow you to specify how you want the NIC to behave.

deregular

GUI? whats that? never could get X running, never could be bothered really trying. lol

Anywho, managed to get it.

It was set to DHCP.

So for anyone who comes across this..

In my /etc/rc.conf

i replaced
ifconfig_em0="ApplauseHCP"
with
ifconfig_em0="192.168.0.50

net

 mask 255.255.255.0"

(em0 being my

net

 work adapter of course)

Rebooted the box, and all is well. Now I just have to reset everything to run from 192.168.0.50.

ratthing

You probably also want to make sure your router won't hand out that IP address to some other

mac

 hine on your

net

 work, too.  A well-behaved DHCP server *shouldn't*, but consumer home routers aren't well-known for being well-behaved. :-/

You should also put the entry into your /etc/hosts file, so your local applications can do reverse name lookups if they happen to use the 192.x IP rather than the loopback interface (127.0.0.1).

If you're feeling ambitious, you could do full-blown "fake" DNS for your local

net

 work http://www.langfeldt

.net

 /DNS-HOWTO/BIND-8/DNS-HOWTO-5.html
.

=RT=

deregular

Thanks ratthing.

Already have altered the hosts file.

::1                        localhost localhost.server
127.0.0.1                localhost localhost.server
192.168.0.50          localhost localhost.server
192.168.0.50          server.localhost


Not sure why it had a double entry for the *.50 ip but meh.. it works..

Bookmarked the fake dns stuff for future reference, took a quick look at it and recognize the arpa settings as Ive been playing with them of late on our work servers. (this shit just fries my brain though, I guess it'll sink in sooner or later)

perkiset

quote author=deregular link=topic=676.msg4732#msg4732 date=1199585883

Not sure why it had a double entry for the *.50 ip but meh.. it works..


I often have multiple names for a single address... that's all that's happening there.

ratthing

quote author=deregular link=topic=676.msg4732#msg4732 date=1199585883

Bookmarked the fake dns stuff for future reference, took a quick look at it and recognize the arpa settings as Ive been playing with them of late on our work servers. (this shit just fries my brain though, I guess it'll sink in sooner or later)


You're welcome.  DNS is not really that complicated, just another form of pointers, so you should be able to wrap your head around it if you get the latter.

I don't really need fake DNS but I may go ahead and implement it as my ISP's DNS servers suck rocks so bad I've been considering implementing a caching name server anyway.  If I do, I'll document it step-by-step, otherwise I won't remember wtf I did later.  :huh:  I'll post when I do.

=RT=


Perkiset's Place Home   Politics @ Perkiset's