Subject: Re: new newbie questions
To: =?iso-8859-1?Q?Vir=E1gh_Barnab=E1s?= <bhs@ludens.elte.hu>
From: Andrew Gillham <gillham@vaultron.com>
List: netbsd-help
Date: 11/06/2002 11:55:35
On Wed, Nov 06, 2002 at 08:06:13PM +0100, Virágh Barnabás wrote:
> 1.) I have a Siemens XpressLink UTP ADSL modem, connected to my /dev/rtk0
> drive which is configured to be 192.168.1.40. I also have /dev/ne2 which is
> 192.168.0.2 (both with netmask 255.255.255.0).
> 
> - How to get the DNS server address from the ISP?

Many of your questions should be answered here:
http://www.netbsd.org/Documentation/

If you're doing PPPoE, then add 'usepeerdns' to /etc/ppp/options.

> - How to make NetBSD to use a specific DNS server (not sending packets to
> 0.0.0.0)?

echo nameserver x.y.z.1 > /etc/resolv.conf
echo search your.domain.com >> /etc/resolv.conf

With 'usepeerdns' with pppd you need to do something else:
# ln -sf /etc/ppp/resolv.conf /etc/resolv.conf

This makes the system use the DNS servers acquired via ppp.

> - How to disable IPv6 functions?

Rebuild the kernel without 'options INET6' or:
ifconfig rtk0 inet6 fe80::250:fcff:fe6a:a0eb%rtk0 delete

> - Why is it, that I can not brows the net? Only a very few sites come in...
> lynx, dillo, conqueror just get's in touch with server, and doesn't get any
> HTTP data. Also SSH, FTP, TELNET connections can be estabilished, but after
> a few kbytes, the connection breaks down. btw... I use ADSL flawlessly under
> Win2000... Ping works, DNS works, just datas can not be transfered.. :(

This sounds like you're having MTU problems with your PPPoE.  This should
not really be happening on the machine running PPPoE since it knows the
correct MTU of the pppoe0 interface.
You might look at the following sysctl changes and see if either affects the
behavior:
	sysctl -w net.inet.ip.mtudisc=1
	sysctl -w net.inet.ip.mtudisc=0

The default setting should be enabled (=1) on 1.6.

> - How to set up NetBSD to act as a gateway between my intranet (/dev/ne2)
> and internet (/dev/rtk0 -> /dev/pppoe0)?

http://www.netbsd.org/Documentation/network/#simplenat

> 2.) How to set up NetBSD to shut down realy! To turn computer off? I know,
> with the command "halt -p", or "shutdown -p now", but the /dev/apm device
> can not be used... as you can see in my rc.conf, I have enabled to load
> "apmd". But it print's out, that can not open that device... nor
> /dev/apmctl... I have Abit KX7-333 Motherboard.

Enable:
apm0   at mainbus0                     # Advanced power management

You might also want these for monitoring. (not APM related)
# VIA VT82C686A hardware monitor
viapm* at pci? dev ? function ?
viaenv* at viapm?


> 3.) Can NetBSD be suspended and/or hibernated anyway?

With APM enabled suspend normally works.  Take a look at the example
script: /usr/share/examples/apm/script

> 4.) Is there a good multi-layer-enabled + vektor enabled image editor for
> NetBSD, like Paint Shop Pro for win, or at least like Photoshop?

Dunno.  People use The GIMP for images, but I don't know whether it supports
any kind of vector stuff.

> 5.) Is there a good HTML/PHP code editor for NetBSD, like Macromedia's
> HomeSite?

Well if that is a Linux app it might run under emulation.  Otherwise just
search www.google.com or www.freshmeat.net or sourceforge.net for what
you want.

> besides these difficulties... I like this new OS! :)
> 
> --------------------
> I bring up a new /dev/pppoe0 drive with the following script:
> -- begin --
> #!/bin/sh
> ifconfig rtk0 up

This can be put in /etc/ifconfig.rtk0. (e.g. echo up > /etc/ifconfig.rtk0)

> ifconfig pppoe0 create

Might also try 'echo create > /etc/ifconfig.pppoe0'

> pppoectl -e rtk0 pppoe0
> pppoectl pppoe0 myauthproto=pap myauthname=<userid> myauthsecret=<password>
> hisauthproto=none
> ifconfig pppoe0 0.0.0.0 0.0.0.1 up
> echo Waiting to connect...
> sleep 6
> echo Connected.
> route delete default
> route add default <my ISP's gateway's IP>
> named.restart
> -- end --
> ohh yes... I had to set up named to be a cacheing name server... It has to
> be restarted, to listen on the new port as well. Especialy becouse the
> default route is redirected to <my ISP's gateway's IP>, and the aplications
> otherwised doesn't fined any kind of DNS server!

You probably want to use 'nameserver 127.0.0.1' if you're using a local
nameserver.

-Andrew