lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] How to test IP over PPP ?


From: Marc Boucher
Subject: Re: [lwip-users] How to test IP over PPP ?
Date: Tue, 2 Dec 2003 15:47:20 -0500
User-agent: Mutt/1.5.1i

Hallo Peter,

On Tue, Dec 02, 2003 at 07:41:24PM +0100, Peter Graf wrote:
> Jani Monoses wrote:
> 
> >> >what does tcpdump show?
> >> Since file access is problematic on my target, I had disabled tcpdump.
> >
> >I meant tcpdump -i ppp0 on your host but as you say you sniffed the
> >serial port.
> 
> Yes. My vague guess is that something in the PPP negotiation packets isn't 
> correctly sent or received on big endian targets.

I have just tested lwIP's PPP on a big-endian machine (PPC) and it works
just fine.

By the way, lwIP's PPP is very easy to test with a single Linux machine by
simply doing a 'make' under contrib/ports/unix/proj/unixsim and then
running "./simhost"
This will establish a virtual PPP link between the lwIP process and the
local machine by spawning the Linux pppd on a pseudo tty (pty).
If the virtual connection is successfully established, you should see a ppp
interface on your linux machine with local address 192.168.1.1 and remote
address 192.168.1.2. The latter is lwIP's address which you can ping and
even telnet to:

# ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
[...]
7: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc pfifo_fast qlen 3
    link/ppp
    inet 192.168.1.1 peer 192.168.1.2/32 scope global ppp0

# telnet 192.168.1.2
Trying 192.168.1.2...
Connected to 192.168.1.2.
Escape character is '^]'.

lwIP simple interactive shell.
(c) Copyright 2001, Swedish Institute of Computer Science.
Written by Adam Dunkels.
For help, try the "help" command.
> help
Available commands:
open [IP address] [TCP port]: opens a TCP connection to the specified
address.
lstn [TCP port]: sets up a server on the specified port.
acpt [connection #]: waits for an incoming connection request.
send [connection #] [message]: sends a message on a TCP connection.
udpc [local UDP port] [IP address] [remote port]: opens a UDP
"connection".
udpl [local UDP port] [IP address] [remote port]: opens a UDP-Lite
"connection".
udpn [local UDP port] [IP address] [remote port]: opens a UDP
"connection" without checksums.
udpb [local port] [remote port]: opens a UDP broadcast "connection".
usnd [connection #] [message]: sends a message on a UDP connection.
recv [connection #]: recieves data on a TCP or UDP connection.
clos [connection #]: closes a TCP or UDP connection.
stat: prints out lwIP statistics.
quit: quits.



> Here are the debug logs. As have little knowledge about PPP, a hint what 
> this actually means is welcome.

It looks like your target isn't receiving anything; just continuously sending
LCP Configure-Request packets and timing out waiting for the response.

Viele Grüße
Marc

> 
> Thanks,
> Peter
> --
> 
> lwIP side:
> 
> lcp_init: xmit_accm=0 0 0 0
> upap_init: 0
> lcp_init: xmit_accm=0 0 0 0
> pppMain: unit 0: Connecting
> pppStartCB: unit 0
> ppp_set_xaccm[0]: outACCM=0 0 0 0
> ppp_send_config[0]: outACCM=FF FF FF FF
> ppp_recv_config[0]: inACCM=0 0 0 0
> lcp_lowerup: asyncmap=0 0 0 0
> LCP: lowerup state 0 -> 2
> auth_reset: 0
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: sending Configure-Request, id 1
> LCP: open state 2 -> 6
> LCP: timeout resending Config-Request state=6
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: sending Configure-Request, id 1
> LCP: timeout resending Config-Request state=6
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: sending Configure-Request, id 1
> LCP: timeout resending Config-Request state=6
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: sending Configure-Request, id 1
> LCP: timeout resending Config-Request state=6
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: sending Configure-Request, id 1
> LCP: timeout resending Config-Request state=6
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: sending Configure-Request, id 1
> LCP: timeout resending Config-Request state=6
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: sending Configure-Request, id 1
> LCP: timeout resending Config-Request state=6
> lcp_addci: L opt=2 0
> lcp_addci: L opt=5 44101852
> lcp_addci: opt=7
> lcp_addci: opt=8
> pppWrite[0]: len=47
> fsm_sdata(LCP): Sent code 1,1,20.
> LCP: send
> 
> ----------------------------------------------------------------------------
> Linux side ( /var/log/messages )
> 
> Sep 14 20:42:55 pg kernel: PPP generic driver version 2.4.1
> Sep 14 20:42:55 pg pppd[1169]: pppd 2.4.1 started by root, uid 0
> Sep 14 20:42:55 pg pppd[1169]: Using interface ppp0
> Sep 14 20:42:55 pg pppd[1169]: Connect: ppp0 <--> /dev/ttyS2
> Sep 14 20:43:25 pg pppd[1169]: LCP: timeout sending Config-Requests
> Sep 14 20:43:25 pg pppd[1169]: Connection terminated.
> Sep 14 20:43:25 pg pppd[1169]: Exit.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]