LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-05-2005, 04:06 PM   #1
Kruncher
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 61

Rep: Reputation: 15
NIC screwing up my dialup modem


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)?
 
Old 10-06-2005, 02:45 PM   #2
dracolich
Senior Member
 
Registered: Jul 2005
Location: Va Beach
Distribution: Slackware
Posts: 1,159

Rep: Reputation: 47
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:

#!/bin/bash
/sbin/ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.0.1

Substitute your own ip addresses and run this with root priveleges.

Hope this helps.
 
Old 10-06-2005, 05:19 PM   #3
Kruncher
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 15
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

Any ideas?

Last edited by Kruncher; 10-06-2005 at 08:15 PM.
 
Old 10-06-2005, 06:13 PM   #4
dracolich
Senior Member
 
Registered: Jul 2005
Location: Va Beach
Distribution: Slackware
Posts: 1,159

Rep: Reputation: 47
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.
 
Old 10-06-2005, 08:23 PM   #5
Kruncher
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 15
"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?
 
Old 10-06-2005, 08:32 PM   #6
Kruncher
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 15
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?
 
Old 10-07-2005, 07:12 AM   #7
dracolich
Senior Member
 
Registered: Jul 2005
Location: Va Beach
Distribution: Slackware
Posts: 1,159

Rep: Reputation: 47
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialup Modem rinku Linux - Newbie 2 03-11-2005 04:10 PM
Adsl and dialup modem at once SuperSadSmile Linux - Networking 0 03-09-2004 08:48 AM
How to configure modem for dialup? Viper Slackware 28 10-25-2003 10:00 AM
Route dialup modem packets back through dialup instead of default route cable modem jogress Linux - Networking 1 10-21-2003 03:48 PM
ESS Modem help? (new to dialup) WildTurkey Linux - General 1 03-01-2002 12:35 AM


All times are GMT -5. The time now is 06:25 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration