Register
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Top Poster
    Join Date
    Nov 2008
    Location
    ireland
    Posts
    119
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default static IP Debian 5

    Hi all,
    I am wondering if anyone can help me with setting my IP to static on my debian PC. With putty and using the command nano /etc/network/ interfaces I can see and change the DHCP entry to Static. However after I reboot I cannot now access the internet.
    Is this a DNS issue and if so where do I set this up.
    Thanks in advance,

  2. #2
    Newbie
    Join Date
    Jul 2012
    Location
    Gothenburg
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by philly View Post
    Hi all,
    I am wondering if anyone can help me with setting my IP to static on my debian PC. With putty and using the command nano /etc/network/ interfaces I can see and change the DHCP entry to Static. However after I reboot I cannot now access the internet.
    Is this a DNS issue and if so where do I set this up.
    Thanks in advance,
    Example:
    frd@cardserv:/etc/network$ cat interfaces
    auto lo
    iface lo inet loopback

    iface eth0 inet static
    address 192.168.1.99
    netmask 255.255.255.0
    gateway 192.168.1.254

  3. #3
    Top Poster
    Join Date
    Nov 2008
    Location
    ireland
    Posts
    119
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by zOOge View Post
    Example:
    frd@cardserv:/etc/network$ cat interfaces
    auto lo
    iface lo inet loopback

    iface eth0 inet static
    address 192.168.1.99
    netmask 255.255.255.0
    gateway 192.168.1.254
    Thanks for your reply.
    At the moment when I run this command 'nano /etc/network/interfaces' I get the following,

    # The primary network interface
    auto eth0
    iface eth0 inet dhcp
    address 192.168.1.127
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

    I then change the dhcp to static and save and reboot. After doing this I cannot get on to the internet. I also noticed that at the moment my server is working in dhcp mode with Ip 192.168.1.101 however I am still getting the above which is 192.168.1.127 which is not the case.
    Confused

  4. #4
    V.I.P. Member
    digicon's Avatar
    Join Date
    Jul 2009
    Posts
    8,261
    Thanks Thanks Given 
    1,003
    Thanks Thanks Received 
    2,865
    Thanked in
    1,743 Posts

    Default

    I tried this when i ran debian 6 and it never worked, i did read that it can cause issues so i went with the advice od setting the static ip in the router itself. Just a Thought

  5. #5
    The Stig PT mtv1's Avatar
    Join Date
    Apr 2008
    Location
    Tipperary
    Posts
    4,413
    Thanks Thanks Given 
    87
    Thanks Thanks Received 
    257
    Thanked in
    157 Posts

    Default

    change the auto to lo

    but tbh all routers (well most)

    you can make the client static so no need to do it in debian config

    network local lan clientlist in mine you can reserve the ip

  6. #6
    V.I.P. Member wilf's Avatar
    Join Date
    Jan 2009
    Location
    uk
    Posts
    1,618
    Thanks Thanks Given 
    4
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    spent hours looking into this myself, dont waste your time do as the others do. use router!

  7. #7
    Top Poster
    Join Date
    Nov 2008
    Location
    ireland
    Posts
    119
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default static IP

    [quote=digicon;1830416]I tried this when i ran debian 6 and it never worked, i did read that it can cause issues so i went with the advice od setting the static ip in the router itself. Just a Thought[/quo
    Thanks guys for your reply's.
    I use a lynksys WAG 120N router which I understand does not have the option for locking an IP to a mac address. However I can specify a starting IP and the number of addresses to issue. Maybe this will sort things out for me.

    Thanks all.

  8. #8
    Top Poster
    Join Date
    Nov 2008
    Location
    ireland
    Posts
    119
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by digicon View Post
    I tried this when i ran debian 6 and it never worked, i did read that it can cause issues so i went with the advice od setting the static ip in the router itself. Just a Thought
    Thanks digicon,
    My router is a Lynksys and this does not support dhcp reservation so I am snookered. I need to lock the IP on the PC. To clarify if I browse to etc/network/interfaces and see my IP settings etc. I change the dhcp to static, save and reboot. I can then ping the PC but cannot access the internet.
    Thanks in advance.

  9. #9
    V.I.P. Member
    digicon's Avatar
    Join Date
    Jul 2009
    Posts
    8,261
    Thanks Thanks Given 
    1,003
    Thanks Thanks Received 
    2,865
    Thanked in
    1,743 Posts

    Default

    Hi Philly,

    As i say i tried on mine and it created problems so mine is done through the Router, Not sure if you can do it on yours but i would have thought 99% of routers allow an IP allocation.

    You could try the Wiki guide to set the static IP:

    NetworkConfiguration - Debian Wiki

  10. #10
    Top Poster
    Join Date
    Nov 2008
    Location
    ireland
    Posts
    119
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by digicon View Post
    Hi Philly,

    As i say i tried on mine and it created problems so mine is done through the Router, Not sure if you can do it on yours but i would have thought 99% of routers allow an IP allocation.

    You could try the Wiki guide to set the static IP:

    NetworkConfiguration - Debian Wiki
    Thanks digicon,
    I checked out the Wiki guide before. My settings are the same but for some reason when I set to static my internet is lost. Would this have something to do with DNS. Apparently the Lynksys wag120N although a very reliable unit does not support IP allocation.
    Just in case it makes a difference Network Manager is installed on my system.
    Last edited by philly; 11th January, 2013 at 10:48 PM.

  11. #11
    V.I.P. Member
    GastonJ's Avatar
    Join Date
    Dec 2009
    Posts
    5,505
    Thanks Thanks Given 
    836
    Thanks Thanks Received 
    1,676
    Thanked in
    1,083 Posts

    Default

    What's the results of:

    ifconfig
    netstat -rn
    cat /etc/resolv.conf
    My master plan is to live forever..... going to plan so far
    Despite the cost of living, it's still very popular.
    No good deed goes unpunished....


  12. #12
    Top Poster
    Join Date
    Nov 2008
    Location
    ireland
    Posts
    119
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by GastonJ View Post
    What's the results of:

    ifconfig
    netstat -rn
    cat /etc/resolv.conf
    Hi GastonJ,
    Here are the net details etc.

    eth0 Link encap:Ethernet HWaddr 00:0d:61:82:be:e0
    inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::20d:61ff:fe82:bee0/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:287756 errors:0 dropped:0 overruns:0 frame:0
    TX packets:226312 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:22771698 (22.7 MB) TX bytes:24591878 (24.5 MB)
    Interrupt:19 Base address:0xe000

    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:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    ################################################## #####################################

    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    ################################################## #########################################

    nameserver 208.67.222.222
    nameserver 208.67.220.220
    nameserver 89.19.64.36

  13. #13
    Newbie
    Join Date
    Jan 2011
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    This should do

    $ nano /etc/network/interfaces


    auto eth0
    iface eth0 inet static
    address 192.168.1.221
    netmask 255.255.255.0
    gateway 192.168.1.254
    dns-nameservers 192.168.1.254

  14. #14
    Top Poster
    Join Date
    Nov 2008
    Location
    ireland
    Posts
    119
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by binamee View Post
    This should do

    $ nano /etc/network/interfaces


    auto eth0
    iface eth0 inet static
    address 192.168.1.221
    netmask 255.255.255.0
    gateway 192.168.1.254
    dns-nameservers 192.168.1.254
    Thanks binamee,
    I will try your suggestion. I had it as above but I did not have any detail for the DNS.
    Will let you know how it goes.

  15. #15
    Top Poster

    Join Date
    Sep 2008
    Location
    In a land far, far away
    Posts
    101
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    31
    Thanked in
    5 Posts

    Default

    Quote Originally Posted by philly View Post
    Thanks binamee,
    I will try your suggestion. I had it as above but I did not have any detail for the DNS.
    Will let you know how it goes.
    Actually, above you had

    iface eth0 inet dhcp

    Which in itself says to networking to ignore lines after it and do dhcp instead of static IP.

 

 
Page 1 of 2 12 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
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.