Setup Static IP On Debian

I've recently installed Debian and am trying to figure out how to configure Debian to assume a static local IP. My network isn't anything fancy, just a LinkSys router that serves as my DHCP server. I have my windows computer set to a local IP 192.168.1.100 and would like to do the same for my new Debian server so that I can SSH into the same local IP. I would like to setup this in Debian itself as oppose to mapping the IP based upon the MAC address though the router.

Thanks for any ideas!

~ C
LVL 1
clickclickbangAsked:
Who is Participating?
 
Grime121Connect With a Mentor Commented:
type this: pico /etc/networking/interfaces

now change your nic to read something like this:

# The primary network interface
auto eth0
iface eth0 inet static
        address 10.0.0.254
        netmask 255.255.255.0
        network 10.0.0.0
        broadcast 10.0.0.255
        gateway 10.0.0.1
0
 
Grime121Commented:
errr, it's pico /etc/network/interfaces

when finished press Ctrl-X, then 'y', then 'Enter' to save changes.
0
 
awerleyConnect With a Mentor Commented:
the above is correct... the interfaces file is located at /etc/network/interfaces

Also if your network is 192.168.1.0, you would much rather a configuration like this assuming you want your linux box at 101 since your windows is at 100 and your router is at 192.168.1.1... but you can obviously change it to what you want/need:

auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1

Best of Luck,
Aaron
0
 
clickclickbangAuthor Commented:
Awesome stuff! Thanks guys!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.