[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: static IP



Iuri Sampaio wrote:
Hi,

I’m trying to set up a internal static IP to my machine.

My /etc/init.d/interfaces is:

# 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 eth1

# Static IP

 iface eth1 inet static

 address 192.168.1.10

 netmask 255.255.255.0

 network 192.168.1.255

 gateway 192.168.1.1

I set the IP but when I restarted the machine to the changes make effect I loose internet connection.

I already tried other final number to the ip such as 192.168.1.105. but it didn’t work out

Is there anything I’m doing wrong?

iuri

I'll assume that you actually mean /etc/network/interfaces, not /etc/init.d/interfaces. Is your machine plugged into e DSL router? If so, what is it's ethernet ip address set to (should be 192.168.1.1, since that's how you defined the gateway in Linux)?

What happens when you ping 192.168.1.1?

BTW, you don't need to restart your machine after making network changes, just do (as root):
# /etc/init.d/networking reatsrt



Reply to: