|
||||||||
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
> 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.. ) |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
> 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 |
|
#7
|
|||
|
|||
|
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." |
|
#8
|
|||
|
|||
|
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/> |
|
#9
|
|||
|
|||
|
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? |
|
#10
|
|||
|
|||
|
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/> |
![]() |
| Tags |
| client, dhcp, pop, server |
| Thread Tools | |
| Display Modes | |
|
|