Solution to the problem of machine name becomes "bogon" in Mac
2015-07-01 11:31
405 查看
Virtual DNS is the reason caused this problem.
What is the meaning of "bogon"? "bogon" means the type of IP addresses that should not appear in a traceroute, like a reserved IP address. The DNS server can give your machine a host
name, this function should be turned off for public DNS servers. Since the machine uses a router, so it has a IP like 192.168.0.x in LAN, this IP will be sent to the DNS server for a reverse lookup, and since it is a reserved IP address, the DNS server returns
a hostname as, thus, changes the machine's hostname.
Solution:
1 sudo hostname your-desired-host-name
2 sudo scutil --set LocalHostName $(hostname)
3 sudo scutil --set HostName $(hostname)
What is the meaning of "bogon"? "bogon" means the type of IP addresses that should not appear in a traceroute, like a reserved IP address. The DNS server can give your machine a host
name, this function should be turned off for public DNS servers. Since the machine uses a router, so it has a IP like 192.168.0.x in LAN, this IP will be sent to the DNS server for a reverse lookup, and since it is a reserved IP address, the DNS server returns
a hostname as, thus, changes the machine's hostname.
Solution:
1 sudo hostname your-desired-host-name
2 sudo scutil --set LocalHostName $(hostname)
3 sudo scutil --set HostName $(hostname)
相关文章推荐
- 什么是Mac OS X?跟Linux有什么区别
- mac下安装mysql(转载)
- mysql 修改编码 Linux/Mac/Unix/通用(杜绝修改后无法启动的情况!)
- Linux vs Mac:Linux 比 Mac 好的 7 个原因
- 苹果mac OS X上安装metasploit
- Validation of viewstate MAC failed.的解决方法
- Mac平台中编译安装Lua运行环境及Hello Lua实例
- vbs Windows系统改变或修改网卡的MAC地址的脚本与软件第1/2页
- MAC官方菜单纯CSS实现灰色会换色
- 在Mac OS下使用Node.js的简单教程
- Mac环境下php操作mysql数据库的方法分享
- PHP中获取内网用户MAC地址(WINDOWS/linux)的实现代码
- jQuery根据用户电脑是mac还是pc加载对应样式的方法
- 在MAC OS X上安装MYSQL
- Shell脚本获取本地网卡IP、mac地址、子网掩码、dns IP、外网IP
- MAC系统中添加MYSQL开机启动的方法
- MAC 系统如何使用 Sublime Text 2 直接编译运行 java 代码
- mac下安装nginx和php
- linux中mac地址绑定方法
- Mac中Eclipse连不上Android手机的解决方法