第九章 配置网络服务
一、查看网络适配器名称
root@svros:~ # ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=81009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWFILTER>
ether 00:0c:29:33:c5:90
inet 192.168.107.128 netmask 0xffffff00 broadcast 192.168.107.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>二、配置DHCP
# sysrc ifconfig_em0="DHCP"# vi /etc/rc.conf
hostname="svros.com"
ifconfig_em0="DHCP" //设置动态获取ip
local_unbound_enable="YES"
sshd_enable="YES"
moused_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
dumpdev="AUTO"三、配置静态IP
四、配置DNS
五、重启网络
六、测试网络连通性
最后更新于