09.11.2012 Views

Mac OS X Server Command-Line Administration - Apple

Mac OS X Server Command-Line Administration - Apple

Mac OS X Server Command-Line Administration - Apple

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Viewing or Changing MTU Values<br />

You can use these commands to change the maximum transmission unit (MTU) size for<br />

a port.<br />

To view the MTU value for a hardware port:<br />

$ sudo networksetup -getMTU (devicename|"portname")<br />

To list valid MTU values for a hardware port:<br />

$ sudo networksetup -listvalidMTUrange (devicename|"portname")<br />

To change the MTU value for a hardware port:<br />

$ sudo networksetup -setMTU (devicename|"portname")<br />

Viewing or Changing Media Settings<br />

To view the media settings for a port:<br />

$ sudo networksetup -getMedia (devicename|"portname")<br />

To list valid media settings for a port:<br />

$ sudo networksetup -listValidMedia (devicename|"portname")<br />

To change the media settings for a port:<br />

$ sudo networksetup -setMedia (devicename|"portname") subtype [option1]<br />

[option2] [...]<br />

Network Port Configurations<br />

Network port configurations are sets of network preferences that can be assigned to a<br />

particular network interface and then enabled or disabled. The Network pane of<br />

System Preferences stores and displays network settings as port configurations.<br />

Creating or Deleting Port Configurations<br />

To list existing port configuration:<br />

$ sudo networksetup -listallnetworkservices<br />

To create a port configuration:<br />

$ sudo networksetup -createnetworkservice configuration hardwareport<br />

To duplicate a port configuration:<br />

$ sudo networksetup -duplicatenetworkservice configuration newconfig<br />

To rename a port configuration:<br />

$ sudo networksetup -renamenetworkservice configuration newname<br />

To delete a port configuration:<br />

$ sudo networksetup -removenetworkservice configuration<br />

Activating Port Configurations<br />

To see if a port configuration is on:<br />

$ sudo networksetup -getnetworkserviceenabled configuration<br />

38 Chapter 5 Network Preferences

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!