router is into router mode.
# dhclient pcn0
# ifconfig vr0 192.168.1.10 netmask 255.255.255.0 up
# route add default 192.168.1.1
# echo 'nameserver A.B.C.D' > /etc/resolv.conf
if first only type dhclient pcn0
then netbsd accept ip and
ip renewal in xyz seconds.
after xyz seconds , i must againg typing the dhclient pcn0
I guess you are taking literaly what I wrote you in another forum.
First, you must learn the concepts of interfaces in *BSD world. I took vr0 just as an example, you must replace it with your interface listed in ifconfig -a output. I suggest you take a read on ifconfig(8) man page. Same applies for DNS settings. In the example, you replace 'nameserver A.B.C.D' with your (or your ISP's) DNS IP address.
But, when you use DHCP to obtain IP address (that is dinamic IP address, as oposed to static IP address), you also receive default gateway, DNS settings and loads of other useful stuff by DHCPD server, so there is no need to set up resolv.conf(5) and default gateway in /etc/rc.conf at all. It is being automagicaly done.
Concerning DHCP, there is a nice article at Onlamp.com named Introducing DHCP: http://www.onlamp.com/pub/a/bsd/2003...SD_Basics.html
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD
|Thread||Thread Starter||Forum||Replies||Last Post|
|Using OpenBSD as a second router||paran0iaX||OpenBSD Security||32||20th March 2009 04:51 AM|
|Good router||terryd||General software and network||10||9th February 2009 09:31 PM|
|D-link (DI-524) router||c0mrade||General software and network||3||26th January 2009 08:14 AM|
|Router shopping||Yuka||General Hardware||8||23rd July 2008 02:51 AM|
|Router for external IP's||bichumo||General software and network||11||22nd July 2008 03:07 AM|