LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   make my debian get a static IP (https://www.linuxquestions.org/questions/linux-newbie-8/make-my-debian-get-a-static-ip-934002/)

jrahma 03-12-2012 04:07 AM

make my debian get a static IP
 
Hi,

I have just installed my new debian machine.

I am not sure if the machine now has static IP or DHCP

but when I tried ifconfig I can see the IP is 192.1638.1.213

I want to change the IP to be static with the following:

IP : 192.168.1.1
Mask: 255.255.255.0
Gateway: 192.168.1.254


can you please help..

repo 03-12-2012 04:16 AM

Edit /etc/networking/interfaces
make it look like
Code:

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

Kind regards


All times are GMT -5. The time now is 11:47 PM.