--- Begin Message ---
Package: net-tools
Version: 1.59-1
Severity: normal
I am attaching the output from running strace on ifconfig. I've searched
and probed, starting with ifupdown (and those gawd-awful -) nowebm sources)
to net-tools to the kernel... I've run ifup under strace and ifconfig.
I'm still honestly not sure if this is ifconfig or the kernel...
About a week ago my ISP changed some things, cable-modem -), they went
and changed their block of IP addresses (network, netmask, DNS, the
whole setup). So I had to reboot my cable modem.. so far so good, then
nothing.. so I ran ifdown -a, ifup -a.. network unreachable...
Hmmm... I was using pump as it used to be dial upstream, since changed
to 2 way cable. So I looked at my daemon.log and syslog, I managed to
piece together that they were feeding my computer some bad info. So I
did the binary on the netmask, network, and default gateway and put them
in by hand using route. Now, should be fine right? I can setup static IP
in /etc/network/interfaces and no more problems? No such luck.
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
auto lo eth0
# The loopback interface
iface lo inet loopback
# The first network card - this entry was created during the Debian
# installation
# iface eth0 inet dhcp
iface eth0 inet static
address 12.44.140.127
network 12.44.136.0
netmask 255.255.252.0
gateway 12.44.139.1
As you can see it is a bit unusual, but nothing that should give
ifupdown or ifconfig any problems? Network unreachable, on reboot, on
ifdown -a ifup -a, etc...
Whenever the network comes down, I have to remove the bogus entry from
my route, and set it by hand once again, suppose I should script it,
but, that's what /etc/network/interfaces is for right?
Sorry this got a bit long, been kind of frustrating trying to find the
source of all this. I hope the attached strace helps.
Gordon Sadler
-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux home-desktop 2.4.2-ac1 #3 Mon Feb 26 04:50:16 CST 2001 i686
Versions of packages net-tools depends on:
ii libc6 2.2.2-1 GNU C Library: Shared libraries an
# strace -f ifconfig eth0 12.44.140.127 netmask 255.255.252.0
execve("/sbin/ifconfig", ["ifconfig", "eth0", "12.44.140.127", "netmask",
"255.255.252.0"], [/* 31 vars */]) = 0
uname({sys="Linux", node="home", ...}) = 0
brk(0) = 0x8056568
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(0x3, 0xbfffec0c) = 0
old_mmap(NULL, 32058, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3) = 0
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\334\314"..., 1024) =
1024
fstat64(0x3, 0xbfffec54) = 0
old_mmap(NULL, 1194788, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001f000
mprotect(0x40138000, 43812, PROT_NONE) = 0
old_mmap(0x40138000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x118000) = 0x40138000
old_mmap(0x4013f000, 15140, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013f000
close(3) = 0
munmap(0x40017000, 32058) = 0
getpid() = 738
brk(0) = 0x8056568
brk(0x8056598) = 0x8056598
brk(0x8057000) = 0x8057000
uname({sys="Linux", node="home-desktop", ...}) = 0
access("/proc/net", R_OK) = 0
access("/proc/net/unix", R_OK) = 0
socket(PF_UNIX, SOCK_DGRAM, 0) = 3
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
access("/proc/net/if_inet6", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/net/ax25", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/net/nr", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/net/rose", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/net/ipx", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/net/appletalk", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/sys/net/econet", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/sys/net/ash", R_OK) = -1 ENOENT (No such file or directory)
access("/proc/net/x25", R_OK) = -1 ENOENT (No such file or directory)
ioctl(4, SIOCSIFADDR, 0xbffff7fc) = 0
ioctl(4, SIOCGIFFLAGS, 0xbffff73c) = 0
ioctl(4, SIOCSIFFLAGS, 0xbffff73c) = 0
ioctl(4, SIOCSIFNETMASK, 0xbffff7fc) = 0
_exit(0) = ?
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
12.44.140.0 * 255.255.252.0 U 0 0 0 eth0
Above is the resulting route from ifconfig command above. Below you'll find
the route as it should be, after I set it by hand. It truly appears to be
doing something wrong with the netmask. I tracked it to the ioctl calls in
ifconfig.c:set_flag . From there I looked at the kernel source some,
net/ipv4/devinet.c appear to be the likely locations.
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
12.44.136.0 * 255.255.252.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default lubr.lcisp.com 0.0.0.0 UG 0 0 0 eth0
--- End Message ---