Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Using DHCP Client to get a POP server

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2006, 12:29 PM
Default Using DHCP Client to get a POP server



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,



Gops
Reply With Quote
  #2  
Old 01-05-2006, 12:38 PM
Davide Bianchi
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

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
  #3  
Old 01-05-2006, 12:55 PM
Gops
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

> 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
  #4  
Old 01-05-2006, 01:07 PM
Davide Bianchi
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

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
  #5  
Old 01-05-2006, 01:17 PM
Gops
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

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
  #6  
Old 01-05-2006, 01:22 PM
chris-usenet@roaima.co.uk
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

> 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
  #7  
Old 01-05-2006, 01:26 PM
Davide Bianchi
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

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
  #8  
Old 01-05-2006, 01:58 PM
Giovanni
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

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
  #9  
Old 01-05-2006, 03:37 PM
Gops
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

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
  #10  
Old 01-05-2006, 04:26 PM
Giovanni
Guest
 
Posts: n/a
Default Re: Using DHCP Client to get a POP server

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

Tags
client, dhcp, pop, server

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
Forum Jump


All times are GMT. The time now is 06:19 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.