but it’s very strange that only one channel can be created,for example if i
set as above i can ping to 10.50.23.4,but i can’t ping to 10.50.22.4,if i exchange A and B,i can ping to 10.50.22.4,but i can’t ping to 10.50.23.4,i don’t know the reason,please help me,thanks.
I’m a little unsure of whether this is the problem, but the leading bit of your first byte (10) is 0. According to en.wikipedia.org/wiki/Classful_network, this means you are using a Class A network. While you should be able to subnet this, I’m not sure if you are doing it properly. Maybe if you use the “MASK” argument with route, specifying the subnet mask it will work better?
Your commands above do not have a subnet mask listed. By default, a class C network would have the mask 255.255.255.0, but you are not using a class C network. You are using a class A network, which by default has the mask 255.0.0.0. I’m not 100% sure about this, but if you changed your IP’s to 192.168.. I think the problem would disappear.
Do you mean that I should change as below?
Well no, if anything you would use 255.255.255.0 as the mask, but I don’t think that will work either.
I can’t find documentation that shows the route command using a mask parameter.
I think you would have to setup the mask with ifconfig.
Let me try again, you say you are trying to connect different IP addresses through different gateways.
I think the problem is that both of those IP addresses are on the same class A network. Let me make
an analogy that might help.
Let’s say you want to connect to 192.168.1.1 through gateway 1, and 192.168.1.2 through gateway 2.
Unsurprisingly, you can only create on channel, because as far as the underlying software is concerned,
both of these IP are on the same class C network. Does that help?
I don’t know how to fix this if you insist on using a class A network, but there no doubt is a way.
maschoen,Do you mean that I should setup only one channel of one gateway for IP 10.62.0.9 AND 10.62.66.81?
route add 10.50.23.4 10.62.0.14 //A
route add 10.50.22.4 10.62.66.94 //B
SHOULD CHANGED AS
route add 10.50.23.4 10.62.0.14
route add 10.50.22.4 10.62.0.14
OR
route add 10.50.23.4 10.62.66.94
route add 10.50.22.4 10.62.66.94
To the first question, no.
To the second question, no they can belong to different sub-nets, but they are part of the same net.
Why don’t you take noc’s advice and post the results.
noc,i do just as you say,both of the two gatway is binded to en1(i use netstat -rn to look the interface),normally it should be binded to en1 and en2,it is the same as i set before,why?
it’s strange that if I change the 10.x.x.x to another network,it can work,maschoen, it’s not that i insist on using A network,indeed, it 's customer’s request.Is it possible for the request?
oh,my god,I found it’s ok on complete QNX,by the way I make my own small system by using my build file,Do I lost some config?I have copy all file of /etc on QNX that is OK to my system,but it’s no use,Which should i change?please give me some advice.