38

Viewing or Changing MTU Values

You can use these commands to change the maximum transmission unit (MTU) size for a port.

To view the MTU value for a hardware port:

$ sudo networksetup -getMTU (devicename"portname")

To list valid MTU values for a hardware port:

$ sudo networksetup -listvalidMTUrange (devicename"portname")

To change the MTU value for a hardware port:

$ sudo networksetup -setMTU (devicename"portname")

Viewing or Changing Media Settings

To view the media settings for a port:

$ sudo networksetup -getMedia (devicename"portname")

To list valid media settings for a port:

$ sudo networksetup -listValidMedia (devicename"portname")

To change the media settings for a port:

$ sudo networksetup -setMedia (devicename"portname") subtype [option1]

[option2] [...]

Network Port Configurations

Network port configurations are sets of network preferences that can be assigned to a particular network interface and then enabled or disabled. The Network pane of System Preferences stores and displays network settings as port configurations.

Creating or Deleting Port Configurations

To list existing port configuration:

$ sudo networksetup -listallnetworkservices

To create a port configuration:

$ sudo networksetup -createnetworkservice configuration hardwareport

To duplicate a port configuration:

$ sudo networksetup -duplicatenetworkservice configuration newconfig

To rename a port configuration:

$ sudo networksetup -renamenetworkservice configuration newname

To delete a port configuration:

$ sudo networksetup -removenetworkservice configuration

Activating Port Configurations

To see if a port configuration is on:

$ sudo networksetup -getnetworkserviceenabled configuration

Chapter 5 Network Preferences

Page 38
Image 38
Apple oxs manual Network Port Configurations, Viewing or Changing MTU Values, Viewing or Changing Media Settings