OSX: 尝试禁止Bonjour广播带来的问题解决(10.11.x或更新)
来源:互联网 发布:淘宝价格战 编辑:程序博客网 时间:2024/05/17 03:05
前些日子,希望尝试禁止Bonjour广播来减少其在局域网内的影响,于是找了一些方案:
1. 最老的的方案,适合于10.9的是:
launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
2. 到了10.10后,应该使用:
defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist ProgramArguements -array-add '{-NoMulticastAdvertisements;}'
或者
plistbuddy -c "add :ProgramArguments:1 -NoMulticastAdvertisements" /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist
改动了之后,正好休息两个星期,于是就没有启动,也就快忘记了。到了家之后,忘了什么时候重新启动了一次,发现最近总是觉得上网很慢,打开一个网页要等个几秒钟才能看到内容,App Store也总是不能连接服务器,最初以为是网络服务商的问题或者我的无线路由的问题,检查了一遍没有发现问题。后来发现命令行的softwareupdate也无法连接服务器,Google Chrome浏览器的更新也是出现错误,而且命令行中ping google.com也是无法解析域名了,那么应该是本机自己的问题,再看看系统日志,产生无数的dnssd_clientstub ConnectToServer的错误信息。于是回想起原来禁用Bonjour广播的尝试,那么改回去之后重启,正常多了!
$ sudo plistbuddy -c "print :ProgramArguments:1" /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist-NoMulticastAdvertisements$ sudo plistbuddy -c "delete :ProgramArguments:1" /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist
后来在jamf的论坛中找到了一条,Apple的Developer Bug Reporting团队的回复得到10.11下的一些参数,可以整理如下:
Starting in 10.11.x(El Capitan) on OSX, the options will be: DebugLogging, UnicastPacketLogging, NoMulticastAdvertisements, StrictUnicastOrdering and AlwaysAppendSearchDomainsTo turn ON the particular option, here is what the user should do (as an example of setting two options) 1] sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist AlwaysAppendSearchDomains -bool YES 2] sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -bool YES 3] sudo rebootTo turn OFF all options, here is what the user should do 1] sudo defaults delete /Library/Preferences/com.apple.mDNSResponder.plist 2] sudo rebootTo view the current options set, here is what the user should do 1] plutil -p /Library/Preferences/com.apple.mDNSResponder.plist OR 1] sudo defaults read /Library/Preferences/com.apple.mDNSResponder.plist
0 0
- OSX: 尝试禁止Bonjour广播带来的问题解决(10.11.x或更新)
- OSX:一个有关AirPrint,DNS,Bonjour的文章连接
- OSX: bash的更新
- 关于禁止QQ登陆的禁止尝试
- arch升级带来的问题解决
- eclise svn更新或还原时锁定的问题解决方法
- x=x++带来的困惑。。。
- OSX: 那些Apple悄悄更新的文件
- Mac OS X 10.11升级带来的 cocoapods问题
- 解决OS X 10.11 升级 cocoapods带来的问题
- OSX 10.5: 禁止Leopard内置的HTTP Proxy
- bonjour
- Bonjour
- bonjour
- Bonjour
- bonjour
- Bonjour
- 您尝试安装的产品已随操作系统一起安装到计算机上了,请用WINDOWS UPDATE安装更新 -- 问题解决
- UIScrollView控件实现图片轮播
- Leetcode 94. Binary Tree Inorder Traversal (Medium) (cpp)
- MVC模式理解+小Demo
- [Spring MVC] - Annotation验证
- Xcode运行报错 cannot synthesize weak property in file using manual reference counting
- OSX: 尝试禁止Bonjour广播带来的问题解决(10.11.x或更新)
- Unity开发基础——类型转换学习笔记
- 嵌入式学习-驱动开发-lesson7.1-网卡驱动架构分析驱动及CS8900流程分析
- Python读写csv文件
- Spring MVC 教程,快速入门,深入分析
- Strust2
- MHA (一)
- hdu5115 Dire Wolf--区间DP
- 在eclipse里点击help下的install new software无反应,解决办法