Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Capturing PPP packets with out port number: (13 Items)
   
Capturing PPP packets with out port number  
Hi 

We have network consisting of three systems.

A - source 
B - acting as router
C - destination

Between A-B we have UDP running over ethernet. Between B-C we need PPP over serail port.

Once ppp server and client are estbalished between B and C the IP address of C will be sent to A. which means all three 
systems have defined IP, B will have 2 one on ehternet port and another for Serail port.

Now task is 

1. when A trasmit packet with destiantion IP address of C, B should capture that and channel it through Serail port over
 PPP protocol - for this we are planning to edit routing table of A so that for packets destianted toward C, B will act 
as router. i.e from A the next hop for packets realted to C will be B - let me your comments

2. C is a third party system we dont have any control on it expect assignning IP, Initially we thought we will use 
socket progamming to tranmsit and receive paskets between B and C, but we dont have any data of port number of C. 

please let me know is there any way where i can capture raw packets destainted to an IP irrespective of port number. 
simialrly how to send a packets to an Ip with out using scoket program and Port number.


thanks
Ravi
Re: Capturing PPP packets with out port number  
PPP already have this feature to help you, it called "proxyarp". :)

When B assign IP address to C, maker sure it assign an IP in same network of A and B. B also need "proxyarp" option for 
it's PPPD command line.

It woks like this.

When A try to talk to C, since the IP is on same network, A will ARP. B will see this ARP, and even though it is not B's
 IP, B will response. This way, A will send all it's C destination packet to B, B will then forward it.

Of cause you need to make sure forwarding is enabled on B.

-xtang

----- Original Message -----
From: ravi varma <community-noreply@qnx.com>
To: technology-networking <post16061@community.qnx.com>
Sent: Thu Nov 06 07:20:04 2008
Subject: Capturing PPP packets with out port number

Hi 

We have network consisting of three systems.

A - source 
B - acting as router
C - destination

Between A-B we have UDP running over ethernet. Between B-C we need PPP over serail port.

Once ppp server and client are estbalished between B and C the IP address of C will be sent to A. which means all three 
systems have defined IP, B will have 2 one on ehternet port and another for Serail port.

Now task is 

1. when A trasmit packet with destiantion IP address of C, B should capture that and channel it through Serail port over
 PPP protocol - for this we are planning to edit routing table of A so that for packets destianted toward C, B will act 
as router. i.e from A the next hop for packets realted to C will be B - let me your comments

2. C is a third party system we dont have any control on it expect assignning IP, Initially we thought we will use 
socket progamming to tranmsit and receive paskets between B and C, but we dont have any data of port number of C. 

please let me know is there any way where i can capture raw packets destainted to an IP irrespective of port number. 
simialrly how to send a packets to an Ip with out using scoket program and Port number.


thanks
Ravi

_______________________________________________
Technology
http://community.qnx.com/sf/go/post16061

Re: Capturing PPP packets with out port number  
Hi Xtang 

thanks for quick reponse, here is update for you
ip address of A : 192.168.0.51,B: 192.168.0.31, B: is running on VMware virtaul machine where card Ip is 192.168.0.11.

and on On B i executed follwoing command:

pppd/dev/ser1 proxyarp 115200 192.168.0.35:192.168.0.45

On C: pppd /dev/ser1 115200 ..after this B and C got IP'S confgiured for PPP. The rotuing table of B has follwoing 
entries.

# route -v show
Routing tables

Internet:
Destination       Gateway            Flags
localhost.localdo 127.0.0.1          UH
192.168.0.0       link#2             U
192.168.0.11      00:80:ad:83:92:a6  UH
192.168.0.35      192.168.0.35       UH
192.168.0.45      192.168.0.35       UH
192.168.0.45      00:0c:29:ea:f4:a4  UH

after doing this i tried to ping from A to C - but it didnt happened, what i need to enable forwarding on B.

Also let me know 

thanks
Ravi 

> PPP already have this feature to help you, it called "proxyarp". :)
> 
> When B assign IP address to C, maker sure it assign an IP in same network of A
>  and B. B also need "proxyarp" option for it's PPPD command line.
> 
> It woks like this.
> 
> When A try to talk to C, since the IP is on same network, A will ARP. B will 
> see this ARP, and even though it is not B's IP, B will response. This way, A 
> will send all it's C destination packet to B, B will then forward it.
> 
> Of cause you need to make sure forwarding is enabled on B.
> 
> -xtang
> 
> ----- Original Message -----
> From: ravi varma <community-noreply@qnx.com>
> To: technology-networking <post16061@community.qnx.com>
> Sent: Thu Nov 06 07:20:04 2008
> Subject: Capturing PPP packets with out port number
> 
> Hi 
> 
> We have network consisting of three systems.
> 
> A - source 
> B - acting as router
> C - destination
> 
> Between A-B we have UDP running over ethernet. Between B-C we need PPP over 
> serail port.
> 
> Once ppp server and client are estbalished between B and C the IP address of C
>  will be sent to A. which means all three systems have defined IP, B will have
>  2 one on ehternet port and another for Serail port.
> 
> Now task is 
> 
> 1. when A trasmit packet with destiantion IP address of C, B should capture 
> that and channel it through Serail port over PPP protocol - for this we are 
> planning to edit routing table of A so that for packets destianted toward C, B
>  will act as router. i.e from A the next hop for packets realted to C will be 
> B - let me your comments
> 
> 2. C is a third party system we dont have any control on it expect assignning 
> IP, Initially we thought we will use socket progamming to tranmsit and receive
>  paskets between B and C, but we dont have any data of port number of C. 
> 
> please let me know is there any way where i can capture raw packets destainted
>  to an IP irrespective of port number. simialrly how to send a packets to an 
> Ip with out using scoket program and Port number.
> 
> 
> thanks
> Ravi
> 
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post16061
> 


RE: Capturing PPP packets with out port number  
First, after failed to ping C, do a "arp -na" on A see if it find the
mac address of C (actually B). If not, we have problem in "proxyarp", we
need to fix this first. 

If A do have C in its ARP entry, then:

The C need to be started as:

	pppd /dev/ser1 115200 defaultroute

This way, C will always sent return packet to B.

For forwarding, try "sysctl -w net.inet.ip.forwarding=1".

-xtang

> -----Original Message-----
> From: ravi varma [mailto:community-noreply@qnx.com] 
> Sent: Thursday, November 06, 2008 9:35 AM
> To: technology-networking
> Subject: Re: Capturing PPP packets with out port number
> 
> Hi Xtang 
> 
> thanks for quick reponse, here is update for you ip address 
> of A : 192.168.0.51,B: 192.168.0.31, B: is running on VMware 
> virtaul machine where card Ip is 192.168.0.11.
> 
> and on On B i executed follwoing command:
> 
> pppd/dev/ser1 proxyarp 115200 192.168.0.35:192.168.0.45
> 
> On C: pppd /dev/ser1 115200 ..after this B and C got IP'S 
> confgiured for PPP. The rotuing table of B has follwoing entries.
> 
> # route -v show
> Routing tables
> 
> Internet:
> Destination       Gateway            Flags
> localhost.localdo 127.0.0.1          UH
> 192.168.0.0       link#2             U
> 192.168.0.11      00:80:ad:83:92:a6  UH
> 192.168.0.35      192.168.0.35       UH
> 192.168.0.45      192.168.0.35       UH
> 192.168.0.45      00:0c:29:ea:f4:a4  UH
> 
> after doing this i tried to ping from A to C - but it didnt 
> happened, what i need to enable forwarding on B.
> 
> Also let me know 
> 
> thanks
> Ravi 
> 
> > PPP already have this feature to help you, it called "proxyarp". :)
> > 
> > When B assign IP address to C, maker sure it assign an IP in same 
> > network of A  and B. B also need "proxyarp" option for it's 
> PPPD command line.
> > 
> > It woks like this.
> > 
> > When A try to talk to C, since the IP is on same network, A 
> will ARP. 
> > B will see this ARP, and even though it is not B's IP, B will 
> > response. This way, A will send all it's C destination 
> packet to B, B will then forward it.
> > 
> > Of cause you need to make sure forwarding is enabled on B.
> > 
> > -xtang
> > 
> > ----- Original Message -----
> > From: ravi varma <community-noreply@qnx.com>
> > To: technology-networking <post16061@community.qnx.com>
> > Sent: Thu Nov 06 07:20:04 2008
> > Subject: Capturing PPP packets with out port number
> > 
> > Hi
> > 
> > We have network consisting of three systems.
> > 
> > A - source
> > B - acting as router
> > C - destination
> > 
> > Between A-B we have UDP running over ethernet. Between B-C 
> we need PPP 
> > over serail port.
> > 
> > Once ppp server and client are estbalished between B and C the IP 
> > address of C  will be sent to A. which means all three systems have 
> > defined IP, B will have
> >  2 one on ehternet port and another for Serail port.
> > 
> > Now task is
> > 
> > 1. when A trasmit packet with destiantion IP address of C, B should 
> > capture that and channel it through Serail port over PPP protocol - 
> > for this we are planning to edit routing table of A so that for 
> > packets destianted toward C, B  will act as router. i.e from A the 
> > next hop for packets realted to C will be B - let me your comments
> > 
> > 2. C is a third party system we dont have any control on it expect 
> > assignning IP, Initially we thought we will use socket 
> progamming to 
> > tranmsit and receive  paskets between B and C, but we dont...
View Full Message
Re: RE: Capturing PPP packets with out port number  
Hi Xtang 

