Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Setting up ethernet switch #50303
    Robb_Fr
    Participant

    Hello,
    Bascially, the /etc/network/interfaces file you have on default boot correctly implements this.
    Here’s the correct bridge br0 configuration:

    auto br0
    iface br0 inet static
    address 192.168.84.1 #static address and netmask assignment
    netmask 255.255.255.0
    bridge_stp off #disables spanning-tree protocol features
    bridge_fd 0 #forwarding begins as soon as interface is up
    bridge_ports lan0 lan1 lan2 lan3 #lan ports are bridged together
    #dnsmasq is a dns and dhcp server that listens on br0 interface and will give IP addresses from specified range to the systems in LAN
    post-up dnsmasq –interface=br0 –except-interface=lo –bind-interfaces — dhcp-range=192.168.84.100,192.168.84.200,12h
    #enables routing (communication between lan interfaces and wan through br0)
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    #performs Network Address Translation (NAT) between WAN and LAN
    post-up iptables -t nat -A POSTROUTING -s ’192.168.84.0/24’ -o wan -j MASQUERADE
    #disables routing, NAT and dhcp server if bridge is set down
    post-down iptables -t nat -D POSTROUTING -s ’192.168.84.0/24’ -o wan -j MASQUERADE
    post-down echo 0 > /proc/sys/net/ipv4/ip_forward post-down pkill dnsmasq

    With this, the Topaz switch is used for forwarding (can be verified by listening to the eth0 interface with tcpdump for example. No packet should be visible as not treated by the OS). Other interfaces can be auto configured:

    auto eth0
    iface eth0 inet manual
    up /sbin/ifconfig $IFACE 0.0.0.0 promisc up
    down /sbin/ifconfig $IFACE down

    auto lan0
    iface lan0 inet manual

    auto lan1
    iface lan1 inet manual

    auto lan2
    iface lan2 inet manual

    auto lan3
    iface lan3 inet manual

    Hope this helps.

Viewing 1 post (of 1 total)
Signup to our newsletter

Technical specification tables can not be displayed on mobile. Please view on desktop