\chapter{Fichiers de configuration OpenWRT}
\label{chap:openwrt}
\begin{lstlisting}[caption={/etc/config/network}]
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1' 
config switch_vlan
        option device 'switch0'
        option vlan '100'
        option ports '0t 5t' 
config switch_vlan
        option device   'switch0'
        option vlan     '101'
        option ports    '0t 5t' 
config interface 'cab_adm'
        option ifname   'eth0'
        option proto    'static'
        option ipaddr   '10.1.5.212'
        option netmask  '255.255.255.0' 
config interface 'cab_priv'
        option type     'bridge'
        option ifname   'eth0.100'
        option proto    'static'
        option ipaddr   '192.168.5.212'
        option netmask  '255.255.255.0'
        option gateway  '192.168.5.254'
        option stp '1' 
config interface 'cab_pub'
        option type     'bridge'
        option ifname   'eth0.101'
        option proto    'static'
        option ipaddr   '10.0.5.212'
        option netmask  '255.255.255.0'
        option stp '1'
\end{lstlisting}

\newpage

\begin{lstlisting}[caption={/etc/config/wireless}]
# Radio0 correspond au réseaux 2.4ghz
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/soc/a000000.wifi'
        option htmode 'HT20'
        option disabled '0' 
config wifi-iface 'priv_radio0'
        option device 'radio0'
        option network 'cab_priv'
        option mode 'ap'
        option ssid '<ssid_prive>'
        option encryption 'psk2'
        option key '<cle_privee>' 
config wifi-iface 'pub_radio0'
        option device 'radio0'
        option network 'cab_pub'
        option mode 'ap'
        option ssid '<ssid_public>'
        option encryption 'psk2'
        option key '<cle_publique>' 
# Radio1 au réseau 5ghz (privé seulement)
config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/a800000.wifi'
        option htmode 'VHT80'
        option disabled '0' 
config wifi-iface 'priv_radio1'
        option device 'radio1'
        option network 'cab_priv'
        option mode 'ap'
        option ssid '<ssid_prive>'
        option encryption 'psk2'
        option key '<cle_prive>'
\end{lstlisting}
