Rock
2013-Jul-23 21:46 UTC
[CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes?
QUESTION: Why does my Centos 6.4 laptop keep wiping out my eth0 IP address? SUMMARY: a) I set the IP address of eth0 b) Everything works fine for 2 to 5 minutes c) Then, that eth0 IP address is (somehow?) wiped out I frustratingly repeat that abc process (over and over and over again) BACKGROUND: My home network has been working perfectly and there is no problem with my home network, nor my wlan0 WiFi access from my Centos laptop to that home broadband network. Inside the house, I never use the wired (eth0) NIC; but, I'm trying to set up a wired/wireless connection outside the house and that is where I'm running into this problem where Centos (automatically?) constantly and repeatedly wipes out the IP address I set on eth0. I can easily (constantly) change the IP address of the eth0 NIC back to what I want it to be; but that IP address only stays set for about 2 to 5 minutes; and then it wipes itself out (again & again). Why? How do I stop this? (All I want is for eth0 to *stay* at the IP address I set it to!) To give you more contextual detail, here's a typical sequence. SIMPLE BASELINE: Wireless NIC (wlan0) is turned off using a hardware switch on the outside of the laptop (so that only one NIC is in play). STARTING POINT: (eth0 has no IP address) $ ifconfig eth0 => eth0 Link encap:Ethernet HWaddr A0:BE:C1:D8:E5:F1 => inet6 addr: fe80::f2de:f1ff:fe38:8591/64 Scope:Link => UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 => RX packets:3139 errors:0 dropped:0 overruns:0 frame:0 => TX packets:3230 errors:0 dropped:0 overruns:0 carrier:0 => collisions:0 txqueuelen:1000 => RX bytes:2403080 (2.2 MiB) TX bytes:547895 (535.0 KiB) => Interrupt:20 Memory:f2600000-f2620000 I EASILY CAN SET THE IP ADDRESS of eth0: $ sudo ifconfig eth0 192.168.1.100 $ ifconfig eth0 => eth0 Link encap:Ethernet HWaddr A0:BE:C1:D8:E5:F1 => inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 => inet6 addr: fe80::f2de:f1ff:fe38:8591/64 Scope:Link => UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 => etc. At this point, I can now connect a wire from the RJ45 port of the laptop, to the device (which happens to be a radio set to 192.168.1.20): $ ping 192.168.1.20 => PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data. => 64 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=1.38 ms => 64 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=0.339 ms => 64 bytes from 192.168.1.20: icmp_seq=3 ttl=64 time=0.255 ms ^C => --- 192.168.1.20 ping statistics --- => 3 packets transmitted, 3 received, 0% packet loss, time 2954ms => rtt min/avg/max/mdev = 0.255/0.660/1.388/0.516 ms I can even easily connect via port 80 (using Firefox on the laptop) to this device, e.g., $ firefox http://192.168.1.20 In fact, time and time (and time) again, everything works just fine, for about 2 to 5 minutes, until, invariably, I lose all connectivity! What seems to happen is that CentOS wipes out my IP address that I had set for eth0. So, I lose all connectivity. $ ifconfig eth0 => eth0 Link encap:Ethernet HWaddr A0:BE:C1:D8:E5:F1 => inet6 addr: fe80::f2de:f1ff:fe38:8591/64 Scope:Link => UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 I can repeat the process, and everything works again, for about 2 to 5 minutes. Then I lose my eth0 IP address again. WHAT I WANT: When I set eth0 to an IP address, I want eth0 to *stay* at that IP address! My question: Q: Why does setting an eth0 IP address only last about 5 minutes on Centos? What am I doing wrong? What can I do to *keep* the IP address on eth0 that I set for eth0?
John R Pierce
2013-Jul-23 21:50 UTC
[CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes?
On 7/23/2013 2:46 PM, Rock wrote:> WHAT I WANT: > When I set eth0 to an IP address, I want eth0 to*stay* at that IP address! > > My question: > Q: Why does setting an eth0 IP address only last about 5 minutes on Centos? > What am I doing wrong? > What can I do to*keep* the IP address on eth0 that I set for eth0?the interface is probably configured for DHCP via /etc/sysconfig/network-scripts/ifcfg-eth0 and your system is undoubtedly running network-manager. -- john r pierce 37N 122W somewhere on the middle of the left coast
Steve Thompson
2013-Jul-23 21:54 UTC
[CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes?
On Tue, 23 Jul 2013, Rock wrote:> Why? How do I stop this? > (All I want is for eth0 to *stay* at the IP address I set it to!)finger ----> NetworkManager. Probably need NM_CONTROLLED=no in ifcfg-eth0. -steve
Lamar Owen
2013-Jul-24 15:38 UTC
[CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes?
On 07/24/2013 10:07 AM, m.roth at 5-cent.us wrote:> on the router, see if it will accept a fixed IP, rather than one > assigned by DHCP; if so, you can set it on the laptop. I'd also check > to see if you need to deal with NetworkManager to do that. I don't > know - I *loathe* NM, and am majorly annoyed that upstream decided to > put a tool appropriate for a laptop as the default for *everything*... > says the guy dealing with 150 or more servers and workstations that > are hardwired.You need to get used to it; it's not going away. I would hazard a guess that the ability to turn off NM will go away at some point, and NM will be there all the time even for clustered hosts. The only times where disabling NM are strictly necessary are for clustering and bridging; most everything else, including static, hardwired connections, can easily be done with NM; I've done more than a few, and NM just worked out of the box. One just needs to pay attention to the details and set it up properly. One of the features planned for Fedora 20 is finally fully CLI support for creating NM connections. But, you know where _that_ could go. The good news, I guess, is that RHEL7 should be based on F19 or so (according to some commit messages and recent traffic on the rhel lists), but might get the nmcli enhancements. Sorry, just facts.
J.Witvliet at mindef.nl
2013-Jul-26 09:00 UTC
[CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes?
-----Original Message----- From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf Of Rock Sent: Wednesday, July 24, 2013 4:01 PM To: centos at centos.org Subject: Re: [CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes? On Tue, 23 Jul 2013 23:03:00 -0700, John R Pierce wrote:> you should be able to get 300 feet of mostly open space with a simple > panel antennaUnderstood. The Nanobridge M2 may be far more than I need. But, it should work as it's advertised to go five miles. All I need is a few hundred feet. -----Original Message----- Five miles? Only with line of sight, no other stations on the same or neighboring channel, and no electric equipment (engines).. Increasing power is hardly ever an good option, as it only do something for TX, nothing for RX. If you have troubles with covering 300 feet, you need a 295 foot cable and an additional antenna... ______________________________________________________________________ Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het electronisch verzenden van berichten. This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
J.Witvliet at mindef.nl
2013-Jul-26 09:18 UTC
[CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes?
-----Original Message----- From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf Of m.roth at 5-cent.us Sent: Wednesday, July 24, 2013 4:07 PM To: CentOS mailing list Subject: Re: [CentOS] What on Centos is wiping out my eth0 IP address every 5 minutes? Rock wrote:> On Tue, 23 Jul 2013 23:03:00 -0700, John R Pierce wrote:<snip>> I think my "original" problem was what you guys sensed from > the start. > > It was supremely frustrating having my manually typed eth0 > IP address being wiped out - but - apparently that was what > Network Manager was supposed to do. > > Apparently Network Manager was set to pick up a DHCP address > for eth0, and, when none were forthcoming, it wiped out the > existing IP address. > > I only need to figure out now how to switch gracefully between > using wlan0 connected to the home broadband router inside the > house, and using eth0 wired to the Nanobridge M2 outside the > house.<snip> Several thoughts: on the router, see if it will accept a fixed IP, rather than one assigned by DHCP; if so, you can set it on the laptop. I'd also check to see if you need to deal with NetworkManager to do that. I don't know - I *loathe* NM, and am majorly annoyed that upstream decided to put a tool appropriate for a laptop as the default for *everything*... says the guy dealing with 150 or more servers and workstations that are hardwired. -----Original Message----- I give servers a fixed address, but they are also defined in the dhcp server. It might look overflues, but when doing an installation with PXE, you need dhcp. Just gotta be careful that the hard coded and the dhcp ones are the same.... Regarding N.M.: It is a wonderful tool. At least for end-users on desktops/laptops with frequently changing WIFI or UMTS connections. But for servers, without a GUI, but with vlans, load-balancing or H-A? Nah! ______________________________________________________________________ Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het electronisch verzenden van berichten. This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
Reasonably Related Threads
- What on Centos is wiping out my eth0 IP address every 5minutes?
- Bug#636552: xen-hypervisor-4.1-i386: Error: Device 0 (vif) could not be connected. Hotplug scripts not working.
- CentOS Digest, Vol 102, Issue 26
- web collaboration packages.
- wiping out data on a disk (no physical acess to the machine)