thanks for your comment. Its working now i am able to ping from A to C. By doing arp -na i am able to see mac adddrss of
 B for both ip's.

192.168.0.31
192.168.0.45 ... 

Coming on to my second question in actual system configuration C is a third party system we dont have any control on it 
expect assignning IP, 

Normally i use socket program to send and receive packets from/to Ip which need specific port number. 

Since we made default route in C as PPP, i can think that C might accept packet when send with any port number. But how 
cna i receive packet from C with a scoket program running in A, i dont have any clue of which port number to attach to 
socket. 

thanks 
Ravi 





> First, after failed to ping C, do a "arp -na" on A see if it find the
> mac address of C (actually B). If not, we have problem in "proxyarp", we
> need to fix this first. 
> 
> If A do have C in its ARP entry, then:
> 
> The C need to be started as:
> 
> 	pppd /dev/ser1 115200 defaultroute
> 
> This way, C will always sent return packet to B.
> 
> For forwarding, try "sysctl -w net.inet.ip.forwarding=1".
> 
> -xtang
> 
> > -----Original Message-----
> > From: ravi varma [mailto:community-noreply@qnx.com] 
> > Sent: Thursday, November 06, 2008 9:35 AM
> > To: technology-networking
> > Subject: Re: Capturing PPP packets with out port number
> > 
> > Hi Xtang 
> > 
> > thanks for quick reponse, here is update for you ip address 
> > of A : 192.168.0.51,B: 192.168.0.31, B: is running on VMware 
> > virtaul machine where card Ip is 192.168.0.11.
> > 
> > and on On B i executed follwoing command:
> > 
> > pppd/dev/ser1 proxyarp 115200 192.168.0.35:192.168.0.45
> > 
> > On C: pppd /dev/ser1 115200 ..after this B and C got IP'S 
> > confgiured for PPP. The rotuing table of B has follwoing entries.
> > 
> > # route -v show
> > Routing tables
> > 
> > Internet:
> > Destination       Gateway            Flags
> > localhost.localdo 127.0.0.1          UH
> > 192.168.0.0       link#2             U
> > 192.168.0.11      00:80:ad:83:92:a6  UH
> > 192.168.0.35      192.168.0.35       UH
> > 192.168.0.45      192.168.0.35       UH
> > 192.168.0.45      00:0c:29:ea:f4:a4  UH
> > 
> > after doing this i tried to ping from A to C - but it didnt 
> > happened, what i need to enable forwarding on B.
> > 
> > Also let me know 
> > 
> > thanks
> > Ravi 
> > 
> > > PPP already have this feature to help you, it called "proxyarp". :)
> > > 
> > > When B assign IP address to C, maker sure it assign an IP in same 
> > > network of A  and B. B also need "proxyarp" option for it's 
> > PPPD command line.
> > > 
> > > It woks like this.
> > > 
> > > When A try to talk to C, since the IP is on same network, A 
> > will ARP. 
> > > B will see this ARP, and even though it is not B's IP, B will 
> > > response. This way, A will send all it's C destination 
> > packet to B, B will then forward it.
> > > 
> > > Of cause you need to make sure forwarding is enabled on B.
> > > 
> > > -xtang
> > > 
> > > ----- Original Message -----
> > > From: ravi varma <community-noreply@qnx.com>
> > > To: technology-networking <post16061@community.qnx.com>
> > > Sent: Thu Nov 06 07:20:04 2008
> > > Subject: Capturing PPP packets with out port number
> > > 
> > > Hi
> > > 
> > > We have network consisting of three systems.
> > > 
> > > A - source
> >...
View Full Message
RE: RE: Capturing PPP packets with out port number  
Hi Ravi,

I am not sure I follow you.

"port number" is a UDP/TCP thing, "routing" is an IP thing.

By setting "defaultroute" on C, you tell C that "to reach A (or to reach
anybody), send the packet to B".  So when you ping, telnet, ... from A
to C, the "return packet" that C want  to send back to A, will all goes
to B. And of cause, B knows how to route it back to A.

"defaultroute" is a very normal option on ppp. Because from C's point of
view, B is his only way to get to internet. 

If you really don't have any control of C, and C is not setting up any
proper routing table to allow A to access it. You have other options:

1) If both A and B are QNX, then there is QNET

2) if only B is QNX, then you need NAT (network address translate). 

Regards,
-xtang

