SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
a little while back I tried setting up a newtork in my house. I get my internet from dailup.
When I start my computer up I can not dialup, the only way I can get it working is if I do "ifconfig eth0 down".
When I was trying to set up my network I remember doing something like "route add default 192.168.0.1" then I deleted that because it did work. I believe that could be some of my problem cuz now on dialup it takes an extra few seconds to resolve a host name.
I'm sorry if that made no sence, it doesn't make alot of sence to me either.
If you need more info let me know.
So how can I 1: get my dailup to resolve host names quicker (I think its "route") and 2: how can I get my dailup modem and my NIC to play nicely (might be a "route" problem too)?
1. check the contents of your /etc/resolv.conf file. Hostname lookup is done with DNS and this file lists DNS server addresses. If there's an entry at the top for your network remove it.
2. A computer can only have one default gateway. Likely the inet startup script is configuring your eth0 during boot. What I do is make the gateway entry blank in /etc/rc.d/rc.inet1.conf and create a script to setup my network interface. Something like this:
Thank you dracolich. Number 1 works, number 2 doesn't.
As you said the computer can only have one gateway, so when I run that script it screws up the modem.
My scrypt looks like this (because I use DHCP):
#!/bin/bash
/sbin/ifconfig eth0 netmask 255.255.255.0 up
/sbin/dhcpcd eth0
/sbin/route add default gw 192.168.0.1 # I even tried taking this off
DHCP works a little differently. It gets the IP address, netmask and gateway from the DHCP server (router). In the same /etc/rc.d/rc.inet1.conf set eth0 to no for DHCP. The reason for creating a script to start eth0 is so the NIC settings don't interfere with the modem's. You can have both modem and network running together, but because of the gateway only one can function properly at a time. Use the script to start your eth0 interface when you need it. When you want to use the modem bring down eth0 (or just the gateway) first.
"ifconfig eth0 up" seems to work (alone, no "dhcpcd" or "route" needed).
So when I bring up my NIC the router automaticly gives it an IP without me needing to call dhcpcd?
What file do I need to edit in /etc/rc.d to only do "ifconfig eth0 up" at startup? Would that work?
I have one other question.
In my Belkin routers DHCP page, my computers host name doesn't show up, our Windows 98 machine shows up fine.
I coulda sworn I set that up with "netconfig". Is it just my router not playing nicely with linux or the other way around?
The startup file that configure the network interfaces is /etc/rc.d/rc.inet1.conf. rc.inet1 actually reads the .conf and does the work. In the .conf you can set the ip adress and metmask static and set "use dhcp" to no. This will bring it up static during the boot procedure. Like this, your interface can communicate with other computers on your local network, but not beyond.
To answer your second question, routers are sometimes quirky when it comes to discovery. I often have to reset mine, or unplug it and plug it back in, just to get it to discover one or more of my computers. Sometimes all it needs is to have some packets pass through it, so try pinging first.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.