Static IP Address

After much use of the search function I've come up with nothing so now I have to ask. I've got a clean install of FreeBSD 8.0 and I'm trying to figure out how to set it for a static IP address. When I did the initial install I let it sort out the DHCP settings and once it was past that I realized I should have set it then. What's the best way to go about doing this now?

Thanks in advanced.
 
as I understand you want to use DHCP?
in your /etc/rc.conf
Code:
ifconfig_[B]re0[/B]="DHCP"
replace re0 with your interface
 
Just edit /etc/rc.conf and change the ifconfig line to something like:
Code:
ifconfig_rl0="192.168.5.12 netmask 255.255.255.0"

Really no need for sysinstall ;)
 
Once the OS is installed and you have booted into it, then you should forget that sysinstall even exists. Don't use sysinstall to configure the system. Use it to install the system, and then forget about it.

You'll save yourself a hell of a lot of headaches down the line. And, you'll actually learn how to configure the system properly.
 
FBSDin20Steps said:
This is optional. Since he is new to FreeBSD the easiest way is to run sysinstall or read the handbook for that matter.

If you see a man starving on the street, do you toss a fish at his feet to allow him to eat right now, and be hungry again tomorrow (sysinstall)?

Or do you teach him how to fish and catch all the fish he can eat whenever he's hungry (man pages, handbook, rc.conf, etc)?

;)

Just because sysinstall provides a simplistic method to configure some things doesn't mean you should use it. Especially since it fills up rc.conf with redundant entries that can overlap.

Do things the right way, from the beginning, and save everyone a lot of time and frustration. :D Teach people good habits ... otherwise you waste half your time untraining all their bad habits.
 
phoenix said:
If you see a man starving on the street, do you toss a fish at his feet to allow him to eat right now, and be hungry again tomorrow (sysinstall)?

Or do you teach him how to fish and catch all the fish he can eat whenever he's hungry (man pages, handbook, rc.conf, etc)?

;)

Your correct on this one.

phoenix said:
Just because sysinstall provides a simplistic method to configure some things doesn't mean you should use it. Especially since it fills up rc.conf with redundant entries that can overlap.

Good suggestions were given. Let the OP himself decide what he wants to do with those reduntant entries.
 
I had actually thought about using sysinstall to reconfigure this but was worried I might jack something else up. I appreciate all the options you guys have given and I'm sure I'll have it set the way I want it here shortly. Thanks to everyone for their suggestions.

I'm hoping not to be a 2 post wonder and maybe one day contribute something of use to someone else.
 
Ok. I've added
Code:
ifconfig_vr0="192.168.4.9 netmask 255.255.255.0
to my rc.conf file. I can now ping other machines on my network and I can ping the FreeBSD machine. If I set my browser to use our proxy server I can get on the internet with no problem but without the proxy settings it won't find it's own way to the internet. I need this to not run through our proxy so this won't work for me. Any ideas on what I've missed?
 
killasmurf86 said:
draw your lan configuration

My LAN is pretty simple.

T1----> Router----> Switch----> User Machines / Proxy Server

I have a Ubuntu box setup running Dansguardian/TinyProxy/Firehol to do my URL filtering. I've set the User Machines web browsers to use the Ubuntu machine as the proxy server. At the moment I have the FreeBSD machine running through the proxy but I've put it's IP on the exception list so it has free reign. I'm thinking I'm missing something easy. Even before the FreeBSD machine was set to proxy I could ping other machines but just couldn't see the internet with it.
 
Proxies usually don't have IP-forwarding turned on, simply because the proxy does all the work. Without IP-forwarding, no direct connection to the Internet will be possible.
 
I only set the FreeBSD machine to the proxy so I could check to see if it would get to the internet, which it did. The proxy is setup to filter URLs and such so people don't waste the bandwidth.

Ideally I would like this machine to work alone on the network. My initial problem was setting a static IP, that's been solved, now the problem is configuring this machine to get to the internet by itself without the proxy which I can't seem to figure out.

Ultimately this machine is going to run IT Ticket Request software so I'd rather it just sits on the LAN by itself.
 
hansonian said:
I'm hoping not to be a 2 post wonder and maybe one day contribute something of use to someone else.

Nothing personal. :) I just didn't want to see the thread degenerate into a flamewar among members if we were dealing with another drive-by poster.
 
hansonian said:
My LAN is pretty simple.

T1----> Router----> Switch----> User Machines / Proxy Server

I have a Ubuntu box setup running Dansguardian/TinyProxy/Firehol to do my URL filtering. I've set the User Machines web browsers to use the Ubuntu machine as the proxy server. At the moment I have the FreeBSD machine running through the proxy but I've put it's IP on the exception list so it has free reign. I'm thinking I'm missing something easy. Even before the FreeBSD machine was set to proxy I could ping other machines but just couldn't see the internet with it.

When configuring the IP manually, you also have to configure the DNS resolv.conf and set the default gateway.

You need a defaultrouter="some IP" entry in /etc/rc.conf. Set this to the IP of your router.

You will also need to edit /etc/resolv.conf to set the IP of your DNS servers. The syntax is:
Code:
nameserver 1.2.3.4
nameserver 2.3.4.5

All of the above are handled automatically by DHCP, which is why you have to set them manually if you don't use DHCP.
 
I had the nameservers set in the resolv.conf file but I didn't even think to put the defaultrouter setting in. It works perfect now. Thanks to everyone for their help. Now I can get on to other problems. :)
 
Back
Top