Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Specifying Gateway and DNS server for target with static IP address: (4 Items)
   
Specifying Gateway and DNS server for target with static IP address  
I'm stumped and hoping someone can quickly answer this question. Typically I run dhcp.client on my target to dynamically
 get an IP address and the associated Gateway and DNS addresses are automatically assigned from the DHCP server. Now, I 
have a target with a statically assigned IP address but it's not clear to me how I manually assign the Gateway and DNS 
addresses. I know what these addresses should be but I don't know where to configure it manually on QNX (which dhcp.
client seems to do perfectly). Can anyone offer a suggestion?

Thanks . . .
Re: Specifying Gateway and DNS server for target with static IP address  
route add default <gateway ip>

will set the gateway

and

/etc/resolv.conf

contains the domain name and dns servers

Glenn Schmottlach wrote:
> I'm stumped and hoping someone can quickly answer this question. Typically I run dhcp.client on my target to 
dynamically get an IP address and the associated Gateway and DNS addresses are automatically assigned from the DHCP 
server. Now, I have a target with a statically assigned IP address but it's not clear to me how I manually assign the 
Gateway and DNS addresses. I know what these addresses should be but I don't know where to configure it manually on QNX 
(which dhcp.client seems to do perfectly). Can anyone offer a suggestion?
> 
> Thanks . . .
> 
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post31079
> 

-- 
cburgess@qnx.com
Re: Specifying Gateway and DNS server for target with static IP address  
On Mon, Jun 08, 2009 at 09:54:10AM -0400, Glenn Schmottlach wrote:
> I'm stumped and hoping someone can quickly answer this question. Typically I run dhcp.client on my target to 
dynamically get an IP address and the associated Gateway and DNS addresses are automatically assigned from the DHCP 
server. Now, I have a target with a statically assigned IP address but it's not clear to me how I manually assign the 
Gateway and DNS addresses. I know what these addresses should be but I don't know where to configure it manually on QNX 
(which dhcp.client seems to do perfectly). Can anyone offer a suggestion?
> 
> Thanks . . .

# route add default <gateway>

Put the DNS entries in /etc/resolv.conf or the CS_RESOLVE confstr.
See the entry for /etc/resolv.conf under 'r' in the utilities
reference.

Regards,

-seanb
Re: Specifying Gateway and DNS server for target with static IP address  
To manually assign a Gateway, you do:

   # route add default <gateway ip>

To specify DNS address, the easiest is to do:

   # setconf CS_RESOLVE nameserver_<you dns ip>

-xtang

On Mon, 2009-06-08 at 09:54 -0400, Glenn Schmottlach wrote:
> I'm stumped and hoping someone can quickly answer this question.
> Typically I run dhcp.client on my target to dynamically get an IP
> address and the associated Gateway and DNS addresses are automatically
> assigned from the DHCP server. Now, I have a target with a statically
> assigned IP address but it's not clear to me how I manually assign the
> Gateway and DNS addresses. I know what these addresses should be but I
> don't know where to configure it manually on QNX (which dhcp.client
> seems to do perfectly). Can anyone offer a suggestion?
> 
> Thanks . . .
> 
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post31079
> 
> 
>