FreeBSD sets the nic ip address, Gateway, and DNS

Source: Internet
Author: User
Tags nameserver
FreeBSD version is 5.3. the configuration file of the basic nic ip address and Gateway is rc under the/etc directory. conf file. before configuration, use ifconfig-a to view the correct network card name. I use lnc0, the network address is 192.168.1.0/24, and the IP address is 192.168.1.5. Therefore, in the r...

 

FreeBSD version is 5.3. the configuration file of the basic nic ip address and Gateway is rc under the/etc directory. conf file. before configuration, use ifconfig-a to view the correct Nic name. The name is lnc0,

 

The network address is 192.168.1.0/24, and the IP address is 192.168.1.5. add ifconfig_lnc0 = "inet 192.168.1.5 netmask 255.255.255.0" to the conf file, and then configure the gateway. in BSD, the gateway is called the default route. add a sentence in conf:

 

Defaultrouter = "192.168.1.1". This is my gateway.

 

 

 

Finally, add NDS. the NDS Configuration is also a configuration file named "resolv. conf" under the/etc directory,

 

If this file does not exist in this directory, you can use touch resolv. conf to create a new one, and then enter the record for configuring this file. resolv. conf:

The IP address of the domain name server that the nameserver wants to query. The server queries in sequence. Search for a list of domain names. This is usually determined by the local domain name. Search

Local domain name. Domain, my resolv. conf configuration is:

 

Nameserver 202.96.128.86

 

Nameserver 61.144.56.188

 

From whxhz

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.