Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

internetsharing(8) [osx man page]

InternetSharing(8)					    BSD System Manager's Manual 					InternetSharing(8)

NAME
InternetSharing -- simple NAT/router configuration daemon SYNOPSIS
InternetSharing -d DESCRIPTION
InternetSharing is the back-end for the Internet Sharing feature. It is responsible for configuring the network interfaces, the DHCP server bootpd(8), the network address translation daemon natd(8), and the Internet domain name server named(8). named(8) is run in caching-only mode and allows the DHCP server to always offer the same DNS server address to the DHCP clients, regardless of the value of the actual DNS server addresses. The single command line option -d places additional debugging information to stdout/stderr. InternetSharing is launched by launchd(8) both at start-up and when the user turns Internet Sharing on in the Sharing preferences pane. By default, InternetSharing configures the IP addresses for non-AirPort interfaces starting at 192.168.2.1, walking up by one class C network (subnet mask 255.255.255.0) for each subsequent interface i.e. 192.168.3.1, 192.168.4.1, 192.168.5.1, and so on. The AirPort interface by default is assigned 10.0.2.1. CONFIGURATION
InternetSharing reads the property list com.apple.nat.plist stored in the /Library/Preferences/SystemConfiguration. Details of the com.apple.nat.plist are subject to change and are not completely documented here. The plist is a contract between the Sharing preferences pane and InternetSharing. Any details provided here are for informational purposes only. The plist is a dictionary with a single sub-dictionary called NAT containing properties to control which interfaces to use and other set- tings. It may also have a sub-dictionary called AirPort that is used to configure the AirPort interface when it is put into access point mode. One property worth mentioning is SharingNetworkNumberStart. This property controls the behavior of InternetSharing when it configures IP addresses for the local interfaces. The property is encoded as a string containing the dotted decimal network IP address, assumed to be a class C network. For example: <key>SharingNetworkNumberStart</key> <string>192.168.100.0</string> If the SharingNetworkNumberStart appears directly in the NAT dictionary, it controls the starting IP address chosen for the non-AirPort interfaces. If the property appears within the AirPort sub-dictionary, it controls the IP address assigned to the AirPort interface. The purpose of the property is to allow the user to avoid address collisions with existing NAT'd networks. SEE ALSO
bootpd(8), launchd(8), natd(8), named(8) Mac OS X Feburary 26, 2007 Mac OS X

Check Out this Related Man Page

IFSCHEME(8)							     Commands							       IFSCHEME(8)

NAME
ifscheme - scheme control for network interfaces SYNOPSIS
ifscheme [-v] [[-s] newscheme] mapping <interface> script ifscheme-mapping DESCRIPTION
ifscheme allows you to change network configuraton schemes or query the current scheme. It integrates with the ifup(8) command and inter- faces(5). For example, you might use this program to configure a "home" scheme and a "work" scheme for a network device on a laptop. When you move between home and work, a simple command can reconfigure your networking. If you run the program with no parameters, it will tell what the current network scheme is. The ifscheme-mapping utility is used to tell the ifup and ifdown utilities about the current scheme. OPTIONS
-v --verbose Run in verbose mode. This is passed in to the ifup and ifdown programs as well. -l --list list all schemes available/defined in /etc/network/interfaces. newscheme -s newscheme --scheme newscheme Change to a new network configuration scheme. When the scheme is changed, network interfaces that were using the old scheme will be taken down and brought back up to use the new configuration scheme. -s or --scheme are mandatory if newscheme begins with a -. CONFIGURATION
To make the program do anything useful when a scheme is selected, you must edit /etc/network/interfaces to add a mapping for the interface (or interfaces) that can be controlled on a per-scheme basis. Suppose you want to control eth0 in this way. You might have an existing eth0 configuraton in there, such as: auto eth0 iface eth0 inet static address 192.168.1.5 netmask 255.255.255.0 gateway 192.168.1.1 To change this so you can chose between static routing and dhcp, replace it with the following (it helps to ifdown the interface first). auto eth0 mapping eth0 script ifscheme-mapping iface eth0-home inet static address 192.168.1.5 netmask 255.255.255.0 gateway 192.168.1.1 iface eth0-work inet dhcp Now if you run "ifscheme home" and ifup the interface, you'll get the eth0-home configuration stanza. If you run "ifscheme work", it will be changed to the eth0-work stanza. You can add additional stanzas as desired, but the label must always be of the form <hardware inter- face>-<scheme name>. If you have a second interface (perhaps a wireless network card on eth1), you can duplicate the above for that interface, changing the eth0 and the configuration details as appropriate, but remember to add an iface stanza for every scheme name for the second interface. FILES
/etc/network/interfaces the interfaces definition file /etc/network/run/scheme the current scheme /etc/network/run/ifstate a record of the current state of the interfaces, managed by ifup and ifdown BUGS
All schemed interfaces will have the same scheme. Any schemed interface which does not have an entry for the current scheme and is not configured when the scheme is changed will not be suc- cessfully configured when it is brought up. SEE ALSO
interfaces(5) ifup(8) ifdown(8) DISTRIBUTION
Redistribution is subject to the GNU public license. AUTHORS
Joey Hess <joey@kitenet.net>, Peter Wilson <pwilson@cs.hmc.edu> IFSCHEME(8)
Man Page