Networking Forums

Networking Forums > Computer Networking > Linux Networking > Using DHCP Client to get a POP server

Reply
Thread Tools Display Modes

Using DHCP Client to get a POP server

 
 
Gops
Guest
Posts: n/a

 
      01-05-2006, 11:29 AM
Hi,

Is there any way to get the address for POP server, SMTP server etc
using DHCP Client?
All these details are availabe in the DHCP server and I hope they are
supported by DHCP V6 onwards. Please let me know how to obtain these
information using a DHCP client in linux.

Thanks,

 
Reply With Quote
 
 
 
 
Davide Bianchi
Guest
Posts: n/a

 
      01-05-2006, 11:38 AM
On 2006-01-05, Gops <(E-Mail Removed)> wrote:
> Is there any way to get the address for POP server, SMTP server etc
> using DHCP Client?


Theoretically, if the server is configured correctly, using just
'pop' or 'smtp' should resolve into the FQDN of the server and give you
the correct address.

Davide

--
Everyone seems so impatient and angry these days. I think it's because
so many people use Windows at work -- do you think you'd be Politeness
Man after working on Windows 8 hrs. or more?
-- Chip Atkinson
 
Reply With Quote
 
Gops
Guest
Posts: n/a

 
      01-05-2006, 11:55 AM
> Theoretically, if the server is configured correctly, using just
> 'pop' or 'smtp' should resolve into the FQDN of the server and give you
> the correct address.


I am sorry, but, I couldnt understand. Do you mean, we need to use
'pop' or 'smtp' as options to dhclient? Could you pls tell me more
detailed? (I am sorry, that I couldnt understand this.. )

 
Reply With Quote
 
Davide Bianchi
Guest
Posts: n/a

 
      01-05-2006, 12:07 PM
On 2006-01-05, Gops <(E-Mail Removed)> wrote:
> I am sorry, but, I couldnt understand.


The dhcpd server will provide the client with an IP, a gateway,
one or more dns and a domain name.

Usually, doing a "ping something" will try to resolve 'something', if
the 'something' isn't an IP address. Now, if the domain is domain.com
and the machine just ping 'smtp' (ping smtp), what happens is that the
machine will attach the domain name to what's is searched for.

So it will try to resolve 'smtp.domain.com' and (hopefully) get the
correct ip address from the dns server, without anything special.

So, just using the simple name 'pop' or 'smtp' or 'imap' or whatever in
the configuration of the mail client should be enough.

Davide

--
New screensaver released: Curtains for Windows.
 
Reply With Quote
 
Gops
Guest
Posts: n/a

 
      01-05-2006, 12:17 PM
Thanks for the quick responses.

I tried using 'ping smtp', but I am getting only "ping: unknown host
pop3".
When we use VxWorks machine and the VxWorks client, we are able to get
the SMTP, pop server addresses.

Also, I would like to do that programatically. Is there any way to get
the required info using some APIs?

Thanks.

 
Reply With Quote
 
chris-usenet@roaima.co.uk
Guest
Posts: n/a

 
      01-05-2006, 12:22 PM
> On 2006-01-05, Gops <(E-Mail Removed)> wrote:
>> Is there any way to get the address for POP server, SMTP server etc
>> using DHCP Client?


Davide Bianchi <(E-Mail Removed)> wrote:
> Theoretically, if the server is configured correctly, using just
> 'pop' or 'smtp' should resolve into the FQDN of the server and give you
> the correct address.


This is a DNS issue and nothing to do with the DHCP settings that the OP
is asking about.

Chris
 
Reply With Quote
 
Davide Bianchi
Guest
Posts: n/a

 
      01-05-2006, 12:26 PM
On 2006-01-05, Gops <(E-Mail Removed)> wrote:
> I tried using 'ping smtp', but I am getting only "ping: unknown host
> pop3".


Interesting, so 'smtp' translates into pop3 ?
Unless is a typo. In both cases, it seems that you don't get a default
domain or a dns.

Davide

--
An OS/2 professional visits a seminar for Windows 95. During the practice
lesson Bill Gates asks him: "What do you like about Windows95?" He answers,
"That YOU have to use it."
 
Reply With Quote
 
Giovanni
Guest
Posts: n/a

 
      01-05-2006, 12:58 PM
On 01/05/06 14:17, Gops wrote:
> Thanks for the quick responses.
>
> I tried using 'ping smtp', but I am getting only "ping: unknown host
> pop3".
> When we use VxWorks machine and the VxWorks client, we are able to get
> the SMTP, pop server addresses.
>
> Also, I would like to do that programatically. Is there any way to get
> the required info using some APIs?
>
> Thanks.
>


This would work *only* if your local domain has a server with smtp, or
pop lake smtp.local.domain.

If you have access to the dhcpd configuration file you can add the
options for:
option pop-server ip-address [, ip-address... ];
option smtp-server ip-address [, ip-address... ];
The information will be sent to the clients but I'm afraid that on the
client machine you can read them only via the dhcp cache (and in my
client are binary files)

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 <http://counter.li.org/>
 
Reply With Quote
 
Gops
Guest
Posts: n/a

 
      01-05-2006, 02:37 PM
Can you pls tell me where does the client store those values in the
m/c? I beleive the ipaddress should be acquired and stored in the m/c
by the clinets, is myassumption correct?

@Davide Bianchi: Yep.. I am sorry, thats a typo / copy paste mistake.

I would also like to do this programmatically. Is there any api in
linux which can get these details from a DHCP server?

 
Reply With Quote
 
Giovanni
Guest
Posts: n/a

 
      01-05-2006, 03:26 PM
On 01/05/06 16:37, Gops wrote:
> Can you pls tell me where does the client store those values in the
> m/c? I beleive the ipaddress should be acquired and stored in the m/c
> by the clinets, is myassumption correct?
>
> @Davide Bianchi: Yep.. I am sorry, thats a typo / copy paste mistake.
>
> I would also like to do this programmatically. Is there any api in
> linux which can get these details from a DHCP server?
>


I have dhcpcd as client and it stores informations from the server in
/etc/dhcpc/dhcpcd-<interface>.cache in binary format and
/etc/dhcpc/dhcpcd-<interface>.info in readable text.

But other clients may use different files and format.
I think that you need also to modify your client so it will ask for pop
and smtp services.

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 <http://counter.li.org/>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP combined server&client Stefan Monnier Linux Networking 1 11-16-2007 06:44 PM
DHCP Client not Running in Member Server Raj Windows Networking 1 10-07-2007 03:33 PM
DHCP client still looks for the failed dhcp server for renewal frankcvc Windows Networking 1 11-05-2006 06:30 PM
Redhat 9.0 dhcp client & windows 2003 dhcp server: dynamic dns update Mads Ravn Linux Networking 0 06-29-2004 05:27 PM
DHCP server and client Ravi Windows Networking 1 12-08-2003 10:07 AM



1 2 3 4 5 6 7 8 9 10 11