First open Network Preferences which could be found under your internet connections.
Disabling IPv6 on macOS
To disable IPv6 on your machine with the following commands in Terminal (Accessible through /Applications/Terminal.app)
To Get List of Hardware
networksetup -listallnetworkservices
This is to double check the interface names recognized by the operating system matches those in Network Preferences.
To Disable IPv6 on Desired Interface
sudo networksetup -setv6off "Interface_Name"
Note: Change "Interface_Name" to the name of the desired interface you wish to disable. (NOT case sensitive)
Enabling IPv6 on macOS
Enable IPv6 on your machine with the following commands in Terminal (Accessible through /Applications/Terminal.app)
To Enable IPv6 on Desired Interface
sudo networksetup -setv6automatic "Interface_Name"
Note: Change "Interface_Name" to the name of the desired interface you wish to enable. (NOT case sensitive)