> -----Original Message-----
> From: ravi varma [mailto:community-noreply@qnx.com] 
> Sent: Friday, November 07, 2008 6:40 AM
> To: technology-networking
> Subject: Re: RE: Capturing PPP packets with out port number
> 
> Hi Xtang 
> 
> thanks for your comment. Its working now i am able to ping 
> from A to C. By doing arp -na i am able to see mac adddrss of 
> B for both ip's.
> 
> 192.168.0.31
> 192.168.0.45 ... 
> 
> Coming on to my second question in actual system 
> configuration C is a third party system we dont have any 
> control on it expect assignning IP, 
> 
> Normally i use socket program to send and receive packets 
> from/to Ip which need specific port number. 
> 
> Since we made default route in C as PPP, i can think that C 
> might accept packet when send with any port number. But how 
> cna i receive packet from C with a scoket program running in 
> A, i dont have any clue of which port number to attach to socket. 
> 
> thanks
> Ravi 
> 
> 
> 
> 
> 
> > First, after failed to ping C, do a "arp -na" on A see if 
> it find the
> > mac address of C (actually B). If not, we have problem in 
> "proxyarp", we
> > need to fix this first. 
> > 
> > If A do have C in its ARP entry, then:
> > 
> > The C need to be started as:
> > 
> > 	pppd /dev/ser1 115200 defaultroute
> > 
> > This way, C will always sent return packet to B.
> > 
> > For forwarding, try "sysctl -w net.inet.ip.forwarding=1".
> > 
> > -xtang
> > 
> > > -----Original Message-----
> > > From: ravi varma [mailto:community-noreply@qnx.com] 
> > > Sent: Thursday, November 06, 2008 9:35 AM
> > > To: technology-networking
> > > Subject: Re: Capturing PPP packets with out port number
> > > 
> > > Hi Xtang 
> > > 
> > > thanks for quick reponse, here is update for you ip address 
> > > of A : 192.168.0.51,B: 192.168.0.31, B: is running on VMware 
> > > virtaul machine where card Ip is 192.168.0.11.
> > > 
> > > and on On B i executed follwoing command:
> > > 
> > > pppd/dev/ser1 proxyarp 115200 192.168.0.35:192.168.0.45
> > > 
> > > On C: pppd /dev/ser1 115200 ..after this B and C got IP'S 
> > > confgiured for PPP. The rotuing table of B has follwoing entries.
> > > 
> > > # route -v show
> > > Routing tables
> > > 
> > > Internet:
> > > Destination       Gateway            Flags
> > > localhost.localdo 127.0.0.1          UH
> > > 192.168.0.0       link#2             U
> > > 192.168.0.11      00:80:ad:83:92:a6  UH
> > > 192.168.0.35      192.168.0.35       UH
> > > 192.168.0.45      192.168.0.35       UH
> > > 192.168.0.45      00:0c:29:ea:f4:a4  UH
> > > 
> > > after doing this i tried to ping from A to C - but it didnt...
View Full Message
Re: RE: RE: Capturing PPP packets with out port number  
Hi 

Sorry if it confused you, what i am aksing is from program point of view.
See A will be sending messages some of which are specific to B and some are specific to C. So i will enable forwarding 
in B so that all messages related to C will be forwarded to C. 

My question is : Now from A point of view if i need to receive or transmit messages to C through a socket program, how 
can i do that with out knowing port number of C. Since in socket program we require port number to sent or receive UDP 
frames. 

Is there any approcah to send/Receive packets at raw level where Port number will not come into picture.

Thanks
Ravi

> Hi Ravi,
> 
> I am not sure I follow you.
> 
> "port number" is a UDP/TCP thing, "routing" is an IP thing.
> 
> By setting "defaultroute" on C, you tell C that "to reach A (or to reach
> anybody), send the packet to B".  So when you ping, telnet, ... from A
> to C, the "return packet" that C want  to send back to A, will all goes
> to B. And of cause, B knows how to route it back to A.
> 
> "defaultroute" is a very normal option on ppp. Because from C's point of
> view, B is his only way to get to internet. 
> 
> If you really don't have any control of C, and C is not setting up any
> proper routing table to allow A to access it. You have other options:
> 
> 1) If both A and B are QNX, then there is QNET
> 
> 2) if only B is QNX, then you need NAT (network address translate). 
> 
> Regards,
> -xtang
> 
> > -----Original Message-----
> > From: ravi varma [mailto:community-noreply@qnx.com] 
> > Sent: Friday, November 07, 2008 6:40 AM
> > To: technology-networking
> > Subject: Re: RE: Capturing PPP packets with out port number
> > 
> > Hi Xtang 
> > 
> > thanks for your comment. Its working now i am able to ping 
> > from A to C. By doing arp -na i am able to see mac adddrss of 
> > B for both ip's.
> > 
> > 192.168.0.31
> > 192.168.0.45 ... 
> > 
> > Coming on to my second question in actual system 
> > configuration C is a third party system we dont have any 
> > control on it expect assignning IP, 
> > 
> > Normally i use socket program to send and receive packets 
> > from/to Ip which need specific port number. 
> > 
> > Since we made default route in C as PPP, i can think that C 
> > might accept packet when send with any port number. But how 
> > cna i receive packet from C with a scoket program running in 
> > A, i dont have any clue of which port number to attach to socket. 
> > 
> > thanks
> > Ravi 
> > 
> > 
> > 
> > 
> > 
> > > First, after failed to ping C, do a "arp -na" on A see if 
> > it find the
> > > mac address of C (actually B). If not, we have problem in 
> > "proxyarp", we
> > > need to fix this first. 
> > > 
> > > If A do have C in its ARP entry, then:
> > > 
> > > The C need to be started as:
> > > 
> > > 	pppd /dev/ser1 115200 defaultroute
> > > 
> > > This way, C will always sent return packet to B.
> > > 
> > > For forwarding, try "sysctl -w net.inet.ip.forwarding=1".
> > > 
> > > -xtang
> > > 
> > > > -----Original Message-----
> > > > From: ravi varma [mailto:community-noreply@qnx.com] 
> > > > Sent: Thursday, November 06, 2008 9:35 AM
> > > > To: technology-networking
> > > > Subject: Re: Capturing PPP packets with out port number
> > > > 
> > > > Hi Xtang 
> > > > 
> > > > thanks for quick reponse, here is update for you ip address 
> > > >...
View Full Message
RE: RE: RE: Capturing PPP packets with out port number  
I think that you're asking a very different question here.  This is
solely at the application level and is at your discretion.  The "normal"
mechanism for doing this is to use a "well known" port for your service
(that is, you pick a port that both the server and client use).  You
could use raw IP but that bypasses all of the advantages of using the
higher layer protocols.

	R.


-----Original Message-----
From: ravi varma [mailto:community-noreply@qnx.com] 
Sent: Monday, November 10, 2008 2:02 AM
To: technology-networking
Subject: Re: RE: RE: Capturing PPP packets with out port number

Hi 

Sorry if it confused you, what i am aksing is from program point of
view.
See A will be sending messages some of which are specific to B and some
are specific to C. So i will enable forwarding in B so that all messages
related to C will be forwarded to C. 

My question is : Now from A point of view if i need to receive or
transmit messages to C through a socket program, how can i do that with
out knowing port number of C. Since in socket program we require port
number to sent or receive UDP frames. 

Is there any approcah to send/Receive packets at raw level where Port
number will not come into picture.

Thanks
Ravi

> Hi Ravi,
> 
> I am not sure I follow you.
> 
> "port number" is a UDP/TCP thing, "routing" is an IP thing.
> 
> By setting "defaultroute" on C, you tell C that "to reach A (or to
reach
> anybody), send the packet to B".  So when you ping, telnet, ... from A
> to C, the "return packet" that C want  to send back to A, will all
goes
> to B. And of cause, B knows how to route it back to A.
> 
> "defaultroute" is a very normal option on ppp. Because from C's point
of
> view, B is his only way to get to internet. 
> 
> If you really don't have any control of C, and C is not setting up any
> proper routing table to allow A to access it. You have other options:
> 
> 1) If both A and B are QNX, then there is QNET
> 
> 2) if only B is QNX, then you need NAT (network address translate). 
> 
> Regards,
> -xtang
> 
> > -----Original Message-----
> > From: ravi varma [mailto:community-noreply@qnx.com] 
> > Sent: Friday, November 07, 2008 6:40 AM
> > To: technology-networking
> > Subject: Re: RE: Capturing PPP packets with out port number
> > 
> > Hi Xtang 
> > 
> > thanks for your comment. Its working now i am able to ping 
> > from A to C. By doing arp -na i am able to see mac adddrss of 
> > B for both ip's.
> > 
> > 192.168.0.31
> > 192.168.0.45 ... 
> > 
> > Coming on to my second question in actual system 
> > configuration C is a third party system we dont have any 
> > control on it expect assignning IP, 
> > 
> > Normally i use socket program to send and receive packets 
> > from/to Ip which need specific port number. 
> > 
> > Since we made default route in C as PPP, i can think that C 
> > might accept packet when send with any port number. But how 
> > cna i receive packet from C with a scoket program running in 
> > A, i dont have any clue of which port number to attach to socket. 
> > 
> > thanks
> > Ravi 
> > 
> > 
> > 
> > 
> > 
> > > First, after failed to ping C, do a "arp -na" on A see if 
> > it find the
> > > mac address of C (actually B). If not, we have problem in 
> > "proxyarp", we
> > > need to fix this first. 
> > > 
> > > If A do have C in its ARP entry, then:
> > > 
> > > The C need to be started as:
> > > 
> > > 	pppd /dev/ser1 115200 defaultroute
> > > 
> > > This way, C will always sent return packet to B.
> > >...
View Full Message
Re: RE: RE: RE: Capturing PPP packets with out port number  
Hi 

thanks, i got the solution. since B is transparently passing messages among A and C, this is fine for me. of late i came
 to know that vendor will support sofware in A which will communciate with C, so internally they might be fixing the 
port number to be same on both sides.

Thnaks for your support.

Ravi 

> I think that you're asking a very different question here.  This is
> solely at the application level and is at your discretion.  The "normal"
> mechanism for doing this is to use a "well known" port for your service
> (that is, you pick a port that both the server and client use).  You
> could use raw IP but that bypasses all of the advantages of using the
> higher layer protocols.
> 
> 	R.
> 
> 
> -----Original Message-----
> From: ravi varma [mailto:community-noreply@qnx.com] 
> Sent: Monday, November 10, 2008 2:02 AM
> To: technology-networking
> Subject: Re: RE: RE: Capturing PPP packets with out port number
> 
> Hi 
> 
> Sorry if it confused you, what i am aksing is from program point of
> view.
> See A will be sending messages some of which are specific to B and some
> are specific to C. So i will enable forwarding in B so that all messages
> related to C will be forwarded to C. 
> 
> My question is : Now from A point of view if i need to receive or
> transmit messages to C through a socket program, how can i do that with
> out knowing port number of C. Since in socket program we require port
> number to sent or receive UDP frames. 
> 
> Is there any approcah to send/Receive packets at raw level where Port
> number will not come into picture.
> 
> Thanks
> Ravi
> 
> > Hi Ravi,
> > 
> > I am not sure I follow you.
> > 
> > "port number" is a UDP/TCP thing, "routing" is an IP thing.
> > 
> > By setting "defaultroute" on C, you tell C that "to reach A (or to
> reach
> > anybody), send the packet to B".  So when you ping, telnet, ... from A
> > to C, the "return packet" that C want  to send back to A, will all
> goes
> > to B. And of cause, B knows how to route it back to A.
> > 
> > "defaultroute" is a very normal option on ppp. Because from C's point
> of
> > view, B is his only way to get to internet. 
> > 
> > If you really don't have any control of C, and C is not setting up any
> > proper routing table to allow A to access it. You have other options:
> > 
> > 1) If both A and B are QNX, then there is QNET
> > 
> > 2) if only B is QNX, then you need NAT (network address translate). 
> > 
> > Regards,
> > -xtang
> > 
> > > -----Original Message-----
> > > From: ravi varma [mailto:community-noreply@qnx.com] 
> > > Sent: Friday, November 07, 2008 6:40 AM
> > > To: technology-networking
> > > Subject: Re: RE: Capturing PPP packets with out port number
> > > 
> > > Hi Xtang 
> > > 
> > > thanks for your comment. Its working now i am able to ping 
> > > from A to C. By doing arp -na i am able to see mac adddrss of 
> > > B for both ip's.
> > > 
> > > 192.168.0.31
> > > 192.168.0.45 ... 
> > > 
> > > Coming on to my second question in actual system 
> > > configuration C is a third party system we dont have any 
> > > control on it expect assignning IP, 
> > > 
> > > Normally i use socket program to send and receive packets 
> > > from/to Ip which need specific port number. 
> > > 
> > > Since we made default route in C as PPP, i can think that C 
> > > might accept packet when send with any port number. But how 
> > > cna i receive packet from C...
View Full Message
Re: RE: RE: RE: Capturing PPP packets with out port number  
Hi 

i am facing probelm with port forwarding. As discussed in earlier post 

We have network consisting of three systems. A - source, B - acting as router, C - destination.

A ip: 192.168.0.31, B IP:192.168.0.51

Between A-B we have UDP running over ethernet. Between B-C 
we need PPP over serail port. i used  
pppd/dev/ser1 proxyarp 115200 192.168.0.61:192.168.0.62 between B and C. and on C : 
pppd/dev/ser1 proxyarp 115200 defaultroute

and i also enabled port forwarding by sysctl -w net.inet.ip.forwarding=1
Earlier i was able to do ftp from A to C, but suddenly i am not sure what happened i am not even able to ping from A to 
C, when i checked 
arp -na on A i am able to see entry of C as 

? (192.168.0.62) ar 00:12:3f:2d:31:2c on en0 ... the MAc addr shown is that of B's ethernet port, which is hope is 
correct.

route table in B has entry 

dest                  Gateway                     flags
192.168.0.65     00:12:3f:2d:31:2c        UH

it is same MAC addr of ethernet port.

I also observed by doing ping -r 192.168.0.62 from A for which i am getting:

36 bytes  from 192.168.0.51: Time to Live exceeded for icmp_seq=0..
which is making me to think that forwarding is done properly... is there any thing that i need to do ?, or any other way
.

i tried traceroute etc but it was abel to trace from A tol B, moreover i am not sure it is applicale to ppp over serial 
link.

thanks
Ravi


> > > > > > > 
> > > > > > > Once ppp server and client are estbalished between B 
> > > > and C the IP 
> > > > > > > address of C  will be sent to A. which means all three 
> > > > systems have 
> > > > > > > defined IP, B will have
> > > > > > >  2 one on ehternet port and another for Serail port.
> > > > > > > 
> > > > > > > Now task is



> Hi 
> 
> thanks, i got the solution. since B is transparently passing messages among A 
> and C, this is fine for me. of late i came to know that vendor will support 
> sofware in A which will communciate with C, so internally they might be fixing
>  the port number to be same on both sides.
> 
> Thnaks for your support.
> 
> Ravi 
> 
> > I think that you're asking a very different question here.  This is
> > solely at the application level and is at your discretion.  The "normal"
> > mechanism for doing this is to use a "well known" port for your service
> > (that is, you pick a port that both the server and client use).  You
> > could use raw IP but that bypasses all of the advantages of using the
> > higher layer protocols.
> > 
> > 	R.
> > 
> > 
> > -----Original Message-----
> > From: ravi varma [mailto:community-noreply@qnx.com] 
> > Sent: Monday, November 10, 2008 2:02 AM
> > To: technology-networking
> > Subject: Re: RE: RE: Capturing PPP packets with out port number
> > 
> > Hi 
> > 
> > Sorry if it confused you, what i am aksing is from program point of
> > view.
> > See A will be sending messages some of which are specific to B and some
> > are specific to C. So i will enable forwarding in B so that all messages
> > related to C will be forwarded to C. 
> > 
> > My question is : Now from A point of view if i need to receive or
> > transmit messages to C through a socket program, how can i do that with
> > out knowing port number of C. Since in socket program we require port
> > number to sent or receive UDP frames. 
> > 
> > Is there any approcah to send/Receive packets at raw level where Port
> > number will not come into picture.
> > 
> > Thanks
> > Ravi
> > 
> > > Hi Ravi,
> >...
View Full Message
RE: RE: RE: RE: Capturing PPP packets with out port number  
What do you're routing tables look like for each host?
(route show)

 	Robert.

-----Original Message-----
From: ravi varma [mailto:community-noreply@qnx.com] 
Sent: Monday, December 01, 2008 8:11 AM
To: technology-networking
Subject: Re: RE: RE: RE: Capturing PPP packets with out port number

Hi 

i am facing probelm with port forwarding. As discussed in earlier post 

We have network consisting of three systems. A - source, B - acting as
router, C - destination.

A ip: 192.168.0.31, B IP:192.168.0.51

Between A-B we have UDP running over ethernet. Between B-C we need PPP
over serail port. i used
pppd/dev/ser1 proxyarp 115200 192.168.0.61:192.168.0.62 between B and C.
and on C : 
pppd/dev/ser1 proxyarp 115200 defaultroute

and i also enabled port forwarding by sysctl -w net.inet.ip.forwarding=1
Earlier i was able to do ftp from A to C, but suddenly i am not sure
what happened i am not even able to ping from A to C, when i checked arp
-na on A i am able to see entry of C as 

? (192.168.0.62) ar 00:12:3f:2d:31:2c on en0 ... the MAc addr shown is
that of B's ethernet port, which is hope is correct.

route table in B has entry 

dest                  Gateway                     flags
192.168.0.65     00:12:3f:2d:31:2c        UH

it is same MAC addr of ethernet port.

I also observed by doing ping -r 192.168.0.62 from A for which i am
getting:

36 bytes  from 192.168.0.51: Time to Live exceeded for icmp_seq=0..
which is making me to think that forwarding is done properly... is there
any thing that i need to do ?, or any other way.

i tried traceroute etc but it was abel to trace from A tol B, moreover i
am not sure it is applicale to ppp over serial link.

thanks
Ravi


> > > > > > > 
> > > > > > > Once ppp server and client are estbalished between B
> > > > and C the IP
> > > > > > > address of C  will be sent to A. which means all three
> > > > systems have
> > > > > > > defined IP, B will have
> > > > > > >  2 one on ehternet port and another for Serail port.
> > > > > > > 
> > > > > > > Now task is



> Hi
> 
> thanks, i got the solution. since B is transparently passing messages 
> among A and C, this is fine for me. of late i came to know that vendor

> will support sofware in A which will communciate with C, so internally

> they might be fixing  the port number to be same on both sides.
> 
> Thnaks for your support.
> 
> Ravi
> 
> > I think that you're asking a very different question here.  This is 
> > solely at the application level and is at your discretion.  The
"normal"
> > mechanism for doing this is to use a "well known" port for your 
> > service (that is, you pick a port that both the server and client 
> > use).  You could use raw IP but that bypasses all of the advantages 
> > of using the higher layer protocols.
> > 
> > 	R.
> > 
> > 
> > -----Original Message-----
> > From: ravi varma [mailto:community-noreply@qnx.com]
> > Sent: Monday, November 10, 2008 2:02 AM
> > To: technology-networking
> > Subject: Re: RE: RE: Capturing PPP packets with out port number
> > 
> > Hi
> > 
> > Sorry if it confused you, what i am aksing is from program point of 
> > view.
> > See A will be sending messages some of which are specific to B and 
> > some are specific to C. So i will enable forwarding in B so that all

