Weijie Zhang(deleted)
|
RE: help with net.cfg file
|
Weijie Zhang(deleted)
11/18/2008 10:07 AM
post16772
|
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
|
|
|
Tim Gessner
|
Re: help with net.cfg file
|
Tim Gessner
11/18/2008 11:04 AM
post16791
|
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?
|
|
|