NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Possible configuration for a network switch



I am attempting a basic network switch and am curious as to whether the below configuration would be correct?



A proposed network switch using NetBSD

Five NICs are made available - re0 for management and wm0, wm1, wm2, wm3 from an Intel quad port NIC. re0 will have a static address. Anything related to dhcpd will be commented out in /etc/rc.conf.

Set up static IP for re0

# echo "defaultroute="192.168.1.1"" >> /etc/rc.conf
# echo "192.168.1.90 up media autoselect" >> /etc/ifconfig.re0

Adding the NICs to the switch

# echo "up media autoselect" > /etc/hostname.em0
# echo "up media autoselect" > /etc/hostname.em1
# echo "up media autoselect" > /etc/hostname.em2
# echo "up media autoselect" > /etc/hostname.em3

Set up the bridge

# echo 'inet 192.168.1.91 255.255.255.0 192.168.1.255' > /etc/hostname.vether0

Set up bridge interface

# echo "add vether0" >> /etc/hostname.bridge0
# echo "add em0" >> /etc/hostname.bridge0
# echo "add em1" >> /etc/hostname.bridge0
# echo "add em2" >> /etc/hostname.bridge0
# echo "add em3" >> /etc/hostname.bridge0

Enable packet forwarding

# echo "net.inet.ip.forwarding=1" >> /etc/sysctl.conf

Disable extras that are unlikely to be needed

# echo "postfix=NO" >> /etc/rc.conf
# echo "inetd=NO" >> /etc/rc.conf

Increase ipintrq. According to https://mail-index.netbsd.org/tech-net/2006/12/01/0016.html
The default value may not be appropriate for multiple GbE interfaces.

The net.inet.ip.ifq.maxlen variable may be set to 256 times the number of NICs in the switch, so 256*5=1280

# echo 'net.inet.ip.ifq.maxlen=1280' >> /etc/sysctl.conf

Plug in desired cables and reboot



Home | Main Index | Thread Index | Old Index