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

Re: How to fix ipaddress



>> I set /etc/network/interfaces as follows :
>>      auto lo
>>      iface lo inet loopback
>>      allow-hotplug eth0
>>      iface eth0 inet static
>>            address 192.168.0.7
>>            netmask 255.255.255.0
>>            network 192.168.0.0
>>            broadcaset 192.168.0.255
>>            gateway 192.168.0.1
>>            dns-nameservers 192.168.0.1
>>            dns-search kornet

>> Sometimes ip address is set to 192.168.0.7.
>> But somtimes ip address is set to 169.254.171.33
>> which is not set by me, and I don't konw why that address
>> is set to my ip address.
>> I want to set my ipaddress 192.168.0.7 always.

> Try changing
> allow-hotplug eth0
> to
> auto eth0

+1

>From the interfaces man page: Lines beginning with the word "auto" are
used to identify the physical interfaces to be brought up when ifup is
run with the -a option. (This option is used by the system boot
scripts.) Physical interface names should follow the word "auto" on
the same line. There can be multiple "auto" stanzas. ifup brings the
named interfaces up in the order listed. Lines beginning with "allow-"
are used to identify interfaces that should be brought up
automatically by various subsytems. This may be done using a command
such as "ifup --allow=hotplug eth0 eth1", which will only bring up
eth0 or eth1 if it is listed in an "allow-hotplug" line. Note that
"allow-auto" and "auto" are synonyms.


Reply to: