Author

Topic: Can anyone help me to setup a static IP in Linuxcoin? (Read 1040 times)

member
Activity: 70
Merit: 10
I have set in /etc/rc.local these lines:

sudo ifconfig eth0 192.168.1.2 255.255.255.0 up
sudo route add default gw 192.168.1.1

That file is kept if you're using persistence =) .
sr. member
Activity: 348
Merit: 251
Thanks for that. I did do it but on restarting it reverts back .ie removes all the static settings. Even though I'm running persistence.
newbie
Activity: 8
Merit: 0
Add to the file these lines…

auto eth0
iface eth0 inet static
       address 192.168.1.2
       netmask 255.255.255.0
       broadcast 192.168.1.255
       network 192.168.1.0
       gateway 192.168.1.1

modified according to your needs. Interface name can be obtained by "ip link" command. After you are finished with editing restart the networking service by "/etc/init.d/networking restart" command. You can check the result by "ip addr" command.
sr. member
Activity: 348
Merit: 251
The /etc/network/interfaces file only lists the below..

auto lo
iface lo inet loopback


However my machine does have a dynamic ip.

Thanks a mill.
Jump to: