cat /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
# mac80211-based drivers, as access point
#auto wlan0
#iface wlan0 inet static
# address 10.1.10.1
# netmask 255.255.255.0
# broadcast 10.1.10.255
# hostapd /etc/hostapd/hostapd.wlan0.conf
# up nat.sh wlan0 eth0 "10.1.10.0/24"
# as wireless client (supplicant)
#auto wlan0
#iface wlan0 inet dhcp
# wpa-driver wext
# wpa-ssid <your ssid>
# wpa-psk <your WPA shared key>
# wpa-key-mgmt WPA-PSK
# ## for WPA
# wpa-pairwise TKIP
# wpa-group TKIP
# wpa-proto WPA
# ## for WPA2
# #wpa-pairwise CCMP TKIP
# #wpa-group CCMP TKIP
# #wpa-proto RSN
# wireless-mode Managed
#auto wlan1
#iface wlan1 inet static
# address 10.1.20.1
# netmask 255.255.255.0
# broadcast 10.1.20.255
# hostapd /etc/hostapd/hostapd.wlan1.conf
# up nat.sh wlan1 eth0 "10.1.20.0/24"
#auto wlan0
#iface wlan0 inet static
# address 10.1.10.1
# netmask 255.255.255.0
# broadcast 10.1.10.255
# up iwconfig wlan0 essid voyage mode Master
# up nat.sh wlan0 eth0 "10.1.10.0/24"
#auto ath0
#iface ath0 inet static
# address 10.1.20.1
# netmask 255.255.255.0
# broadcast 10.1.20.255
# #pre-up wlanconfig ath create wlandev wifi1 wlanmode ap
# madwifi-base wifi1
# wireless-mode Master
# wireless-mode Adhoc
# wireless-mode Managed
# #up iwpriv ath0 mode 3
# up iwpriv ath0 bintval 1000
# up iwconfig ath0 mode master
# up iwconfig ath0 essid voyage
# up iwconfig ath0 txpower auto
# up iwconfig ath0 enc off
# up iwconfig ath0 rate auto
# up nat.sh ath0 eth0 "10.1.20.0/24"
#auto eth1
#iface eth1 inet static
# address 10.1.20.1
# netmask 255.255.255.0
# broadcast 10.1.20.255
#auto eth2
#iface eth2 inet static
# address 10.1.30.1
# netmask 255.255.255.0
# broadcast 10.1.30.255
#auto eth3
#iface eth3 inet static
# address 10.1.40.1
# netmask 255.255.255.0
# broadcast 10.1.40.255
##########################################################
# Sample ath0 with wpa_supplicant settings
#auto ath0
#iface ath0 inet dhcp
# madwifi-base wifi0
# wireless-mode Managed
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
##########################################################
# Sample WDS Bridge Settings
# madwifi-ng WDS Bridge
#auto br0
#iface br0 inet static
# address 192.168.1.2
# netmask 255.255.255.0
# network 192.168.1.0
# broadcast 192.168.1.255
# gateway 192.168.1.1
# bridge_ports eth0 ath0 ath1
# pre-up wlanconfig ath0 create wlandev wifi0 wlanmode ap
# pre-up wlanconfig ath1 create wlandev wifi0 wlanmode wds
# pre-up iwpriv ath0 mode 11g
# pre-up iwpriv ath0 bintval 1000
# pre-up iwconfig ath0 essid "voyage-wds" channel 1
# up ifconfig ath0 down ; ifconfig ath0 up # this is a workaround
# up iwpriv ath1 wds 1
# up iwpriv ath1 wds_add AA:BB:CC:DD:EE:FF
# up ifconfig ath1 down ; ifconfig ath1 up # this is a workaround
# post-down wlanconfig ath0 destroy
# post-down wlanconfig ath1 destroy
# hostap WDS Bridge
#auto br0
#iface br0 inet static
# address 192.168.1.2
# netmask 255.255.255.0
# network 192.168.1.0
# broadcast 192.168.1.255
# gateway 192.168.1.1
# bridge_ports eth0 wlan0 wlan0wds0
# pre-up iwconfig wlan0 mode Master essid voyage-wds channel 1
# pre-up iwpriv wlan0 wds_add AA:BB:CC:DD:EE:FF
# #prism2_param wlan0 autom_ap_wds 1
# #prism2_param wlan0 other_ap_policy 1
##########################################################
# Sample Ad-hoc Settings
# madwifi-ng Ad-hoc
#auto ath0
#iface ath0 inet static
# address 10.1.10.1
# netmask 255.255.255.0
# broadcast 10.1.10.255
# #gateway 10.1.10.1
# #pre-up wlanconfig ath create wlandev wifi0 wlanmode adhoc
# madwifi-base wifi0
# wireless-channel 1
# wireless-essid voyage-adhoc
# wireless-mode Ad-hoc
# # NAT not needed for node
# up nat.sh ath0 eth0 "10.1.10.0/24"
# hostap Ad-hoc
#auto wlan0
#iface wlan0 inet static
# address 10.1.10.1
# netmask 255.255.255.0
# broadcast 10.1.10.255
# #gateway 10.1.10.1
# up iwconfig wlan0 essid voyage-adhoc mode Ad-hoc
# # NAT not needed for node
# up nat.sh wlan0 eth0 "10.1.30.0/24"
# Prism 54 Ad-hoc
#auto eth2
#iface eth2 inet static
# address 10.1.30.1
# netmask 255.255.255.0
# broadcast 10.1.30.255
# #gateway 10.1.30.1
# up iwconfig eth2 essid voyage-adhoc mode Ad-hoc
# # NAT not needed for node
# up nat.sh eth2 eth0 "10.1.30.0/24"