LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-19-2005, 11:31 AM   #1
smurfix
Newbie
 
Registered: Aug 2002
Distribution: Debian, RH, ubuntu
Posts: 22

Rep: Reputation: 15
Setting Static IP


Hi,

I've just re-installed Debian and by mistake chose to set the IP address by DHCP but I need to have it as a static IP and can't remember how to do it.

Can someone please put on the right path ?

Thanks

Steve
 
Old 02-19-2005, 11:35 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You'll find it in /etc/network/interfaces and should look something like;

auto eth0
iface eth0 inet static

address 192.168.0.2
netmask 255.255.255.0
 
Old 02-19-2005, 11:40 AM   #3
smurfix
Newbie
 
Registered: Aug 2002
Distribution: Debian, RH, ubuntu
Posts: 22

Original Poster
Rep: Reputation: 15
that's great ... and now set correctly .. thanks !
 
Old 02-19-2005, 01:07 PM   #4
smurfix
Newbie
 
Registered: Aug 2002
Distribution: Debian, RH, ubuntu
Posts: 22

Original Poster
Rep: Reputation: 15
Hi,

I thought I was sorted but it seems not ....

Running Debian Woody, behind a D-Link router. I can ping externally from another machine on the same router so I know the router and DSL are fine. I can ping between machines internally fine but when I try to get out I get this:

lobo:~# ping www.bbc.co.uk
PING www.bbc.net.uk (212.58.224.86): 56 data bytes
ping: sendto: Network is unreachable
ping: wrote www.bbc.net.uk 64 chars, ret=-1
ping: sendto: Network is unreachable
ping: wrote www.bbc.net.uk 64 chars, ret=-1

--- www.bbc.net.uk ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
lobo:~# ping 212.58.224.86
PING 212.58.224.86 (212.58.224.86): 56 data bytes
ping: sendto: Network is unreachable
ping: wrote 212.58.224.86 64 chars, ret=-1
ping: sendto: Network is unreachable
ping: wrote 212.58.224.86 64 chars, ret=-1

--- 212.58.224.86 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

As I say, I have just re-installed Debian on a new HDD [my other one crashed last night]. I suspect it is something simple and not sure I am in the right forum so I apologise for that.

Can anyone help ?

Thanks
Steve
 
Old 02-19-2005, 01:26 PM   #5
smurfix
Newbie
 
Registered: Aug 2002
Distribution: Debian, RH, ubuntu
Posts: 22

Original Poster
Rep: Reputation: 15
oh .. and I've just seen this aswell:

lobo:/etc/init.d# ifconfig
eth0 Link encap:Ethernet HWaddr 00:48:54:82:B3:0E
inet addr:192.168.4.10 Bcast:192.168.4.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1701 errors:0 dropped:0 overruns:0 frame:0
TX packets:1698 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:174650 (170.5 KiB) TX bytes:176348 (172.2 KiB)
Interrupt:9 Base address:0xd800

and not sure what the packet errors mean and if they might help.

Thanks
Steve
 
Old 02-19-2005, 02:04 PM   #6
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Have you set the isp DNS in /etc/resolv.conf?
 
Old 02-20-2005, 03:07 PM   #7
rom
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
try to specify the default gateway, and while you're at it the broadcast address to:

Code:
iface eth0 inet static
      address 10.0.0.136
      netmask 255.0.0.0
      broadcast 10.255.255.255
      gateway 10.0.0.2
hope it helps

Rom
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting a static IP dreakon SUSE / openSUSE 2 10-02-2005 03:08 PM
setting a static IP roenstad Linux - Newbie 1 10-02-2005 02:56 AM
Setting a static IP hongman Linux - Networking 6 02-22-2005 05:07 AM
setting a static IP EMHagerty Linux - Networking 1 09-09-2004 03:15 PM
Setting a Static IP wh33t Mandriva 1 12-20-2003 05:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration