theoretically it should be possible to set a default gateway with ifconfig

ifconfig [-a] [-s] [--help] [--version] {interface} [address] [netmask{address}] [gateway{address}] [tftpserver{address} ] [[up] | [down]]

Set a fixed ip, activate network card and add default gateway

this will:

1. set a fixed ip

2. define a default gateway

3. define the default gateway as dns

ifconfig eth0 netmask up; # set fixed ip for eth0 and activate the device
route add default gw; # set default gateway
cat "nameserver" >> /etc/resolv.conf; # default gateway is usually dns server

with dns you do not have to up down the interface… it works directly after you have modified the file.