Mac OS 之安装ip命令和关闭ipv6的方法

安装ip命令,如果之前没有安装brew,请先安装brew命令

lookbackdeMacBook-Pro:~ lookback$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
lookbackdeMacBook-Pro:~ lookback$ brew install iproute2mac
lookbackdeMacBook-Pro:~ lookback$ brew install iproute2mac
==> Using the sandbox
==> Downloading https://github.com/brona/iproute2mac/archive/v1.1.1.tar.gz
==> Downloading from https://codeload.github.com/brona/iproute2mac/tar.gz/v1.1.1
######################################################################## 100.0%
/usr/local/Cellar/iproute2mac/1.1.1: 6 files, 19.6K, built in 11 seconds
lookbackdeMacBook-Pro:~ lookback$ ip a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1/8 lo0
        inet6 ::1/128
        inet6 fe80::1/64 scopeid 0x1
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ether f4:5c:89:be:6e:9d
        inet6 fe80::4f1:455d:8188:6b99/64 secured scopeid 0x4
        inet6 fddd:cbca:b5c8::49a:2e5f:12f5:4dc8/64 autoconf secured
        inet6 fddd:cbca:b5c8::d43:fc85:e171:233b/64 autoconf temporary
        inet 172.16.0.137/16 brd 172.16.255.255 en0
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
        ether 36:03:47:ac:5e:ff
        inet6 fe80::3403:47ff:feac:5eff/64 scopeid 0x8
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
        inet6 fe80::8ac7:12af:18ae:3d92/64 scopeid 0xa

关闭ipv6

lookbackdeMacBook-Pro:~ lookback$ networksetup -setv6off Ethernet && networksetup -setv6off Wi-Fi
lookbackdeMacBook-Pro:~ lookback$ ip a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1/8 lo0
        inet6 ::1/128
        inet6 fe80::1/64 scopeid 0x1
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ether f4:5c:89:be:6e:9d
        inet 172.16.0.137/16 brd 172.16.255.255 en0
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
        ether 36:03:47:ac:5e:ff
        inet6 fe80::3403:47ff:feac:5eff/64 scopeid 0x8
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
        inet6 fe80::8ac7:12af:18ae:3d92/64 scopeid 0xa
lookbackdeMacBook-Pro:~ lookback$

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

    A+
发布日期:2016年12月15日  所属分类:MAC
标签:
lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: