Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - help with net.cfg file: (11 Items)
   
help with net.cfg file  
I need to set the default gateway in my net.cfg file.  I am not using Photon so I have been manually editing the file.

I haven't found any documentation on this file but have been able to get things working, just need the default gateway 
at this point.

Does anyone know what the syntax is for that?

Thanx
Tim
RE: help with net.cfg file  
There are three sections

1) version: The v1.2 and earlier are supported currently. 
	"version v1.2" 
2) globles: start with [globe]
   For example,
       [global]
        route 1.2.3.4 0.0.0.0
   So, in above, the default gateway is 1.2.3.4 (because the mask is
0.0.0.0)
3) interface: start with [your_nic_name]
   For example,
	 [en0]
       type ethernet 
       manual_ip 1.2.3.5
   So, the en0 is a wired ethernet card. We want it be manually
configured to ip address of 1.2.3.5.

So the above you have the following in your net.cfg

version v1.2
[global]
Route 1.2.3.4 0.0.0.0
[en0]
type ethernet
manual_ip 1.2.3.5

You may check the code under utils/n/netmanager/ for details. 

Thanks
Weijie


-----Original Message-----
From: Tim Gessner [mailto:community-noreply@qnx.com] 
Sent: November 18, 2008 9:47 AM
To: general-networking
Subject: help with net.cfg file

I need to set the default gateway in my net.cfg file.  I am not using
Photon so I have been manually editing the file.

I haven't found any documentation on this file but have been able to get
things working, just need the default gateway at this point.

Does anyone know what the syntax is for that?

Thanx
Tim

_______________________________________________
General
http://community.qnx.com/sf/go/post16766
RE: help with net.cfg file  
As a side note... The netmanager source is available on the Foundry at
http://community.qnx.com/integration/viewcvs/viewcvs.cgi/trunk/utils/n/n
etmanager/?root=core_networking&system=exsy1001

So even though it's an undocumented interface (and one that I personally
find rather ummm... unpleasant (that's the purist in me speaking)), you
can figure it all out from there anyway.

	R.


 

-----Original Message-----
From: Weijie Zhang [mailto:community-noreply@qnx.com] 
Sent: Tuesday, November 18, 2008 10:08 AM
To: general-networking
Subject: RE: help with net.cfg file

There are three sections

1) version: The v1.2 and earlier are supported currently. 
	"version v1.2" 
2) globles: start with [globe]
   For example,
       [global]
        route 1.2.3.4 0.0.0.0
   So, in above, the default gateway is 1.2.3.4 (because the mask is
0.0.0.0)
3) interface: start with [your_nic_name]
   For example,
	 [en0]
       type ethernet 
       manual_ip 1.2.3.5
   So, the en0 is a wired ethernet card. We want it be manually
configured to ip address of 1.2.3.5.

So the above you have the following in your net.cfg

version v1.2
[global]
Route 1.2.3.4 0.0.0.0
[en0]
type ethernet
manual_ip 1.2.3.5

You may check the code under utils/n/netmanager/ for details. 

Thanks
Weijie


-----Original Message-----
From: Tim Gessner [mailto:community-noreply@qnx.com]
Sent: November 18, 2008 9:47 AM
To: general-networking
Subject: help with net.cfg file

I need to set the default gateway in my net.cfg file.  I am not using
Photon so I have been manually editing the file.

I haven't found any documentation on this file but have been able to get
things working, just need the default gateway at this point.

Does anyone know what the syntax is for that?

Thanx
Tim

_______________________________________________
General
http://community.qnx.com/sf/go/post16766


_______________________________________________
General
http://community.qnx.com/sf/go/post16772
Re: RE: help with net.cfg file  
Thanx
Re: RE: help with net.cfg file  
Thanx.
Re: help with net.cfg file  
Interestingly I tried the route option but it doesn't seem to work.  If I set up the intereface as DHCP it works.  It 
doesn't seem to want to route correctly when set manually.

the 192.168.76.1 device is a router.  from another machine (running linux) 192.168.76.3 I can successfully route to 192.
168.0.2, but from the qnx box I can't route.

Here is my file
# nto network config file v1.2
version v1.2

[global]
hostname cadrepc
domain deltacompsys.com
nameserver 192.168.0.2
nameserver 192.168.0.1
route 192.168.76.1 0.0.0.0 0.0.0.0

[en0]
type ethernet
mode manual
manual_ip 192.168.76.2
manual_netmask 255.255.255.0

[en1]
type ethernet
mode manual
manual_ip 192.168.75.100
manual_netmask 255.255.255.0 

any thoughts?
RE: help with net.cfg file  
If you set things up without netmanager, does it work?    What does
"route show" give you?

There's also a little bit of me that's curious as to why you'd want to
use netmanager.  It's really a configuration tool that allows phlip (the
photon network configuration tool) to maintain state.  All of this
information is easily configured through the command line (and in an
easier manner than going through netmanager)...

	Robert. 

-----Original Message-----
From: Tim Gessner [mailto:community-noreply@qnx.com] 
Sent: Tuesday, November 18, 2008 11:04 AM
To: general-networking
Subject: Re: help with net.cfg file

Interestingly I tried the route option but it doesn't seem to work.  If
I set up the intereface as DHCP it works.  It doesn't seem to want to
route correctly when set manually.

the 192.168.76.1 device is a router.  from another machine (running
linux) 192.168.76.3 I can successfully route to 192.168.0.2, but from
the qnx box I can't route.

Here is my file
# nto network config file v1.2
version v1.2

[global]
hostname cadrepc
domain deltacompsys.com
nameserver 192.168.0.2
nameserver 192.168.0.1
route 192.168.76.1 0.0.0.0 0.0.0.0

[en0]
type ethernet
mode manual
manual_ip 192.168.76.2
manual_netmask 255.255.255.0

[en1]
type ethernet
mode manual
manual_ip 192.168.75.100
manual_netmask 255.255.255.0 

any thoughts?

_______________________________________________
General
http://community.qnx.com/sf/go/post16791
Re: RE: help with net.cfg file  
The reason for netmanager is the x86 runtime kit uses it.  I had intended to replace diskmanager and netmanager but I'm 
running out of time at this point.

route show shows the default route 192.168.76.1 when using dhcp but does not show that route when manually configured 
with route 192.168.76.1 0.0.0.0 0.0.0.0

Tim
RE: RE: help with net.cfg file  
Just to make sure that routing is working, if you do
"route add 192.168.76.1 default"
From the command line, does that work for you?


I also have to ask the obvious question, did you run netmanager after
you modified the file?  (I've tried it here and it seems to work
fine...)

	R.



-----Original Message-----
From: Tim Gessner [mailto:community-noreply@qnx.com] 
Sent: Tuesday, November 18, 2008 11:23 AM
To: general-networking
Subject: Re: RE: help with net.cfg file

The reason for netmanager is the x86 runtime kit uses it.  I had
intended to replace diskmanager and netmanager but I'm running out of
time at this point.

route show shows the default route 192.168.76.1 when using dhcp but does
not show that route when manually configured with route 192.168.76.1
0.0.0.0 0.0.0.0

Tim

_______________________________________________
General
http://community.qnx.com/sf/go/post16802
RE: RE: help with net.cfg file  
Actually I restart the computer after making the changes.  The system is
being used for testing at the moment so I'll try adding the route
manually as soon as I get a chance.

Thanx
Tim

-----Original Message-----
From: Robert Craig [mailto:community-noreply@qnx.com] 
Sent: Tuesday, November 18, 2008 8:32 AM
To: general-networking
Subject: RE: RE: help with net.cfg file


Just to make sure that routing is working, if you do
"route add 192.168.76.1 default"
From the command line, does that work for you?


I also have to ask the obvious question, did you run netmanager after
you modified the file?  (I've tried it here and it seems to work
fine...)

	R.



-----Original Message-----
From: Tim Gessner [mailto:community-noreply@qnx.com] 
Sent: Tuesday, November 18, 2008 11:23 AM
To: general-networking
Subject: Re: RE: help with net.cfg file

The reason for netmanager is the x86 runtime kit uses it.  I had
intended to replace diskmanager and netmanager but I'm running out of
time at this point.

route show shows the default route 192.168.76.1 when using dhcp but does
not show that route when manually configured with route 192.168.76.1
0.0.0.0 0.0.0.0

Tim

_______________________________________________
General
http://community.qnx.com/sf/go/post16802


_______________________________________________
General
http://community.qnx.com/sf/go/post16804
RE: RE: help with net.cfg file  
The fact that the route show doesn't show the default route indicates
that something's broken in there anyway...  I wonder if the syntax is
really picky?  If you mofiy the file and then run netmanager, that will
have pretty much the same effect as re-starting and it will let you
check out the change immediately.

Is there a single space in between each token in the string?

route 192.168.76.1 0.0.0.0 0.0.0.0


	R.


-----Original Message-----
From: Tim Gessner [mailto:community-noreply@qnx.com] 
Sent: Tuesday, November 18, 2008 2:15 PM
To: general-networking
Subject: RE: RE: help with net.cfg file

Actually I restart the computer after making the changes.  The system is
being used for testing at the moment so I'll try adding the route
manually as soon as I get a chance.

Thanx
Tim

-----Original Message-----
From: Robert Craig [mailto:community-noreply@qnx.com]
Sent: Tuesday, November 18, 2008 8:32 AM
To: general-networking
Subject: RE: RE: help with net.cfg file


Just to make sure that routing is working, if you do
"route add 192.168.76.1 default"
From the command line, does that work for you?


I also have to ask the obvious question, did you run netmanager after
you modified the file?  (I've tried it here and it seems to work
fine...)

	R.



-----Original Message-----
From: Tim Gessner [mailto:community-noreply@qnx.com] 
Sent: Tuesday, November 18, 2008 11:23 AM
To: general-networking
Subject: Re: RE: help with net.cfg file

The reason for netmanager is the x86 runtime kit uses it.  I had
intended to replace diskmanager and netmanager but I'm running out of
time at this point.

route show shows the default route 192.168.76.1 when using dhcp but does
not show that route when manually configured with route 192.168.76.1
0.0.0.0 0.0.0.0

Tim

_______________________________________________
General
http://community.qnx.com/sf/go/post16802


_______________________________________________
General
http://community.qnx.com/sf/go/post16804


_______________________________________________
General
http://community.qnx.com/sf/go/post16823