Return To Sender - "Bad Address" Error
"Bad Address" Error |
Internet working, everything seems to be fine.
Then suddenly, something comes up, you try something different and then it happens - you can't connect to the web! Trying to debug, you open a terminal and type ping www.yahoo.com and your terminal spits out a "bad address" error. Same with google or any site on the web.
Has this happened to you? Ready to give up and start from the live-cd again? Well,
hold on, don't give up, not just yet. Read on, and you could be back online in a matter of minutes!
Let me explain how I ended up in la la land. I use the Nokia N73 phone which also doubles as my modem. I plug the data cable, select the [PC Suite] option from among 5 options. I used to do this every single time I connected to the web.
Then somehow I discovered the [Data Cable] icon from the [Tools] folder of my N73 which does a one-time configuration of how I want to connect permanently once I choose it. This suppresses the prompt so I can just plug my phone and start the pupdial program.
Overcome with excitement, I wanted to jump a step further and explore a way to
configure pupdial so I would start dialing in as soon as I plug in without having
to open pupdial. This didn't look as easy as I thought so I was trying the other
connectivity tools and somehow messed up the Internet connectivity. So now, pupdial connects successfully as before, but I cannot go online however hard I try!
Back to where we started, I type www.yahoo.com and get the "BAD ADDRESS" error thrown at me.
Embarking on a wild goose chase for solving this problem, I first downloaded and installed an older version of pupdial, which did not have the
[Access Point] input box but everything else the same as the one in Lucid 510 but for this, and this one did exactly the same. Pupdial connected but I could not browse the web. When I tried to uninstall, there was no entry in the PPM for this older pupdial pet. I finally ended up copying a good pupdial script from a good /usr/sbin and copied it to my current /usr/sbin. I remembered to verify the other dependencies and made sure it was okay.
Dismayed and discouraged after some more testing, I finally found that /etc/resolv.conf somehow got messed up. Actually a link to this file from /etc/ppp was also broken, so I deleted these, created a new /etc/resolv.conf file with 2 lines for the nameservers that I copied from backup that look like this.
nameserver nnn.nnn.nn.nn
nameserver nnn.nnn.nn.nn
[Just remember that for dynamically ISP assigned IPs, the /etc/resolv.conf and a link to it from /etc/ppp get modified by pupdial upon a successful connection and for static IPs, you can create it with the appropriate IPs manually.
Note1: Many thanks to Barry and the great puppy community, especially the forums. From BK's readme's:
".../etc/resolv.conf
This has your ISP's domain name servers (DNSs). Normally, these will be supplied automatically by the ISP and this file will be written to during the connection ..."
Note2: Also from Bk's readme's:
"...When you make a connection to the ISP, by typing "ppp -c" the file "resolv.conf" will get automatically updated with the DNSs (assuming IP addresses are dynamically assigned by the ISP) -- otherwise you will have to edit this file...".
I restarted pupdial, and pressed the connect button and wonder of wonders, pupdial took over, created the other required files and links and this time there was no "bad address" error when I tried to ping www.yahoo.com. Trust pupdial to get you to the net!
Steps I followed: [These are unique to my Lucid 510 puppy, yours may be different!]
1.ifconfig -a [check ppp0 here if you're using dialup/ppp]
2.ifconfig eth0 down [bring down eth0]
3.ifconfig eth0 up [restart eth0. Steps 2 and 3 may not be necessary, I think.]
4.ls -lstr `find / -iname "*resolv.conf*"` [That's a backtick before the find command and also at eol. Get a time-sorted, latest-at-bottom display of all resolv.conf files in your system. Just for information-optional]
5.rm /etc/resolv.conf
rm /etc/ppp/resolv.conf [Removed /etc/resolv.conf and the link to it from /etc/ppp. Save this file if you can before deleting anyway]
6.vi /etc/resolv.conf [created resolv.conf and put the 2 nameserver entries here from backup with the vi editor, you could use geany or others if you like. [You don't have to, if the nameservers from your ISP are dynamic; actually, in the live-cd, the /etc/resolv.conf file is empty and there is a link to this from /etc/ppp. Pupdial populates the /etc/resolv.conf from ISPs when it makes a successful connection]
7.pupdial [connect as usual, pupdial recreates all ppp-related dependencies,
and lets you connect to the web]
Lost your Internet connectivity all of a sudden? Resolve the resolv.conf issue first!