Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Applying new netmask and gateway to tsec0 interface on HW: (4 Items)
   
Applying new netmask and gateway to tsec0 interface on HW  
Hi,

I'm trying to boot QNX 6.4.1 kernel on a powerquic 8548 processor board.

At present I configure IPAddress (ipaddr), Netmask (netmask) and Gateway IP (gatewayip) via Uboot and then in the QNX 
kernel apply ONLY the IP address on bootup.

The values I'm currently configuring in Uboot are as follows:

ipaddr 192.168.18.31
netmask 255.255.252.0
gatewayip 192.168.16.1

When I boot QNX the correct IP address of 192.168.18.31 gets assigned to interface tsec0. However, QNX seems to assign a
 default netmask of 255.255.255.0 (0xffffff00). As a result I cant connect to the gateway IP and cant route to the rest 
of my network.

I've tried changing the netmask at the QNX command line (ifconfig tsec0 netmask 0xfffffc00) but this does not change, 
even though the command is accepted.

My question therefore, is where must I configure these settings if I want the correct netmask to persist, and what is 
the correct command for doing so?


Thanks,
Danny
Re: Applying new netmask and gateway to tsec0 interface on HW  
On Wed, Nov 11, 2009 at 01:10:55PM -0500, Daniel Fearon wrote:
> Hi,
> 
> I'm trying to boot QNX 6.4.1 kernel on a powerquic 8548 processor board.
> 
> At present I configure IPAddress (ipaddr), Netmask (netmask) and Gateway IP (gatewayip) via Uboot and then in the QNX 
kernel apply ONLY the IP address on bootup.
> 
> The values I'm currently configuring in Uboot are as follows:
> 
> ipaddr 192.168.18.31
> netmask 255.255.252.0
> gatewayip 192.168.16.1
> 
> When I boot QNX the correct IP address of 192.168.18.31 gets assigned to interface tsec0. However, QNX seems to assign
 a default netmask of 255.255.255.0 (0xffffff00). As a result I cant connect to the gateway IP and cant route to the 
rest of my network.
> 
> I've tried changing the netmask at the QNX command line (ifconfig tsec0 netmask 0xfffffc00) but this does not change, 
even though the command is accepted.
> 
> My question therefore, is where must I configure these settings if I want the correct netmask to persist, and what is 
the correct command for doing so?
> 

Netmasks are applied to addresses, not interfaces:

# ifconfig tsec0 192.168.18.31 netmask 0xfffffc00
# ifconfig tsec0 192.168.18.31/22

-seanb
Re: Applying new netmask and gateway to tsec0 interface on HW  
Hi Sean,

Thanks for the update - that worked perfectly.

One other question is then how can I add my default gateway of 192.168.16.1 as per the configuration listed originally?

One thing to note is that the QNX implementation I'm using does not have the "route" option, therefore I need to use an 
alternative command if one is available.


Thanks,
Danny
Re: Applying new netmask and gateway to tsec0 interface on HW  
On Thu, Nov 12, 2009 at 04:26:18AM -0500, Daniel Fearon wrote:
> Hi Sean,
> 
> Thanks for the update - that worked perfectly.
> 
> One other question is then how can I add my default gateway of 192.168.16.1 as per the configuration listed originally
?
> 
> One thing to note is that the QNX implementation I'm using does not have the "route" option, therefore I need to use 
an alternative command if one is available.

You should have the 'route' utility:

# route add default 192.168.16.1
# route get default

Regards,

-seanb