LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 05-10-2007, 05:00 PM   #1
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Rep: Reputation: 30
Etch Static IP Address


I'm running Etch on an AMD64 and tried to change the system from dynamic IP to a static IP address in preparation for trying to install VMWare. It seemed very straightforward, just make the change and put in the desired address. I even re-booted but then I lost connectivity.

Is there something else somewhere other than under Administration-Network that I have to change?

Thanks for any help you can provide.
 
Old 05-10-2007, 05:04 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
How can we help you when we don't know what you've done?
 
Old 05-10-2007, 05:20 PM   #3
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 625

Rep: Reputation: 32
Quote:
Originally Posted by Linux31
I'm running Etch on an AMD64 and tried to change the system from dynamic IP to a static IP address in preparation for trying to install VMWare. It seemed very straightforward, just make the change and put in the desired address. I even re-booted but then I lost connectivity.

Is there something else somewhere other than under Administration-Network that I have to change?

Thanks for any help you can provide.
did you use the network manager tool in gnome or just edit /etc/network/interfaces?
 
Old 05-10-2007, 10:55 PM   #4
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
Just edit your /etc/network/interfaces file. Here is a copy of mine:

Code:
noauto eth0
iface eth0 inet static
        address 192.168.1.157
        netmask 255.255.255.0
        gateway 192.168.1.1

auto wlan0
iface wlan0 inet static
        wireless_essid          pl3x.net
        wireless_channel        6
        wireless_key            HIDDEN
        address 192.168.1.158
        netmask 255.255.255.0
        gateway 192.168.1.1
I have two devices, eth0 (disabled by default) and wlan0 (enabled by default). You have to make sure you are inputing the correct ip, netmask, and gateway in order to get a connection. Your router/network may use a different subnet than I do, but I think my numbers will work for most people. Another majority of routers/networks use the *.0.1 subnet instead of *.1.1 - some are totally custom.
 
Old 05-11-2007, 08:05 AM   #5
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Original Poster
Rep: Reputation: 30
Thanks to everyone for the responses. I was using the Gnome applet under Desktop -> Admin -> Networking and just changing the pulldown option from DHCP to static IP address and filling in the information.

I kind of have the feeling that this doesn't accomplish everything necessary and reminds me of the first few Fedora cores with trying to change the machine name. You used the Gnome applet and the change was reflected at the bottom of the desktop. The only problem was that that was all the app did. It didn't modify things like (I think it was) the lmhosts file or some other config files.

Anyway, I'll edit that file. Thanks again for the help.
 
Old 05-11-2007, 08:08 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
You probably need to supply the nameserver address. Can you ping a website such as google using the IP address?

Also, you have two interfaces active on the same subnet.
 
Old 05-11-2007, 10:36 AM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
When you use dhcp, then the dhcp process will configure the gateway. Once you switch to static ip, you usually have to configure the gateway yourself. Look at the applet again and see if there is a place to put it in. And, as jschiwal points out, you may have to put the DNS server IPs in, as well.
 
Old 05-11-2007, 03:40 PM   #8
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
Quote:
Originally Posted by jschiwal
Also, you have two interfaces active on the same subnet.
Yes, but I dont use both at the same time. eth0 only gets used whem wlan0 craps out. eth0 gets me on the network so I can fix my router so i can reconnect wlan0.
 
Old 05-12-2007, 10:41 AM   #9
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Original Poster
Rep: Reputation: 30
I made the changes recommended to the interfaces file but no joy, although I could see that the Gnome Network app does make the necessary changes so manually changing the file doesn't seem to be necessary. Someone had mentioned "DCHP server" which reminded me that my Linksys router was set to be one. Made the appropriate changes there but still no joy.

When I made the change this time on the linux box using the Gnome network app, everything worked...........until I re-booted when I noticed a boot message that it couldn't activate eth).

As a real basic test, I connected the linux box directly to the cable modem to take the router out of the equation. I noticed that anytime I set things up for static IP, the eth0 doesn't get activated.

I went under "Services" but unlike Fedora which lists ALL possible services for possible activation, Etch only seems to list those that got activated on bootup.

When I go back to DCHP on the linux box, everything works fine. The reason I'm going through this is because I read that you have to have a static IP address to set up VMWare.

This has gotten way beyond my limited linux skills. Does anyone have anyother suggestions?

Thanks for your help.
 
Old 05-12-2007, 02:48 PM   #10
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
Quote:
Originally Posted by Linux31
As a real basic test, I connected the linux box directly to the cable modem to take the router out of the equation. I noticed that anytime I set things up for static IP, the eth0 doesn't get activated.
You cannot use a static IP with a direct connect to your modem. A modem will give you your WAN IP, not a LAN IP. This is DHCP only.

Quote:
Originally Posted by Linux31
When I go back to DCHP on the linux box, everything works fine. The reason I'm going through this is because I read that you have to have a static IP address to set up VMWare.
I've used VMWare with DHCP before. I dont see why it would have a problem...

Quote:
Originally Posted by Linux31
This has gotten way beyond my limited linux skills. Does anyone have anyother suggestions?
When you get your eth0 working with DHCP, give us the output of /sbin/ifconfig - I'll give you some exact numbers for your /etc/network/interfaces file.
 
Old 05-12-2007, 05:08 PM   #11
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Original Poster
Rep: Reputation: 30
Thanks so much for the feedback, it really helps. Especially that VMWare will run with DHCP. That's the ONLY reason I've been going through this drill. I saw the bit about needing a static IP address from, I think, a howtoforge.com article.

Let me see now about getting things going again under DHCP.

Thanks again for the help.
 
Old 05-15-2007, 05:28 AM   #12
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Original Poster
Rep: Reputation: 30
I tried accessing the /sbin/ifconfig but it said it was a binary file. But here is my /etc/network/interfaces file:

# 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
iface eth0 inet dhcp

Thanks for the help.
 
Old 05-15-2007, 09:10 AM   #13
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
don't try to access it, RUN it..

Code:
username@it-etch:~$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1A:A0:08:67:08
          inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21a:a0ff:fe08:6708/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20966959 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10544148 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:183823570 (175.3 MiB)  TX bytes:792211366 (755.5 MiB)
          Interrupt:201

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:270 errors:0 dropped:0 overruns:0 frame:0
          TX packets:270 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:24520 (23.9 KiB)  TX bytes:24520 (23.9 KiB)

username@it-etch:~$ /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0


username@it-etch:~$  cat /etc/resolv.conf
# generated by NetworkManager, do not edit!
search wrgservices.com
nameserver 192.168.0.25
nameserver 192.168.0.24
and here is my interface configuration..

Code:
username@it-etch:~$ cat /etc/network/interfaces
# 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
# iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.0.4
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
broadcast 192.168.0.255

Last edited by farslayer; 05-15-2007 at 09:21 AM.
 
Old 05-23-2007, 08:53 AM   #14
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Original Poster
Rep: Reputation: 30
I want to thank everyone for their help. I have succeeded in getting static IPs set up on all of my computers. I think a part of the problem was that initially I was setting the default gateway to the address provided by my ISP when I should have set it to the router's address. Anyway, it's been working fine for a few days now so I think that's it.

Thanks again to everyone.
 
Old 05-27-2007, 10:10 AM   #15
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,236

Rep: Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545
This is off-topic regarding the network question, but on-topic considering VMware.

The article on howtoforge Linux31 is referring to refers to installing VMware server on one machine, and running the client on a different one. You then need a fixed IP for the machine running VMware server.

Like Billy pointed out, if you run WMware server and client on the same box you don't need that fixed address. You might have to refer to your local machine when administering VMware, but you can do that to localhost or 127.0.0.1.

Linux31, it still pays off to spend some time and try and learn basic command line tools like ping, traceroute, ifconfig, etc. If you master those tools, problems like this would have been solved in about 5 minutes, without those, it can cost you a weekend. It is useful to give your box a fixed IP address if you want to access it from other computers on your LAN, then you know where to find it.

jlinkels
 
  


Reply

Tags
debian, etch, ip, network, static


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Set IP address to static from DHCP assigned address jborn Linux - Networking 4 02-02-2007 09:38 PM
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 04:35 AM
Static IP address mikz Slackware 4 11-28-2005 05:30 PM
Getting static IP address etc. chapzilla Linux - Newbie 2 06-16-2003 12:40 PM
Static IP Address bytebrowser Linux - Networking 14 06-16-2003 07:36 AM


All times are GMT -5. The time now is 10:30 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration