Dean Petty
Dean Petty

Reputation: 31

Adding a route or default gateway to QNX

We have a system running QNX that normally connects to two other hosts on a 10.10.X.0 network. We are installing two remote systems that need to be able to talk to those servers on our 56.x.y.z network.

We can type:

route -n add 56.x.y.0/24 56.a.b.1 (2nd addr is the gateway)

It shows up in the routing table (route -f) and all works fine. The problem is when the system is rebooted of course it goes away. We need to make it persistent by creating or adding that line to some file that runs at boot-up. Sounds simple enough - like autoexec.bat in DOS. Or we just need to add a default gateway somehow as in Windows.

Thanks for any help.

Upvotes: 3

Views: 6809

Answers (2)

pmod
pmod

Reputation: 11007

netmanager will use /etc/net.cfg file to configure network including routing table on boot, so it's the way to setup static routes and keep them persistent.

However, to avoid mistakes and simplify configuration, there is phlip GUI utility to add/remove configurations to/from that file.

Obviously, in case of embedded QNX (e.g. part of DRIVE OS), one needs to put "route add " commands into some script file and invoke it from one of platform configuration file on /proc/boot/

Upvotes: 0

dvasanth
dvasanth

Reputation: 1377

You can run the route command with '-p' so the routes are persistent after boot. Check this article on it: http://technet.microsoft.com/en-us/library/cc757323(v=ws.10).aspx

Upvotes: -1

Related Questions