strange ifconfig behaviour
- From: amit <amit_ra@xxxxxxxxxxx>
- Date: Sun, 19 Mar 2006 18:39:01 +0530
Hi,
I am trying to understand how i can make linux kernel automatically load my network card modules at boot up time. I read somewhere that i can create a /etc/modules file and put all the modules i want the kernel to load there but that doesn;t work. Wondering anyone has any pointers on this issue ??
There is something strange I observed while trying to use ifconfig cmd.
One a particuler system running RHEL4 U2 2.6.9 kernel this is what I observed.
0 # cat /etc/modules.conf
alias eth0 tg3
alias eth1 tg3
0 # uname -r
2.6.9-22.EL
0 # lsmod
Module Size Used by
i2c_dev 11329 0
i2c_core 22081 1 i2c_dev
microcode 6881 0
ata_piix 9413 9
libata 44957 1 ata_piix
sd_mod 17217 10
scsi_mod 121293 2 libata,sd_mod
ext3 116809 6
jbd 71385 1 ext3
0 # cat /etc/modules.conf
alias eth0 tg3
alias eth1 tg3
0 # ifconfig eth0 up
eth0: unknown interface: No such device
255 #
Ifconfig fails because the NIC module tg3 is not loaded.
Now, On a different system running a 2.4.21 kernel.
127 # lsmod
Module Size Used by Not tainted
iptable_filter 2412 1 (autoclean)
ip_tables 15776 1 [iptable_filter]
ext3 85800 6
jbd 50924 6 [ext3]
ata_piix 5352 9
scsi_dump_register 2048 0 [ata_piix]
libata 45276 0 [ata_piix]
sd_mod 13936 18
scsi_mod 106924 2 [ata_piix libata sd_mod]
[ NOTE : No NIC module is loaded right now]
0 # uname -r
2.4.21-37.EL
0 # cat /etc/modules.conf
alias eth0 e1000
alias eth1 e1000
alias scsi_hostadapter ata_piix
0 # ifconfig eth0 up <<<<<<<<<<<<< used ifconfig cmd
0 # lsmod
Module Size Used by Not tainted
e1000 93020 1 (autoclean)<<<<< NIC module got loaded
iptable_filter 2412 1 (autoclean)
ip_tables 15776 1 [iptable_filter]
ext3 85800 6
jbd 50924 6 [ext3]
ata_piix 5352 9
scsi_dump_register 2048 0 [ata_piix]
libata 45276 0 [ata_piix]
sd_mod 13936 18
scsi_mod 106924 2 [ata_piix libata sd_mod]
Now I am wondering how come on 2.4.21 ifconfig is causing the NIC module e1000 to load ??
And as if this was not strange enough.
0 # ifconfig eth0 down
0 # rmmod e1000 << unload the module.
0 # ./strace ifconfig eth0 up << use strace on ifconfig
execve("/sbin/ifconfig", ["ifconfig", "eth0", "up"], [/* 47 vars */]) = 0
.......... [<<<<<<<<<<<<<< lines removed]
ccess("/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, SIOCGIFFLAGS, 0xbfff87a0) = -1 ENODEV (No such device)
write(2, "eth0: unknown interface: No such"..., 40eth0: unknown interface: No such device
) = 40
exit_group(-1) = ? << Got an erro Unknown intrface same as I got in case of 2.6.9.
0 # lsmod
Module Size Used by Not tainted
iptable_filter 2412 1 (autoclean)
ip_tables 15776 1 [iptable_filter]
ext3 85800 6
jbd 50924 6 [ext3]
ata_piix 5352 9
scsi_dump_register 2048 0 [ata_piix]
libata 45276 0 [ata_piix]
sd_mod 13936 18
scsi_mod 106924 2 [ata_piix libata sd_mod]
[e1000 module not loaded this time]
I use to think strace is a non-intrusive utility but it seems that in this case it is chaning the end result of the execution of ifconfig command.
Any idea why this could be happening ??
Thanks
Amit.
.
- Follow-Ups:
- Re: strange ifconfig behaviour
- From: Lenard
- Re: strange ifconfig behaviour
- Prev by Date: Re: no boot CD winxp for setup?
- Next by Date: Re: strange ifconfig behaviour
- Previous by thread: Internet Access problem in Fedora Core 4
- Next by thread: Re: strange ifconfig behaviour
- Index(es):
Relevant Pages
|