Loopback address to eth0 interface and rooting goes wrong

From: Gary
Date: Mon Jan 21 2008 - 14:53:55 EST


Hello,

After a bad network interface configuration (ifconfig eth0 127.0.0.1),
I cannot recover the network without rebooting the kernel.

This is my working configuration :

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:90:3E:1F:1C:17
inet addr:192.168.240.195 Bcast:192.168.247.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2633 (2.5 KiB) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.240.0 * 255.255.248.0 U 0 0 0 eth0
default 192.168.240.1 0.0.0.0 UG 0 0 0 eth0

# ping -c 1 66.102.11.99
PING 66.102.11.99 (66.102.11.99): 56 data bytes
64 bytes from 66.102.11.99: icmp_seq=0 ttl=63 time=4.5 ms

--- 66.102.11.99 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 4.5/4.5/4.5 ms

Now I set a wrong parameter to the eth0 interface and I restore the
previous good parameters just after.

# ifconfig eth0 127.0.0.1
# ifconfig eth0 192.168.240.195 netmask 255.255.248.0
# route add default gw 192.168.240.1
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:90:3E:1F:1C:17
inet addr:192.168.240.195 Bcast:192.168.240.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:394 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35011 (34.1 KiB) TX bytes:1288 (1.2 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:664 (664.0 B) TX bytes:664 (664.0 B)

# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.240.0 * 255.255.248.0 U 0 0 0 eth0
default 192.168.240.1 0.0.0.0 UG 0 0 0 eth0

# ping -c 1 66.102.11.99
PING 66.102.11.99 (66.102.11.99): 56 data bytes

--- 66.102.11.99 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss

Since then, I cannot reach machines that are not in my local network.
The only way I found to solve the problem is to reboot.

How is it possible to recover to a normal behaviour without reboot?

In my case, the bootloader set this bad configuration as a kernel boot
argument and I cannot change it.

Please, has someone an idea to deal with?

CC on reply, please.

Thanks,
Regards,
--
Gary
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html