macOS 网络管理知识
基础网络管理
显示网卡列表:
~# ipconfig getiflist
ifconfig 配置 IP 地址和子网路由:
~# ifconfig eth0 inet 192.168.152.10 192.168.152.5 up
~# route -n add -interface eth0 -net 192.168.152.0/24 192.168.152.5
搜索服务器
借助 Bonjour 发现服务,可以使用 dns-sd 命令查找局域网中提供特定服务的服务器列表:
~# dns-sd -B _ssh._tcp .
~# dns-sd -B _afpovertcp._tcp .