Brutal Slackware Network Setup

short hostname is fine, although the installer did not let you

grep HOSTNAME /etc/rc.d/rc.M
vi /etc/HOSTNAME

static name resolution

cp -pi /etc/hosts hosts.dist
vi /etc/hosts localhost
x.x.x.x slack.localdomain slack
x.x.x.x gw

identify your network interfaces as usual with either mii-tool or ethtool, then

mv -i /etc/rc.d/rc.inet1 /etc/rc.d/rc.inet1.dist
chmod -x /etc/rc.d/rc.inet1.dist
vi /etc/rc.d/rc.inet1


echo rc.inet1 PATH is $PATH

if [[ $1 = stop || $1 = down ]]; then
    #dhclient -r
    route delete default
    ifconfig eth0 down
    ifconfig lo down
    echo -n lo...
    ifconfig lo up && echo done || echo FAIL

    #self verbose
    modprobe 8021q
    vconfig add eth1 XXXX

    echo -n eth1.XXXX...
    ifconfig eth1 mtu 9000 txqueuelen 10000 up
    ifconfig eth1.XXXX mtu 9000 x.x.x.x/xx up && echo done || echo FAIL
    #txqueuelen 10000

    #dhclient -v eth0
    echo -n eth0...
    ifconfig eth0 x.x.x.x/xx up && echo done || echo FAIL

    echo -n default route...
    route add default gw x.x.x.x && echo done || echo FAIL

chmod +x /etc/rc.d/rc.inet1

now if you want XEN and/or links aggregation - you can mix this with bridges and bonding

apply and check

ping -W1 -c1


cat > /etc/resolv.conf <<-EOF
ping -W1 -c1


for eth in eth0 eth1 eth2 eth3; do mii-tool $eth; done; unset eth


a better way to shut the NICs down would be

downall() {
        for netif in `ifconfig | grep -e '^[[:alpha:]]+: ' | cut -f1 -d:`; do
                [[ $netif = lo ]] && continue
                ifconfig $netif down
        done; unset netif
        exit 0

[[ $1 = stop ]] && downall


Why and How to Increase and decrease txqueuelen (Transmit Queue Lenght) in GNU / Linux

Linux Increasing The Transmit Queue Length (txqueuelen)