Find the answer to your Linux question:
Results 1 to 9 of 9
I've just installed Debian for the first time and am going to use it as a web/mail server. The install went very well, so I was happy about that. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    6

    Debian static IP


    I've just installed Debian for the first time and am going to use it as a web/mail server. The install went very well, so I was happy about that. I need to use a static IP on my internal network but not sure how to set it.

    Can someone please let me know the command[s] to set the static IP address ?

    Thanks and looking forward to loadsa Debian fun !

    Steve

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Code:
    ifconfig eth0 <address>

  3. #3
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    This should help

    Code:
    /sbin/ifconfig eth0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2005
    Posts
    6
    wicked ... thanks very much !

  6. #5
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319

    /etc/network/interfaces

    This file is what controls the Debian ethernet device configuration. Just be sure to substitute with your own IP adresses.

    Code:
    &#91;bpark@spruce bpark&#93;$ cat /etc/network/interfaces 
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces&#40;5&#41;.
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
            address 172.17.x.x
            netmask 255.x.x.x
            network 172.17.x.x
            broadcast 172.x.x.x
            gateway 172.17.x.x
    The best things in life are free.

  7. #6
    Just Joined!
    Join Date
    Feb 2005
    Posts
    7

    static ip in slackware

    i dont use debian but am haveing the same prob.. i need to coinfigure my nic for static in slackware

    Myk3

  8. #7
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    mchipser
    Code:
    /sbin/ifconfig eth0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  9. #8
    Just Joined!
    Join Date
    Jan 2005
    Posts
    6
    hey, I've setup /etc/network/interfaces with my internal ips and i rebooted straight away - I've used Fedora and RedHat before and they use *service network restart* to re-initialise network connection. It didn't seem to be available in Debian. Is there an alternative or would the static ip have been available straight away ?

    cheers

    Steve

  10. #9
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Try "invoke-rc.d network restart"
    The best things in life are free.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •