2010-10-08 00:37:16     ftp problem!!

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-10-08 00:37:16     ftp problem!!

Shyam sundar (INDIA)

Message: 94319   

 

Hello world,

 

I am trying to get a file from a remote server using ftp through a gprs connection.

 

When I connect the modem to PC,establish a gprs connection and try to do a ftp connection with remote server it works.

 

But when I connect the modem to BF537 stamp kit (uclinux) ,establish a gprs connection and try to connect to remote server,I am not able to establish the ftp connection. The resolv.conf is also updated. Any clues?

QuoteReplyEditDelete

 

 

2010-10-08 02:10:02     Re: ftp problem!!

Aaron Wu (CHINA)

Message: 94322   

 

Hi Could you give us more detailed information? Like your operation proccedure and the log info for failure?

QuoteReplyEditDelete

 

 

2010-10-08 06:38:18     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94332   

 

The following gives the info of the kernel image I am using

 

  Image Name:   Linux-2.6.28.10-ADI-2009R1.1-svn                                                                  

   Created:      2010-10-08   9:42:40 UTC                                                                          

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3088283 Bytes =  2.9 MB                                                                           

   Load Address: 00001000

   Entry Point:  00173f80

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 00173f80

Linux version 2.6.28.10-ADI-2009R1.1-svn9124 (tcoe@tcoe-laptop) (gcc version 4.1.2 (ADI svn)) #59 Fri Oct 8 15:12:31 IST 2010

 

I do get a successful gprs connection established

 

When I try to connect to ftp server having a public IP, i do get following message

 

root:/> ftp x.x.x.160

ftp: connect: Connection timed out

ftp>

 

But when i give the following command for resolving a address, i do get proper response

nslookup www.google.com

Server:    10.11.230.2

Address 1: 10.11.230.2 ns1.live.vodafone.in

 

Name:      www.google.com

Address 1: 64.233.189.104 hkg01s01-in-f104.1e100.net

 

I do get connected to ftp server when i use the modem with PC

QuoteReplyEditDelete

 

 

2010-10-08 07:03:31     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94333   

 

I am not able to ping to websites like google.com too !! Does it has to do some settings which i need to modify manually?

QuoteReplyEditDelete

 

 

2010-10-09 02:04:58     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94350   

 

I had added the ip-up and ip-down scripts in the ppp directory

 

The following is the content of the ip-up script

 

#!/bin/sh

 

if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then

    rm -f /etc/ppp/resolv.prev

    if [ -f /etc/resolv.conf ]; then

        cp /etc/resolv.conf /etc/ppp/resolv.prev

        grep domain /etc/ppp/resolv.prev > /etc/resolv.conf

        grep search /etc/ppp/resolv.prev >> /etc/resolv.conf

        cat /etc/ppp/resolv.conf >> /etc/resolv.conf

    else

        cp /etc/ppp/resolv.conf /etc

    fi

fi

 

The following is the content of the ip-down script

 

#!/bin/sh

 

if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then

    if [ -f /etc/ppp/resolv.prev ]; then

        cp -f /etc/ppp/resolv.prev /etc/resolv.conf

    else

        rm -f /etc/resolv.conf

    fi

fi

 

These are the parameters I am using to setup the ppp connection

 

/dev/ttyBF1

9600

crtscts

defaultroute

usepeerdns

lcp-echo-failure 0

lcp-echo-interval 0

proxyarp

ipcp-accept-remote

nodetach

debug

local

noipdefault

file /etc/ppp/options

connect "/usr/sbin/chat -v -f /etc/ppp/peers/chat/gprs-connect"

 

I am stuck at this point :(!!

 

The GPRS connectivity is successful, I am not able to execute any network application!!

 

Can anybody please tell me where i am going wrong?

QuoteReplyEditDelete

 

 

2010-10-09 11:53:12     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94364   

 

Hi Aaron,

 

What other information do i need to provide?

QuoteReplyEditDelete

 

 

2010-10-09 12:00:43     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94365   

 

Is there any bug being created during the ppp connection phase?

 

I do see a folder called patches in the directory user/pppd.

 

Do i need to update this patch manually? Totally not getting any clue !!

QuoteReplyEditDelete

 

 

2010-10-10 07:03:27     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94385   

 

Any solution for this?

 

root:/> iptables -L

iptables v1.4.0: can't initialize iptables table `filter': Will be implemented real soon.  I promise

Perhaps iptables or your kernel needs to be upgraded.

 

I am using 2009R1.1-svn9124

QuoteReplyEditDelete

 

 

2010-10-10 14:06:09     Re: ftp problem!!

Mike Frysinger (UNITED STATES)

Message: 94389   

 

you need to enable iptables supprt in the kernel if you want to actually use it

QuoteReplyEditDelete

 

 

2010-10-11 02:51:14     Re: ftp problem!!

Sonic Zhang (CHINA)

Message: 94391   

 

Could you run ifconfig and paste the log here after you connect to the modem successfully?

QuoteReplyEditDelete

 

 

2010-10-11 07:21:32     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94404   

 

Hi Sonic Zhang,

 

This how the ppp connection gets established

 

root:/> pppd call gprs-setup &

221

root:/> Serial connection established.

using channel 2

Using interface ppp0

Connect: ppp0 <--> /dev/ttyBF1

rcvd [LCP ConfReq id=0xf <mru 1600> <auth pap> <magic 0xc3c65c9> <asyncmap 0x0> <pcomp> <accomp>]

Warning - secret file /etc/ppp/pap-secrets has world and/or group access

sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4ddd3f2f> <pcomp> <accomp>]

No auth is possible

sent [LCP ConfRej id=0xf <auth pap>]

rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4ddd3f2f> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x10 <mru 1600> <magic 0xc3c65c9> <asyncmap 0x0> <pcomp> <accomp>]

sent [LCP ConfAck id=0x10 <mru 1600> <magic 0xc3c65c9> <asyncmap 0x0> <pcomp> <accomp>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]

rcvd [LCP ConfReq id=0x11 <mru 1600> <auth pap> <magic 0xc3c65c9> <asyncmap 0x0> <pcomp> <accomp>]

Warning - secret file /etc/ppp/pap-secrets has world and/or group access

sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x37423d2b> <pcomp> <accomp>]

No auth is possible

sent [LCP ConfRej id=0x11 <auth pap>]

rcvd [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0x37423d2b> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x12 <mru 1600> <magic 0xc3c65c9> <asyncmap 0x0> <pcomp> <accomp>]

sent [LCP ConfAck id=0x12 <mru 1600> <magic 0xc3c65c9> <asyncmap 0x0> <pcomp> <accomp>]

sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]

sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]

sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]

rcvd [IPCP ConfRej id=0x2 <compress VJ 0f 01>]

sent [IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]

rcvd [IPCP ConfNak id=0x3 <addr 10.17.141.124> <ms-dns1 10.11.230.2> <ms-dns3 10.11.230.3>]

sent [IPCP ConfReq id=0x4 <addr 10.17.141.124> <ms-dns1 10.11.230.2> <ms-dns3 10.11.230.3>]

rcvd [IPCP ConfReq id=0x2 <addr 10.0.0.1>]

sent [IPCP ConfAck id=0x2 <addr 10.0.0.1>]

rcvd [IPCP ConfAck id=0x4 <addr 10.17.141.124> <ms-dns1 10.11.230.2> <ms-dns3 10.11.230.3>]

local  IP address 10.17.141.124

remote IP address 10.0.0.1

primary   DNS address 10.11.230.2

secondary DNS address 10.11.230.3

Script /etc/ppp/ip-up started (pid 237)

Script /etc/ppp/ip-up finished (pid 237), status = 0x0

 

This is how my ifconfig looks after ppp connection

 

root:/> ifconfig

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

ppp0      Link encap:Point-to-Point Protocol

          inet addr:10.17.141.124  P-t-P:10.0.0.1  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1

          RX packets:4 errors:1 dropped:0 overruns:0 frame:0

          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3

          RX bytes:64 (64.0 B)  TX bytes:166 (166.0 B)

 

 

 

This is how the IP routing table looks like

 

root:/> route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.0.0.1        0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0

 

 

QuoteReplyEditDelete

 

 

2010-10-12 00:28:23     Re: ftp problem!!

Sonic Zhang (CHINA)

Message: 94414   

 

Can you ping your DNS server at 10.11.230.2?

 

Could you also show your /etc/resolve.conf here?

QuoteReplyEditDelete

 

 

2010-10-12 01:26:49     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94415   

 

Hi Sonic,

 

I am able to ping both the DNS servers !! But not able to ping the remote 10.0.0.1

 

After the ppp connection my resolv.conf looks like this

 

root:/> cat etc/resolv.conf

nameserver 10.11.230.2

nameserver 10.11.230.3

 

I even tried setting the default gateway to 10.0.0.1 by using the command

 

route add default gw 10.0.0.1

Is there something I am missing?

 

I have observed one thing,

 

When I didnt get any response during the ping operation and gave the command Control+C,

 

the PPP connection got terminated. But this should have only killed the ping application.Is this some problem?

QuoteReplyEditDelete

 

 

2010-10-12 01:44:58     Re: ftp problem!!

Mike Frysinger (UNITED STATES)

Message: 94416   

 

10.x.x.x networks are all local IPs.  how exactly they're configured is completely specific to the network you're connected to.  their are no "howtos" for how to properly configure the network with an arbitrary ISP.  you need to find a working system, find the network settings it is using, and replicate it.  or ask your ISP how things are supposed to be working.  nor is there any requirement whatsoever that any random machine be reachable by ICMP packets.

QuoteReplyEditDelete

 

 

2010-10-12 01:55:38     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94417   

 

Hi Mike,

 

I do agree that 10.x.x.x series are local IPs.When I use the same modem with the Linux PC (Ubuntu 10.2) I am able to ping websites like google.com, rediff.com etc. Also I can make a ftp connection to a public IP.

 

What are the other network settings I am suppposed to modify?

QuoteReplyEditDelete

 

 

2010-10-14 06:09:51     Re: ftp problem!!

Shyam sundar (INDIA)

Message: 94508   

 

Problem got solved !!

It was the problem with ISP! I changed the ISP and things worked !

 

Thanks a lot everyone !!

Attachments

    Outcomes