Set the IP address, gateway, and DNS in the FreeBSD command line.

Source: Internet
Author: User
Tags nameserver
Note: IP Address: 192.168.21.173 subnet mask: 255.255.255.0 Gateway: 192.168.21.2DNS: 8.8.8.88.8.4.41. set IP address, Gateway ee/etc/rc. conf # Edit Note:
IP: 192.168.21.173
Subnet Mask: 255.255.255.0
Gateway: 192.168.21.2
DNS: 8.8.8.8
8.8.4.4
1. Set IP addresses and gateways
Ee/etc/rc. conf # Edit
Ifconfig_em0 = "inet 192.168.21.173 netmask 255.255.255.0" # Set the IP address and subnet mask
Defaultrouter = "192.168.21.2" # Set the Gateway
Hostname = "FreeBSD" # Set Host Name
Press esc and press a to save.
2. Set DNS
Ee/etc/resolv. conf # Edit
Nameserver 8.8.8.8
Nameserver 8.8.4.4
Press esc and press a to save.
Sh/etc/rc # restart the network
/Etc/netstart # restart the network
FreeBSD is now available for Internet access!
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.