This can be useful if your working from a LiveCD or testing the network. Note, “temporary” means it will not survive a reboot! To configure networking, adjust the below command for your own environment.
ifconfig eth0 192.168.1.109 broadcast 192.168.1.255 netmask 255.255.255.0 up route add default gw 192.168.1.254
The above commands assign the static IP address of 192.168.1.109
to the eth0
interface and defines the default gateway as 192.168.1.254
.
You might also need to add some nameservers to your /etc/resolv.conf
configuration file.
nameserver 192.168.1.254 nameserver 1.2.3.4
Again, this configuration will be lost after a reboot. To permanently create these rules, use the /etc/conf.d/net
configuration file.
Be the first to comment