Using DHCP Client to get a POP server

Using DHCP Client to get a POP server

Post by Gops » Fri, 06 Jan 2006 21:29:47



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,

 
 
 

Using DHCP Client to get a POP server

Post by Gops » Fri, 06 Jan 2006 21:55:27


Quote:> 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.. )

 
 
 

Using DHCP Client to get a POP server

Post by Gops » Fri, 06 Jan 2006 22:17:15


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.

 
 
 

Using DHCP Client to get a POP server

Post by Giovann » Fri, 06 Jan 2006 22:58:04



Quote:> 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/>

 
 
 

Using DHCP Client to get a POP server

Post by chris-use.. » Fri, 06 Jan 2006 22:22:21



>> 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.

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

Chris

 
 
 

Using DHCP Client to get a POP server

Post by Gops » Sat, 07 Jan 2006 00:37:55


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?

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

 
 
 

Using DHCP Client to get a POP server

Post by Giovann » Sat, 07 Jan 2006 01:26:26



> 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?


> 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/>

 
 
 

Using DHCP Client to get a POP server

Post by Postmaste » Sat, 07 Jan 2006 05:18:52



> 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?


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

Gops,

    You could have your dhcp server provide the clients
    with more information ?   like this:

Inside of /etc/dhcpd.conf:

option domain-name-servers 192.168.0.254;  <<< name server >>
option domain-name "foo.org";                        <<< Domain name >>
option nntp-server 179.35.49.11;                    <<< News server >>
option ntp-servers 122.5.42.41;                      <<< Time server >>
option pop-server 116.43.130.10;                  <<< Pop server >>
option smtp-server 116.43.130.8;                   <<< SMTP mail server>>>

Enjoy,
Postmaster

 
 
 

Using DHCP Client to get a POP server

Post by Gops » Sat, 07 Jan 2006 10:10:29


Quote:> I think that you need also to modify your client so it will ask for pop
> and smtp services.

I also hope so. The file doesnt contain information about the POP
server or SMTP server. I am hoping to know what should I modify so that
the client will get those information.

as some VxWorks machines can retrive these information. But, I couldnt
see those information / dont know where to look for those information
in Linux. Do we need to set some option to DHCP client to get those
information?
 
 
 

Using DHCP Client to get a POP server

Post by Eric Moor » Sat, 07 Jan 2006 16:05:56



>> I think that you need also to modify your client so it will ask for pop
>> and smtp services.

> I also hope so. The file doesnt contain information about the POP
> server or SMTP server. I am hoping to know what should I modify so that
> the client will get those information.


> as some VxWorks machines can retrive these information. But, I couldnt
> see those information / dont know where to look for those information
> in Linux. Do we need to set some option to DHCP client to get those
> information?

I would suspect you need to add a line like this in your dhclient.conf
request option pop-server,smtp-server

But it's all just from the manpages. I don't have a dhcp server available to
test this with.

Eric

 
 
 

1. 3com 905b gets Ip address by using DHCP from NT DHCP server

Hi,

I have a 3com 905b, which FreeBSD make this device as xl0. I tried get the
IP address from a DHCP server on WinNT4 server(build 1381, sp4).  I can get
the IP address when booting FreeBSD up. But when expire inteval coming up,
FreeBSD cannot get IP from  NT4 again. I tried to ping each other, and ping
result is negative. Could some one give me a suggestion to deal with this
situation. Thank you

PS: WinNT 4 is working functionally and properly.

Jerry

2. I have to change OS to Windows98, help me!

3. dhcpcd-0.6 - DHCP client daemon, gets client IP address and more

4. Enthusiasm is BAD!!!

5. Using DHCP server but missing gateway address on clients

6. Problems with rlogin & .rhosts-file

7. DHCP Linux Client at NT-DHCP Server

8. UNIX File System

9. Sunray as DHCP client to NT DHCP server

10. Redhat 9.0 dhcp client & windows 2003 dhcp server: dynamic dns update

11. Setting up a linux dhcp client with a win98 dhcp server??

12. trouble with AIX dhcp client / Cisco dhcp server

13. How DHCP Client can auto set a static IP, when connect to DHCP Server fail ?