Hitchhiker's Guide to Openbsd
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
6.4.2 - DHCP Server
If you want to use OpenBSD as a DHCP server dhcpd(8) , edit /etc/rc.conf.local so that it contains the line dhcpd_flags="interface" , replacing interface with the list of interfaces that dhcpd(8) should listen on, for example: # echo 'dhcpd_flags="xl1 xl2 xl3"' >>/etc/rc.conf.local Then, edit /etc/dhcpd.conf . The options are pretty self-explanatory. option domain-name "example.com"; option domain-name-servers 192.168.1.3, 192.168.1.5; subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; range 192.168.1.32 192.168.1.127; } This will tell your DHCP clients that the domain to append to DNS requests is example.com (so, if the user types in 'telnet joe' then it will send them to joe.example.com). It will point them to DNS servers 192.168.1.3 and 192.168.1.5. For hosts that are on the same network as an Ethernet interface on the OpenBSD machine, which is in the 192.168.1.0/24 range, it will assign them an IP address between 192.168.1.32 and 192.168.1.127. It will set their default gateway as 192.168.1.1. If you want to start dhcpd(8) from the command line, after editing /etc/dhcpd.conf , try: # touch /var/db/dhcpd.leases # dhcpd fxp0 The touch line is needed to create an empty dhcpd.leases file before dhcpd(8) can start. The OpenBSD startup scripts will create this file if needed on boot, but if you are starting dhcpd(8) manually, you must create it first. fxp0 is an interface that you want to start serving DHCP on. http://www.openbsd.org/faq/faq6.html (11 of 33)9/4/2011 10:02:06 AM 6 - Networking If you are serving DHCP to a Windows box, you may want dhcpd(8) to give the client a 'WINS' server address. To make this happen, just add the following line to your /etc/dhcpd.conf : option netbios-name-servers 192.168.92.55; (where 192.168.92.55 is the IP of your Windows or Samba server.) See dhcp-options(5) for more options that your DHCP clients may want. 6.5 - PPP The Point to Point Protocol (PPP) is generally what is used to create a connection to your ISP via a dial- up modem. OpenBSD has 2 ways of doing this: ● pppd(8) - the kernel PPP daemon ● ppp(8) - the userland PPP daemon Both ppp and pppd perform similar functions, in different ways. pppd works with the kernel ppp(4) driver, whereas ppp works in userland with tun(4) . This document will cover only the userland PPP daemon, since it is easier to debug and to interact with. To start off you will need some simple information about your ISP. Here is a list of helpful information that you will need. ● Your ISP's dial-up number ● Your nameserver ● Your username and password ● Your gateway Some of these you can do without, but would be helpful in setting up ppp. The userland PPP daemon uses the file /etc/ppp/ppp.conf as its configuration file. There are many helpful files in /etc/ppp that can have different setups for many different situations. You should take a browse through that directory. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling