LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Command line network card setup (https://www.linuxquestions.org/questions/linux-networking-3/command-line-network-card-setup-192285/)

shishimo 06-11-2004 07:52 AM

Command line network card setup
 
I'm getting proficient at working on problems from the command line instead of using a gui, since it gives me more feedback and it's easier for me to troubleshoot. One (of many maybe) area where I'm still glued to Mdk Control Center is the network config. I just installed Mdk 10 Official on my laptop and I have no net/lan connection.

I'm running an HP Pavilion n5295 and trying to get a D-Link DFE-670TXD PCMCIA card working over DHCP. When I use mandrake's utility, it binds the card to pcnet_cs, though I can't remember if it's tulip_cs that I should be using. After I set it up via Mdk Control Center, nothing changes, and I don't know what went wrong.

How can I get my network online, and do it over the command line?

zatriz 06-14-2004 04:33 PM

"dmesg" will show you if the drivers were loaded during bootup
"lsmod" will should you all drivers currently loaded

- check if there is one loaded for you network card
if there is not one loaded then you need to find out (search google) for the module that your card uses, then do a "modprobe " for that driver
After that do "insmod" for you driver

once the drivers are loaded you can view the connections by doing
"ifconfig"
to assign an ip address "ifconfig eth0 192.168.0.1 up"
to just check status do "ifconfig"

peter_robb 06-14-2004 04:35 PM

See which module is loaded.. and do rmmod ~ to remove it..
You may have to remove the mii module first.. if it exists..

Try loading tulip_cs first, modprobe tulip_cs
then do dmesg to see if the card is recognised correctly..
Then ifup -a & ifconfig to see if it comes up correctly.

If not, remove that module and try the other..

Whichever module works, enter that into /etc/modules.conf
eg
alias eth~ module_name
and run modprobe -a

shishimo 06-17-2004 08:56 AM

Thanks for the reply!

dmesg and lsmod don't show my eth1 connection. ifconfig only shows lo, but ifconfig -a shows all of my connections, including eth1.

when i try to remove pcnet_cs, which is what is bindhing to my card right now, i get pcnet_cs is busy, and it won't unbind. i also tried removing mii, but it doesn't exist. then i tried loading tulip_cs just for fun, and it's not even found! what is going on here?

peter_robb 06-17-2004 09:25 AM

The modules load in a specific order, so you cant pull one out if it is being used by another module..

I am surprised lsmod didn't show anything..
You were logged in as root when you tried it?

If a module isn't compiled, it's a bit hard to load it ;)
That means you may need to rebuild the kernel to make the extra modules..

Boot without the card inserted and make a note of the modules listed with lsmod
Then insert the card and start it with Mandrake Control and see what's been added to lsmod

shishimo 06-17-2004 09:36 AM

heres the content of my lsmod.

# lsmod
Module Size Used by
sg 38044 0
st 38616 0
sr_mod 17028 0
sd_mod 16832 0
scsi_mod 114648 4 sg,st,sr_mod,sd_mod
nfsd 173152 8
exportfs 5920 1 nfsd
parport_pc 32832 1
lp 12200 0
parport 38952 2 parport_pc,lp
md5 3872 1
ipv6 232352 12
snd-seq-oss 31232 0
snd-seq-midi-event 7552 1 snd-seq-oss
snd-seq 51024 4 snd-seq-oss,snd-seq-midi-event
snd-seq-device 8008 2 snd-seq-oss,snd-seq
snd-pcm-oss 51812 0
snd-mixer-oss 17952 1 snd-pcm-oss
snd-maestro3 22276 2
snd-ac97-codec 58148 1 snd-maestro3
snd-pcm 93156 3 snd-pcm-oss,snd-maestro3
snd-page-alloc 11972 1 snd-pcm
snd-timer 24484 2 snd-seq,snd-pcm
snd 52484 13 snd-seq-oss,snd-seq-midi-event,snd-seq,snd-seq-device,snd-pcm-oss,snd-mixer-oss,snd-maestro3,snd-ac97-codec,snd-pcm,snd-timer
soundcore 9248 1 snd
af_packet 20520 0
hid 53312 0
raw 7616 1
ide-floppy 18752 0
ide-tape 34864 0
ide-cd 40548 0
cdrom 37184 2 sr_mod,ide-cd
floppy 59444 0
pcnet_cs 19284 1
8390 9536 1 pcnet_cs
ds 15364 5 pcnet_cs
yenta_socket 16352 1
pcmcia_core 68768 3 pcnet_cs,ds,yenta_socket
tulip 45248 0
nls_iso8859-1 3904 1
ntfs 85932 1
supermount 37876 1
intel-agp 17372 1
agpgart 31016 1 intel-agp
uhci-hcd 29104 0
usbcore 99132 4 hid,uhci-hcd
rtc 11576 0
ext3 110408 1
jbd 54328 1 ext3

i think the 8390 is the pcmcia card. another weird thing that happens is that whenever the card is turned on and i restart, the system turns it off on the following reboot. then when i reboot again, the card turns on. this alternating happens even when the card has just been left in. i dont know if that has anything to do with the immediate problem. i remember from previous times that i had to wrestle with this card that it uses the realtek 8390 (or something like that) drivers.

peter_robb 06-17-2004 03:59 PM

WOW.. that's a whole heap of modules...
Looks like your kernel has been built quite well..
Does everything work ok? scsi, usb etc..

I notice that tulip is loaded before pcmcia_core
Try removing it first, then check the card..

Do you have an onboard LAN?
(Just trying to find out why tulip has loaded)

shishimo 06-18-2004 09:49 AM

yeah this stock kernel is awesome. everything runs im pretty sure, except for net of course.

ok, i rmmod tulip and got no change. what should i check on the card? i also noticed during bootup that i get an error message when the eth0 and eth1 are starting up. the message is something like

bringing up interface eth1: cannot find dhcp client [failed]

is there a way to see boot messages like dmesg for kernel startup? i do have an onboard accton en2242 eth connection built into my lapto, but i dont use it because it super shady and hasnt really worked with any OS since i chucked winME as far as i could :P It looks like maybe theres something wrong with my dhcp client itself from that message.

peter_robb 06-19-2004 09:30 AM

Ok, tulip is needed for the Accton eth..

We're getting into some laptop specific areas here and I think you would be better served if you make a new post in the Laptop Forum.
That way you'll get a better group of geeks to help..

shishimo 06-20-2004 11:35 AM

ok, ill give it a shot over on the laptop area. thanks for your help peter_robb


All times are GMT -5. The time now is 10:16 PM.