Find the answer to your Linux question:
Page 1 of 10 1 2 3 4 5 ... LastLast
Results 1 to 10 of 98
Like Tree1Likes
I installed Debian Squeeze a week ago. Before anything else, I would like a static IP address. I added the following to /etc/network/interfaces. auto eth0 iface eth0 inet static address ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    55

    Static IP in Debian Squeeze


    I installed Debian Squeeze a week ago.
    Before anything else, I would like a static IP address.
    I added the following to /etc/network/interfaces.

    auto eth0
    iface eth0 inet static
    address 192.168.0.15
    netmask 255.255.255.0
    gateway 192.168.0.1



    When I tried to ping my new Debian machine using my Mac computer, my Mac couldn't recognize my Debian machine.
    When I tried to ping my Mac, my new Debian machine couldn't recognize my Mac either.

    Is there something wrong with the configuration ? or with something else ?
    I would greatly appreciate if you have any suggestions and advice !

    Amanda

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    What is the output from ifconfig?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Posts
    55
    Lazydog, here it is:

    lucky@cornucopia:~$ sudo ifconfig
    [sudo] password for lucky:
    eth0 Link encap:Ethernet HWaddr 20:cf:30:63:53:bb
    inet addr:192.168.0.15 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:36

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:104 errors:0 dropped:0 overruns:0 frame:0
    TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:25137 (24.5 KiB) TX bytes:25137 (24.5 KiB)

    wlan0 Link encap:Ethernet HWaddr 00:1e:64:52:ea:0e
    inet addr:192.168.0.12 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::21e:64ff:fe52:ea0e/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:7846 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6204 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:9529698 (9.0 MiB) TX bytes:970790 (948.0 KiB)


    I can see that there's something wrong with the last line of the 1. paragraph "Interrupt:36"
    Maybe you have some idea ..

    Amanda
    Last edited by amanda099; 03-01-2012 at 07:38 PM.

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    First thing I see is you have 2 interfaces on the same network: eth0 and wlan0. you need to turn off one of them as this causes a routing loop. Try turning off wlan0.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Jul 2011
    Posts
    55
    Lazydog,
    Yea .. it looks strange, isn't it ?
    192.168.0.12 is the IP address of my windows 7 machine.
    I run Debian dual boot with my windows 7, each on its own hard disk
    I can only run either Debian or Windows 7.
    When I run Debian Machine, the windows Machine is off, how can that IP 192.168.0.12 still be there ?

    Amanda
    Last edited by amanda099; 03-02-2012 at 12:10 AM.

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    When you boot from on to the other are you doing a warm boot or a cold boot? Warm boot might be holding onto the ip address and when Debain boot the wifi card still has the address.

    Is this s laptop?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #7
    Just Joined!
    Join Date
    Jul 2011
    Posts
    55
    Quote Originally Posted by Lazydog View Post
    When you boot from on to the other are you doing a warm boot or a cold boot? Warm boot might be holding onto the ip address and when Debain boot the wifi card still has the address.

    Is this s laptop?
    When I installed Debian squeeze, I chose to install Grub which takes care of the boot. So I just choose to boot either from windows or Debian.
    How can I cold-boot in order to use the Debian IP in stead of Windows IP ?

    It's ASUS NX90Jq YZ074Z and it already has windows 7 on one hard disk, I installed Debian on the other.

    Amanda

  8. #8
    Just Joined!
    Join Date
    Jul 2011
    Posts
    55
    Quote Originally Posted by Lazydog View Post
    When you boot from on to the other are you doing a warm boot or a cold boot? Warm boot might be holding onto the ip address and when Debain boot the wifi card still has the address.
    I just read the definitions of a warm boot and a cold boot:
    Warm boot is pressing the restart button while the computer is on and a cold boot is pressing the power switch when it is turned off.

    The output of the ifconfig are the same as in my previous post whether I do a warm boot or a cold boot.

    Amanda

  9. #9
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Can you post the complete /etc/network/interfaces file?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  10. #10
    Just Joined!
    Join Date
    Jul 2011
    Posts
    55
    Robert,

    When I just finished with the Debian Installation, the file /etc/network/interfaces looked like following:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug eth0
    #NetworkManager#iface eth0 inet dhcp


    Then I followed the tutorial
    wiki.debian.org/NetworkConfiguration right at the top.

    Now, it looks like following:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug eth0
    #NetworkManager#iface eth0 inet dhcp

    auto eth0
    iface eth0 inet static
    address 192.168.0.15
    netmask 255.255.255.0
    gateway 192.168.0.1


    Amanda

Page 1 of 10 1 2 3 4 5 ... LastLast

Posting Permissions

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