I was seeing constant threads at orkut regarding configuration of internet on linux. This guide I hope will help you establish the BSNL broadband connection on your linux box. I assume that you have configured your network interface (if not then I am going to post a similar post regarding howto configure it).
This document is a copy of a document which I saw in late 2004 when I was searching for a howto to configure internet in linux.
This document describes howto setup bsnl broadband service on your gnu/linux server/desktop. It assumes that you are neither linux beginer nor an expert. It assumes that you are aware of basic gnu/linux commands.
I have installed it on redhat 9. I dont find any reason why it would not work on following distributions:
- FC1
- FC2
- FC3
- FC4
- FC5
An unofficial FAQ on Dataone can be found here
Pre-Requisites
- Please ensure that you have connected a working ethernet card which is supported on gnu/linux. Test the ethernet card & ensure that it is working.
- Root access to a gnu/linux box
Before we start, please ensure that you have the following details on hand:
- BSNL Broadband connection -:)
- Username & Password
Using the builtin dialer
The procedure to configure the dialer in UTStarCom UT300R modem is given here
Using RP-PPPOE as dialer
Installation
- As BSNL broadband is using rp-pppoe (Roaring Penguin – Point to Point Over Ethernet), we would be required to download & install this package. This package is normally available on most of the distributions. But, if you are using redhat7.3, please download the following packages:
If you are downloading the tar.gz version, you have to build the rpm first. So, please walk through the following procedure to build the rpm:
Procedure to build RPM from tar.gz.
1. Login as root2. Download tar.gz version & execute the following commands# tar -zxvf rp-pppoe-3.5.tar.gz (untar this package) * This command would untar the package in the current directory.# cp rp-pppoe-3.5.tar.gz /usr/src/redhat/SOURCES/# cd rp-pppoe-3.5 * The rpm spec file, rp-pppoe.spec is available in this directory.# cp rp-pppoe.spec /usr/src/redhat/SPECS/# cd /usr/src/redhat/SPECS# rpm -ba rp-pppoe.spec* The above command would untar the tar.gz package in ../BUILDdirectory, compile the package and finally it would create necessary rpms in
If everything goes fine, you would see the following or similar message:
Wrote: /usr/src/redhat/SRPMS/rp-pppoe-3.5-1.src.rpmWrote: /usr/src/redhat/RPMS/i386/rp-pppoe-3.5-1.i386.rpmWrote: /usr/src/redhat/RPMS/i386/rp-pppoe-gui-3.5-1.i386.rpmExecuting(%clean): /bin/sh -e /var/tmp/rpm-tmp.97349+ umask 022+ cd /usr/src/redhat/BUILD+ cd rp-pppoe-3.5+ rm -rf /tmp/pppoe-build+ exit 0
If this is the case, the necessary rpms are successfully created and they are available in appropriate directory.
Source RPMS - /usr/src/redhat/SRPMS/rp-pppoe-3.5-1.src.rpmBinary RPMS - /usr/src/redhat/RPMS/i386/rp-pppoe-3.5-1.i386.rpmGUI RPMS - /usr/src/redhat/RPMS/i386/rp-pppoe-gui-3.5-1.i386.rpm
Now, at this stage you are having necessary rpms with you. Either you have downloaded them from the above website. Or you would have built them on your own:
Command Line Version
# rpm -vih rp-pppoe-3.5-1.i386.rpm
It would install the command line version of rp-pppoe package.
GUI Version
# rpm -vih rp-pppoe-gui-3.5-1.i386.rpm
It would install the gui version of rp-pppoe package. If you have successfully installed, then you can proceed to next section.
Configuration
Once you have installed rp-pppoe package, all necessary commands would have been installed.
adsl-setup - to configure the connection parametersadsl-start - to start the connectionadsl-status - to check status of the connectionadsl-stop - to stop the connection
Now, we are ready to configure the BSNL broadband internet connection.
Here you have to configure the following parameters:
* userid* network interface (eth0 or ..)* Demand value (normally you can leave it blank)* DNS Information (primary & secondary)
- With regard to primary & secondary dns, You can leave it blank, as it would be taken care automatically. If you wish to know the dns details, just complete this wizard and when you run adsl-start, do:
# tail -f /var/log/messagesMar 15 15:29:48 Gateway pppd[3564]: Remote message: Authentication success,Welcome!Mar 15 15:29:48 Gateway pppd[3564]: local IP address 59.92.9.154Mar 15 15:29:48 Gateway pppd[3564]: remote IP address 59.92.8.1Mar 15 15:29:48 Gateway pppd[3564]: primary DNS address 61.1.96.69Mar 15 15:29:48 Gateway pppd[3564]: secondary DNS address 61.1.96.71
There it goes! The primary & secondary dns details are found and it would be automatically updated in /etc/resolv.conf.
- Then you should enter the following details:
* Password* Firewall (set is to 2, MASQUERADE)* Confirm
- The following is the screen shot of adsl-setup command.
# adsl-setupWelcome to the Roaring Penguin ADSL client setup. First, I will runsome checks on your system to make sure the PPPoE client is installedproperly... Looks good! Now, please enter some information: USER NAME >>> Enter your PPPoE user name (default test@dataone): INTERFACE >>> Enter the Ethernet interface connected to the ADSL modemFor Solaris, this is likely to be something like /dev/hme0.For Linux, it will be ethn, where 'n' is a number.(default eth0): 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 tim e in secondsafter which the link should be dropped. If you want the link tostay up permanently, enter 'no' (two letters, lower-case.)NOTE: Demand-activated links do not interact well with dynamic IPaddresses. 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 aredoing and not modify your DNS setup.>>> Enter the DNS information here: 61.1.128.5Please enter the IP address of your ISP's secondary DNS server.If you just press enter, I will assume there is only one DNS server.>>> Enter the secondary DNS server address here: 61.0.0.5 PASSWORD >>> Please enter your PPPoE password: >>> Please re-enter your PPPoE password: FIREWALLING Please choose the firewall rules to use. Note that these rules arevery basic. You are strongly encouraged to use a more sophisticatedfirewall setup; however, these will provide basic security. If youare running any servers on your machine, you must choose 'NONE' andset up firewalling yourself. Otherwise, the firewall rules will denyaccess to all standard servers like Web, e-mail, ftp, etc. If youare using SSH, the rules will block outgoing SSH connections whichallocate 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 workstation2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway for a LAN>>> Choose a type of firewall (0-2): 2 ** Summary of what you entered ** Ethernet Interface: eth0User name: test@dataoneActivate-on-demand: NoPrimary DNS: 61.1.128.5Secondary DNS: 61.0.0.5Firewalling: MASQUERADE >>> Accept these settings and adjust configuration files (y/n)? yAdjusting /etc/ppp/pppoe.confAdjusting /etc/resolv.conf(But first backing it up to /etc/resolv.conf-bak)Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets(But first backing it up to /etc/ppp/pap-secrets-bak)(But first backing it up to /etc/ppp/chap-secrets-bak) Congratulations, it should be all set up! Type 'adsl-start' to bring up your ADSL link and 'adsl-stop' to bringit down. Type 'adsl-status' to see the link status.
Internet Connection
Now, if you see this Congrats! message, then you are all set & done. You can type,
# adsl-start ..Connected! #
Thats it. The bsnl broadband setup has been installed & configured.
At this point, you can go through the man pages of appropriate adsl-* commands for details.
Hope this article helps you out in configuring internet on linux specially for the redhat persons. I will soon post a article regarding configuring network interfaces on linux and other stuff related to it.