LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Etch Static IP Address (https://www.linuxquestions.org/questions/debian-26/etch-static-ip-address-552970/)

Linux31 05-10-2007 04:00 PM

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.

Quakeboy02 05-10-2007 04:04 PM

How can we help you when we don't know what you've done?

utanja 05-10-2007 04:20 PM

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?

BillyGalbreath 05-10-2007 09:55 PM

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.

Linux31 05-11-2007 07:05 AM

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.

jschiwal 05-11-2007 07:08 AM

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.

Quakeboy02 05-11-2007 09:36 AM

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.

BillyGalbreath 05-11-2007 02:40 PM

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.

Linux31 05-12-2007 09:41 AM

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.

BillyGalbreath 05-12-2007 01:48 PM

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.

Linux31 05-12-2007 04:08 PM

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.

Linux31 05-15-2007 04:28 AM

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.

farslayer 05-15-2007 08:10 AM

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


Linux31 05-23-2007 07:53 AM

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.

jlinkels 05-27-2007 09:10 AM

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


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