Tuesday, December 05, 2006
BSNL broadband using Linux
BSNL DataOne provides broadband services using ADSL. They provided me with a Sterlite modem that can be used for pppoe (since it is configured to operate in pure bridged mode). While only windows is supported officially, it is easy to use this modem with Linux. I am using OpenSUSE 10.1 on my laptop. The details for configuration are as follows:
You first need to install rp-pppoe. RPM for SuSE 10.1 is available. To configure, pppoe-setup can be used, which will ask for many simple questions. I had the modem connected to my lan card (which was configured as eth0). My answers were as follows.
Welcome to the Roaring Penguin PPPoE client setup. First, I will run some checks on your system to make sure the PPPoE client is installed properly... Looks good! Now, please enter some information: USER NAME >>> Enter your PPPoE user name:dsaXYZXYZ INTERFACE >>> Enter the Ethernet interface connected to the DSL modem For Solaris, this is likely to be something like /dev/hme0. For Linux, it will be ethn, where 'n' is a number. (default eth0):eth0 MODEM TYPE We will try to detect if your modem is compliant with RFC 2516 or not. 3COM's 3CP4130 is *NOT* compliant, for instance. Searching for a modem at interface eth0... Found a RFC 2516 compliant modem, congratulations! :) Do you want the link to come up on demand, or stay up continuously? If you want it to come up on demand, enter the idle time in seconds after which the link should be dropped. If you want the link to stay up permanently, enter 'no' (two letters, lower-case.) NOTE: Demand-activated links do not interact well with dynamic IP addresses. You may have some problems with demand-activated links. >>> Enter the demand value (default no): DNS Please enter the IP address of your ISP's primary DNS server. If your ISP claims that 'the server will provide DNS addresses', enter 'server' (all lower-case) here. If you just press enter, I will assume you know what you are doing and not modify your DNS setup. >>> Enter the DNS information here: server PASSWORD >>> Please enter your PPPoE password: >>> Please re-enter your PPPoE password: FIREWALLING Please choose the firewall rules to use. Note that these rules are very basic. You are strongly encouraged to use a more sophisticated firewall setup; however, these will provide basic security. If you are running any servers on your machine, you must choose 'NONE' and set up firewalling yourself. Otherwise, the firewall rules will deny access to all standard servers like Web, e-mail, ftp, etc. If you are using SSH, the rules will block outgoing SSH connections which allocate a privileged source port. The firewall choices are: 0 - NONE: This script will not set any firewall rules. You are responsible for ensuring the security of your machine. You are STRONGLY recommended to use some kind of firewall rules. 1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation 2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway for a LAN >>> Choose a type of firewall (0-2): 0 ** Summary of what you entered ** Ethernet Interface: eth0 User name: dsa220513 Activate-on-demand: No DNS addresses: Supplied by ISP's server Firewalling: NONE
To start, stop and to view the status, pppoe-start, pppoe-stop and pppoe-status can be used. I expected the internet to work, since after running pppoe-start, status showed that I am connected. Messages in /var/log/messages also didn't contain any error. LAN card had acquired IP address 192.168.1.2 from the DHCP of the modem. Modem's web configuration interface was accessible at http://192.168.1.1/.
pppoe-status: Link is up and running on interface ppp0 ppp0 Link encap:Point-to-Point Protocol inet addr:188.8.131.52 P-t-P:184.108.40.206 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 RX packets:6727 errors:0 dropped:0 overruns:0 frame:0 TX packets:5687 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:6424287 (6.1 Mb) TX bytes:826896 (807.5 Kb)
After some investigation I found that if I set my ethernet card (using YaST) to have static IP 192.168.0.3, and configure its default gateway as 192.168.1.1 everything works fine. I am not sure what is the reason for this, as I have no experience with pppoe; but it works. I will try to dig in this and find out the reason.