FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 06-16-2011, 11:00 AM
Timothy Murphy
 
Default Two elementary questions on LANs

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?

2) I also had a problem with the default gateway,
but this is more a matter of understanding an elementary networking issue.
I guess what I need is a short primer on networking for simpletons.
Is there anything along those lines online?

Suppose machine A has default gateway machine B,
and suppose machine B has default gateway machine C.
Now suppose that on machine A I ping, or ssh to, an address not on the LAN.
Shouldn't this go to machine B, and then automatically get forwarded to C?

Concretely,
my laptop 192.168.2.7 has default gateway 192.168.2.2 (a desktop)
and the desktop has default gateway 192.168.1.254 (my ADSL modem/router).
It seems to me that if I now ping www.google.co.uk (for example)
this should go to the internet and be responded to by google.
But it doesn't seem to be.

Incidentally, someone (I guess NM) keeps emptying my /etc/resolv.conf .
However, I fill it up each time.

Incidentally, I notice that my laptop, running Fedora-15,
seems to behave slightly differently to my desktop, running CentOS-5.6 ,
Changes to the routing table on the latter, eg changing the default gateway,
do not seem to come into force until I re-boot.

Any and all elucidation gratefully received and studied.



--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-16-2011, 11:09 AM
Ed Greshko
 
Default Two elementary questions on LANs

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.

Ed

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-16-2011, 12:10 PM
Timothy Murphy
 
Default Two elementary questions on LANs

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 address
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.


--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-16-2011, 12:27 PM
Ed Greshko
 
Default Two elementary questions on LANs

Timothy Murphy <gayleard@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.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-16-2011, 02:27 PM
Timothy Murphy
 
Default Two elementary questions on LANs

Ed Greshko wrote:

>>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.

So you think the Linksys router remembered the old address, 192.168.1.7,
of my laptop, and gave it out despite the fact that its local IP address
is 192.168.2.1 ?

I think if it was giving out an address it would be in the range 100-149,
which is the range it says it offers.

(I'm running the standard Linksys software,
and there doesn't seem to be any way of registering address on it,
as in /etc/dhcpd.conf .)

> 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?

I was actually discussing two different machines.
On my CentOS desktop this LAN is on the interface eth1,
and is connected by ethernet to the router;
on my Fedora laptop it is wlan0, connecting by WiFi.

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

I'm not quite sure what you mean.
As I said I have BOOTPROTO=dhcp on my laptop,
which I agree should mean it gets its IP address from the router.
But it doesn't seem to be doing that.

My experience is that if I wait several hours
and constantly re-boot my laptop,
it will in the end get a new IP address in the 192.168.2.100-149 range.

It seems there is some kind of inertia about changing IP addresses.
It's as though there is a lease somewhere
and I have to wait for it to expire.

Maybe people don't often try to change the address of a machine,
and so the issue doesn't often arise?

--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 01:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org