Wednesday, December 19, 2012

Network interfaces (cont.)

This is the final configuration of the /etc/network/interfaces file. There is one WAN interface on eth0 (connected to a DSL modem) and 2 LAN interfaces on eth1 and eth2. eth1, eth2 and wlan0 are bridged i.e. they are on the same LAN.

root@voyage:~# cat /etc/network/interfaces  

auto lo 
iface lo inet loopback

auto eth0 
iface eth0 inet dhcp
post-up pon eircom  

auto eth1 
iface eth1 inet manual  

auto eth2 
iface eth2 inet manual  

auto wlan0 
iface wlan0 inet manual
#hostapd /etc/hostapd/hostapd.wlan0.conf

auto br0 # Bridge interface
iface br0 inet static         
    address 192.168.11.254
    netmask 255.255.255.0
    network 192.168.11.0
    broadcast 192.168.11.255
    bridge_ports eth1 eth2 wlan0 # add ports to bridge
    bridge_stp off
    up nat.sh br0 eth0 “192.168.11.0/24” # NAT between bridge and WAN
 

No comments:

Post a Comment