Hitchhiker's Guide to Openbsd


Download 1.27 Mb.
Pdf ko'rish
bet87/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   83   84   85   86   87   88   89   90   ...   258
Bog'liq
obsd-faq49

6.2.2 - Default gateway
Put the IP of your gateway in the file 
/etc/mygate
. This will allow for your gateway to be set upon boot. 
This file consists of one line, with just the address of this machine's gateway address: 
10.0.0.1
It is possible to use a symbolic name there, but be careful: you can't assume things like the resolver are 
fully configured or even reachable until AFTER the default gateway is configured. In other words, it had 
better be an IP address or something that is defined in the /etc/hosts file. 
6.2.3 - DNS Resolution
DNS resolution is controlled by the file 
/etc/resolv.conf
. Here is an example of a /etc/resolv.conf file: 
search example.com
nameserver 125.2.3.4
nameserver 125.2.3.5
lookup file bind
In this case, the default domain name will be 
example.com
, there are two DNS resolvers, 
125.2.3.4
and 
125.2.3.5
specified, and the /etc/hosts file will be consulted before the DNS 
resolvers are. 
As with virtually all Unix (and many non-Unix) systems, there is an 
/etc/hosts
file which can be used to 
specify systems that are not in (or if used with the above "lookup" priority, not as desired in) the formal 
DNS system. 
If you are using DHCP, you'll want to read 
6.4 - DHCP
 taking note of 
resolv.conf.tail(5)

6.2.4 - Host name
http://www.openbsd.org/faq/faq6.html (5 of 33)9/4/2011 10:02:06 AM


6 - Networking
Every Unix machine has a name. In OpenBSD, the name is specified as a "Fully Qualified Domain 
Name" (FQDN) in one line in the file 
/etc/myname
. If this machine is named "puffy" and in the domain 
"example.com", the file would contain the one line: 
puffy.example.com

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   83   84   85   86   87   88   89   90   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling