Network Fault diagnosis on MacOS

Source: Internet
Author: User

Bought a new Huawei Glory router, very simple to use up. It's really great. The appearance is also good.

But I opened the Mac Pro notebook in the morning and found no access to another server at home. The solution is not to be baffled. Suspicion is caused by the connection of this new WiFi.

So looking at the routing table is not quite normal.

The primary router gateway is 192.168.1.1, and the new router gateway is 192.168.3.1. The WiFi settings are qiucool,qiucool2 respectively. Each wifi has its own MAC address.


Then began to toss:

Route-n delete-net 192.168.1

Route-n add-net 192.168.1-link b0:48:7a:5d:e9:6e//MAC address where MAC address is Qiucool

Again NETSTAT-NR view.

Still not, once suspected is enabled IPV6 's sake, therefore banned: Networksetup-setv6off Wi-Fi, in the network preferences can verify IPV6 is closed. But it doesn't work.


Finally restarted the router just fine.

The last normal routing table is:

[Email protected]:~$ NETSTAT-NR

Routing tables


Internet:

Destination Gateway flags Refs use Netif Expire

Default 192.168.1.1 UGSC 0 en1

127 127.0.0.1 UCS 0 0 Lo0

127.0.0.1 127.0.0.1 UH 1 407 lo0

169.254 link#5 UCS 0 0 en1

192.168.1 link#5 UCS 7 0 en1

192.168.1.1 b0:48:7a:5d:e9:6e Uhlwiir en1 1179

192.168.1.5 60:67:20:3f:0:68 UHLWI 0 497 en1 1140

192.168.1.103 60:67:20:3f:0:68 UHLWI 0 3 en1 1170

192.168.1.104 127.0.0.1 UHS 0 lo0

192.168.1.110 94:77:2b:34:66:33 UHLWI 0 0 en1 1182

192.168.1.255 ff:ff:ff:ff:ff:ff UHLWBI 0 en1


INTERNET6:

Destination Gateway Flags netif Expire

:: 1:: 1 UHL lo0

FD68:FCD6:C5F7:A1A1::/64 fe80::30d8:c757:28e5:1e%utun0 Uc Utun0

fd68:fcd6:c5f7:a1a1:30d8:c757:28e5:1e link#10 UHL Lo0

FE80::%LO0/64 Fe80::1%lo0 UcI Lo0

Fe80::1%lo0 link#1 Uhli Lo0

FE80::%UTUN0/64 fe80::30d8:c757:28e5:1e%utun0 UcI Utun0

Fe80::30d8:c757:28e5:1e%utun0 link#10 Uhli Lo0

FF01::%LO0/32:: 1 UmCI lo0

FF01::%UTUN0/32 fe80::30d8:c757:28e5:1e%utun0 UmCI Utun0

FF02::%LO0/32:: 1 UmCI lo0

FF02::%UTUN0/32 fe80::30d8:c757:28e5:1e%utun0 UmCI Utun0


Internet6 don't know why it still exists. Where b0:48:7a:5d:e9:6e is the MAC address of WiFi Qiucool, can be seen through the management console of the router.


Some other ifconfig and route commands:

route -n add defalut  10.13.31.1route -n add   -net  10.0.0.0/8  10.13.31.1route -n add -net 210.32.0.0/20    10.13.31.1route -n add -net 222.205.0.0/17 10.13.31.1 
Route-n Delete Defalut 10.13.31.1

MAC Terminal command:

1. View routes:

Netstat-r

2. Add routes (you can add routes to both wired and wireless networks for simultaneous access to different network segments):

sudo route-nv add-net 192.168.10.1-netmask 255.255.255.0-interface en0

Note: en0-Wired, en1-Wireless

3. Modify the MAC address:

You can use the Terminal command (en1=wifi,en0=ethernet):

sudo ifconfig en1 down--off Wireless

sudo ifconfig en1 lladdr 00:11:22:33:44:55--Modify Wireless Address

sudo ifconfig en1 up--turn on wireless


 ifconfig en1 ether A1:b2:c3:d4:e5:f6  


So, to learn more about the usage of Networksetup, Ifconfig, and route.


Network Fault diagnosis on MacOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.