LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   A DHCP problem (https://www.linuxquestions.org/questions/slackware-14/a-dhcp-problem-549877/)

lali.p 04-29-2007 04:11 AM

A DHCP problem
 
Hi i am using Slackware 11.0 and i am connected through ADSL modem to the internet.
At present i have the following in my inet1.conf file:

Quote:

# Config information for eth0:
IPADDR[0]="192.168.1.2"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""
At boottime my eth0 gets the ip as in the conf file and using pppoe-start i am able to connect to internet.

But the problem is that when i do:
Quote:

USE_DHCP[0]="yes"
in the above config file(and remove any enteries regarding IPADDR[0] etc)
pppoe connects(also eth0 is up and is getting the address 192.168.1.x,) but i am unable to ping anywhere and internet doesn't work.
The default ip of my router is 192.168.1.1.



Could you people throw some light

erklaerbaer 04-29-2007 04:21 AM

compare the output of 'route' .
it could be that your dhcp-server (the modem) is not sending enough information...
does it work with windows?

lali.p 04-29-2007 04:36 AM

it works with windows
 
yeah DHCP works with windows

one thing more i want to clarify.When i use pppoe-connect instead it shows the following three things apart from showing me that pppoe is connected and the dns server ips:
1)kernel doesn't support ppp filtering.
2)not replacing existingdefault route via 192.168.1.1
3)can't determine the ethernet address for proxy arp


From these messages message 1 and 3 are always there (and internet works though)however message 2 appears when i use USE_DHCP="yes" in the config and in this case although all interfaces are up( i check uding ifconfig) and pppoe is also connected the internet doesn't work i mean i cant ping any address(so its not a dns problem)

Alien Bob 04-29-2007 04:44 AM

In the example rc.inet1.conf you posted you show that you have:
Code:

# Default gateway IP address:
GATEWAY=""

But with that line, you would not have Internet connection with that static IP address you've configured. So I guess there is another line deeper down in your rc.inet1.conf file, which says
Code:

# Default gateway IP address:
GATEWAY="192.168.1.1"

You can also deduce that from the log line "not replacing existing default route via 192.168.1.1".
Try to remove the line that hardcodes this GATEWAY variable when you are trying to use DHCP. You might have better luck that way.

Eric

lali.p 04-29-2007 05:02 AM

no the inet1.conf i've quoted above is correct. My router's default ip is 192.168.1.1 and it gives the ip ip to my eth0(if i use DHCP) as 192.168.1.x

Thing is that in that config if i use dhcp internet doesn't work but when i configure it manually i.e assign eth0 ip manually it works

So what are you trying to say should i use default gateway as 192.168.1.1 when using dhcp ?

lali.p 04-29-2007 07:18 AM

Quote:

So what are you trying to say should i use default gateway as 192.168.1.1 when using dhcp ?

Even this doesn't help.I know that it has some thing to do with command route but going through google is not helping me so i will try to give some details:

1)I have ADSL router which has ipaddress 192.168.1.1
I have enabled DHCP server on it and it works fine with windows.

2)I have an ethernet card on my pc and the when i configure that eth0 to get ip from router using DHCP it gets ip address 192.168.1.X mostly X is 2.

3)i use pppoe-start and it gets connected.

4)Then i use ifconfig and it shows that all 3 inetrfaces are up i.e eth0 lo and ppp0

But no net works i cant ping anyone.

Now take another scenario i.e i dont DHCP and i simply give eth0 an address 192.168.1.X and netmask 255.255.255.0 manually and then connect pppoe and it gets connected and internet works and i can ping anywhere.

Also note that once i have booted using DHCP and internet is not working if i change the ip of eth0 manually using ifconfig command and again reconnect using pppoe-start internet works again.


Kindly clear my concepts(i know it has something to do with route command but i am unable to understand the tutorials or links provided by google)

HELP!!!!

rob.rice 04-29-2007 11:29 AM

I dont use pppoe on my ADSL connection
I just load the module for my NIC and set USE_DHCP[0]="yes"
and it works
as a fact of the matter there is no ppp interface showing up
in the out put of "ifconfig -a"
you may not need to use pppoe at all
mine just uses the rc.inet1 script to set up the inet6 protcol
to use eth0
the way I ubderstand the way my router works is that
it passes all the requests and packets through transparently
I have no idea what it's settings are I let my broad band provider tack of it

H_TeXMeX_H 04-29-2007 11:35 AM

I have an ADSL modem, and I get it running just by using 'netconfig' with DHCP.

I don't know how your modem is set up, but I have never needed to run pppoe-start, nor anything ppp related.

rob.rice 04-29-2007 11:58 AM

I think a call to your broadband provider is in order
none of them support linux
BUT
if you ask the right questions they will tell you what you need to know
ask these questions
what protocols do they support ?
do you use DHCP ?
IF they support inet6 and use DHCP you don't need pppoe

lali.p 04-30-2007 12:00 AM

i am using pppoe beacuse mmy broadband provider provides user name and passsword through which we access our internet

So if you just use DHCP alone and no pppoe-start how are they gonna authenticate you ?

erklaerbaer 04-30-2007 08:01 AM

did you ever authenticate yourself on windows?

most dsl providers nowadays give you not a pure modem, but a modem-router-combo that authenticates you.

H_TeXMeX_H 04-30-2007 01:20 PM

Indeed, my modem has the authentication on it ... it sends everything. I only needed to authenticate once on the modem's software ... then it does it by itself.

lali.p 04-30-2007 11:11 PM

Quote:

did you ever authenticate yourself on windows?

most dsl providers nowadays give you not a pure modem, but a modem-router-combo that authenticates you.
__________________
Yes i authenticate myself every time i use internet on windows XP


All times are GMT -5. The time now is 05:08 AM.