> > messages related to C will be forwarded to C.
> > 
> > My question is : Now from A point of view if i need to receive or 
> > transmit messages to C through a socket program, how can i do that 
> > with out knowing port number of C. Since in...
View Full Message
Re: RE: RE: RE: Capturing PPP packets with out port number  
Can you "ping -n 192.168.0.62" from B ?

C is standalone, and do not have other Ethernet connection does it?

To find out the detail, we probably need "netstat -ni" and "netstat -nr" output from all 3 machines.

-xtang

> Hi 
> 
> i am facing probelm with port forwarding. As discussed in earlier post 
> 
> We have network consisting of three systems. A - source, B - acting as router,
>  C - destination.
> 
> A ip: 192.168.0.31, B IP:192.168.0.51
> 
> Between A-B we have UDP running over ethernet. Between B-C 
> we need PPP over serail port. i used  
> pppd/dev/ser1 proxyarp 115200 192.168.0.61:192.168.0.62 between B and C. and 
> on C : 
> pppd/dev/ser1 proxyarp 115200 defaultroute
> 
> and i also enabled port forwarding by sysctl -w net.inet.ip.forwarding=1
> Earlier i was able to do ftp from A to C, but suddenly i am not sure what 
> happened i am not even able to ping from A to C, when i checked 
> arp -na on A i am able to see entry of C as 
> 
> ? (192.168.0.62) ar 00:12:3f:2d:31:2c on en0 ... the MAc addr shown is that of
>  B's ethernet port, which is hope is correct.
> 
> route table in B has entry 
> 
> dest                  Gateway                     flags
> 192.168.0.65     00:12:3f:2d:31:2c        UH
> 
> it is same MAC addr of ethernet port.
> 
> I also observed by doing ping -r 192.168.0.62 from A for which i am getting:
> 
> 36 bytes  from 192.168.0.51: Time to Live exceeded for icmp_seq=0..
> which is making me to think that forwarding is done properly... is there any 
> thing that i need to do ?, or any other way.
> 
> i tried traceroute etc but it was abel to trace from A tol B, moreover i am 
> not sure it is applicale to ppp over serial link.
> 
> thanks
> Ravi
Re: RE: RE: RE: Capturing PPP packets with out port number  
Hi 

I added new route in routing table of C, i observed even though i am enabling C as  pppd/dev/ser1 proxyarp 115200 
defaultroute the default route chosen is for some other ip address than A, so i added new route 

route add ipA ipb  , ip b is ip of serail port ruuning on PPP..it is working now..but thanks for suggesting "netstat -ni
" and "netstat -nr" they were helpful in debugging

Thanks
Ravi 



> Can you "ping -n 192.168.0.62" from B ?
> 
> C is standalone, and do not have other Ethernet connection does it?
> 
> To find out the detail, we probably need "netstat -ni" and "netstat -nr" 
> output from all 3 machines.
> 
> -xtang
> 
> > Hi 
> > 
> > i am facing probelm with port forwarding. As discussed in earlier post 
> > 
> > We have network consisting of three systems. A - source, B - acting as 
> router,
> >  C - destination.
> > 
> > A ip: 192.168.0.31, B IP:192.168.0.51
> > 
> > Between A-B we have UDP running over ethernet. Between B-C 
> > we need PPP over serail port. i used  
> > pppd/dev/ser1 proxyarp 115200 192.168.0.61:192.168.0.62 between B and C. and
>  
> > on C : 
> > pppd/dev/ser1 proxyarp 115200 defaultroute
> > 
> > and i also enabled port forwarding by sysctl -w net.inet.ip.forwarding=1
> > Earlier i was able to do ftp from A to C, but suddenly i am not sure what 
> > happened i am not even able to ping from A to C, when i checked 
> > arp -na on A i am able to see entry of C as 
> > 
> > ? (192.168.0.62) ar 00:12:3f:2d:31:2c on en0 ... the MAc addr shown is that 
> of
> >  B's ethernet port, which is hope is correct.
> > 
> > route table in B has entry 
> > 
> > dest                  Gateway                     flags
> > 192.168.0.65     00:12:3f:2d:31:2c        UH
> > 
> > it is same MAC addr of ethernet port.
> > 
> > I also observed by doing ping -r 192.168.0.62 from A for which i am getting:
> 
> > 
> > 36 bytes  from 192.168.0.51: Time to Live exceeded for icmp_seq=0..
> > which is making me to think that forwarding is done properly... is there any
>  
> > thing that i need to do ?, or any other way.
> > 
> > i tried traceroute etc but it was abel to trace from A tol B, moreover i am 
> 
> > not sure it is applicale to ppp over serial link.
> > 
> > thanks
> > Ravi