Re: Networking Q concerning /etc/network/interfaces
On Sat, Feb 11, 2012 at 8:22 PM, Harry Putnam <reader@newsguy.com> wrote:
> Jesse Thompson <jesset@gmail.com> writes:
>> the interfaces file is really only going to come into pay during
>> bootup, or when using eg ifup/ifdown scripts.
>>
>> You indicated that you may have configured the interfaces by hand via
>> ifconfig; if so those changes will not survive a reboot. How long
>> since your last reboot?
>
> I was actually only speaking of 192.168.1.54 on eth0... but probably
> didn't make it clear.
>>
>> If the anomaly survives a reboot, I would next use the following
>> command to see what if any software or scripts are configured to muss
>> around with the interfaces:
>
> Well, the odd address ending 54 disappeared from ifconfig -a output
> but still `interfaces' says
>
> auto lo
> iface lo inet loopback
> allow-hotplug eth0
> iface eth0 inert dhcp
>
> And the actual network shows up on eth1 in ifconfig -a output:
>
> ifconfig -a
> eth0 Link encap:Ethernet HWaddr 00:40:f4:b5:29:41
> UP BROADCAST MULTICAST MTU:1500 Metric:1
> [...]
>
> eth1 Link encap:Ethernet HWaddr 00:11:09:ee:6c:04
> inet addr:192.168.1.42 Bcast:192.168.1.255 Mask:255.255.255.0
> [...]
So after a reboot, eth0 is "UP" but doesn't have an IP address. That
explains that you'd assigned "54" via ifconfig but the "UP" doesn't
come from your "/etc/network/interfaces".
>> grep -r 'eth[01]' /etc
>
> That turns up some files, but I don't recognize any that I know to be
> other networking tool files.
> (I added the -l flag and screened out /etc/mail files
> <I have lots of junk in there>, and files ending in ~):
>
> grep -rl 'eth[01]' /etc |grep -v 'etc/mail\|~$'
>
> /etc/dhcp/dhclient.conf
> /etc/samba/smb.conf.ucf-dist
> /etc/samba/smb.conf
> /etc/udev/rules.d/70-persistent-net.rules
> /etc/initramfs-tools/initramfs.conf
> /etc/avahi/avahi-daemon.conf
> /etc/network/interfaces.bak-1
> /etc/network/interfaces-autoconfigged-11.10.06_152210
> /etc/network/interfaces_hp-static_2
> /etc/network/interfaces.bak-0
> /etc/network/interfaces_hp-static
> /etc/network/run/ifstate
> /etc/network/interfaces
What are "interfaces.bak-1",
"interfaces-autoconfigged-11.10.06_152210", "interfaces_hp-static_2",
"interfaces.bak-0", "interfaces_hp-static"?!
Are there any comments in them that might explain how they're created?
> The lines in /etc/udev/rules.d/70-persistent-net.rules:
>
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}==
> "00:40:f4:b5:29:41", ATTR{dev_id}=="0x0", ATTR{type}=="1",
> KERNEL=="eth*", NAME="eth0"
>
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}==
> "00:11:09:ee:6c:04", ATTR{dev_id}=="0x0", ATTR{type}=="1",
> KERNEL=="eth*", NAME="eth1"
Makes sense.
Reply to: