Two elementary questions on LANs

Ed Greshko Ed.Greshko at greshko.com
Thu Jun 16 12:27:24 UTC 2011


Timothy Murphy <gayleard at eircom.net> wrote:

>Ed Greshko wrote:
>
>> On 06/16/2011 07:00 PM, Timothy Murphy wrote:
>>> 1) I was trying to change a LAN on my home-system
>>> from 192.168.1.0 to 192.168.2.0
>>> but I found it surprisingly difficult for example
>>> to change my laptop from 192.168.1.7 to 192.168.2.7 .
>>> I made the change in /etc/sysconfig/network-scripts/ifcfg-eth1
>>> and deleted all the files in /var/lib/dhclient with the old address.
>>> But when I re-booted the old address came up,
>>> as given by ifconfig and route (or ip route).
>>> I was running NetworkManager, but I didn't see
>>> the IP address specified in /etc/NetworkManager .
>>> I may say the laptop was WiFi connected to a LinkSys router running
>dhcp,
>>> but the Local IP Address in this had been changed to 192.168.2.1 .
>>>
>>> Who decides the IP address of a device?
>> 
>> In your /etc/sysconfig/network-scripts/ifcfg-eth1  What is the
>BOOTPROTO ?
>> 
>> If it is dhcp then the answer to your question is your dhcp "server".
>> 
>> The files in /var/lib/dhclient contain the information of you lease
>that
>> is served up by the dhcp server.
>> 
>> FWIW, that file would also contain dhcp-server-identifier which would
>> tell you what system issued the lease.
>
>Thanks for your response.
>I have BOOTPROTO=dhcp in /etc/sysconfig/network-scripts/ifcfg-wlan0 .
>
>I just commented out the IPADDR=192.168.2.7 in this file,
>as well as NETMASK and GATEWAY, and re-booted,
>but my IP address remains 192.168.2.7 .
>In fact the route table has not changed.
>
>I ran "sudo grep -r 192.168.2.7  ..." on /etc/ and /var/lib/
>on the laptop, and there was no match 
>except for the lines I had commented out.
>
>There are no wlan0 files in /var/lib/dhclient/ , 
>so the router does not seem to have sent anything.
>
>I looked in /var/log/messages and the first mention of the addressg
>after the reboot is
>avahi-daemon[749]: Joining mDNS multicast group 
>  on interface wlan0.IPv4 with address 192.168.2.7.
>
>I see from "man avahi-daemon" that avahi-daemon does 
>"register local IP addresses" so that may well be the source of my
>problems.
>But if avahi-daemon does save the address I don't see where it does so.
>It isn't in /etc/ or /var/ .
>
>As I said in my original post, if there is any online documentation
>dealing with this I would very much like to see it.
>

Your system is getting its IP address from your dhcp SERVER on you lan, as I said.  Your system is a CLIENT.  

Now you seem to be mixing things up a bit.  In your original post you talked about ifcfg-eth0. Now you talk about wlan0.  Which interface are you talking about?

What is the bootproto for eth0? And isn't that the interface whose IP address you want to change?

-- 
Sent from my Android tablet with K-9 Mail.


More information about the users mailing list