Bharat Sanchar Nigam Limited (BSNL) is India's largest telecom company. It is owned by the Govt. of India. BSNL provides Internet dial-up access packages (Sancharnet) which are the best deal when compared to those provided by other ISPs in the country. Here I will explain how to dial in to the BSNL server in linux using wvdial utility. It is assumed that you already have a BSNL dial-up internet account. If not then get one and come back to this page :) .
If this is the first time you are connecting to the internet, then you have to 'su' to root and execute the command :
$ su -
wvdialconf script, builds a configuration file for wvdial. It detects your modem, its maximum baud rate, and a good initialization string and generates or updates the wvdial configuration file based on this information.Now if you check the /etc/wvdial.conf file, you will see that wvdialconf has written the necessary data regarding your modem there. Now you have to open the /etc/wvdial.conf file and enter the BSNL dial-up access phone number, your username and password as follows:
; /etc/wvdial.conf fileAlso make sure that the line -
Phone = 172222
Username = "your login name"
Password = "your password"
New PPPD = yesexists in the /etc/wvdial.conf file in the [Dialer Defaults] section. If it is not there, then include that too.
Next you have to modify your /etc/resolv.conf file and enter the primary and secondary DNS servers of BSNL for name resolution. If you do not do this then, you will be able to login to the BSNL server, but will not be able to browse the web. My /etc/resolv.conf file is as follows:
nameserver 188.8.131.52 #Primary BSNL DNS ServerNow to connect to the internet, just run wvdial command in the console as follows:
nameserver 184.108.40.206 #Secondary BSNL DNS server
nameserver 220.127.116.11 # Tertiary BSNL DNS server
# wvdialBy default only root can run wvdial. To let other users execute wvdial utility, I did the following:
First I created a group called 'modem'.
# groupadd -g 503 modem
I Made sure that the group id 503 is not used by any other group; If not then you could use any other unique number greater than 500.Then I included all users who are allowed to connect to the internet to this newly created group.
# usermod -G modem raviThen I permitted the modem group to connect to the internet by editing the sudo configuration file /etc/sudoers as follows:
# usermod -G modem sada
//Now you are in /etc/sudoers file
From here onwards, those who are in the modem group can execute the following command to connect to the internet.
$ sudo wvdialMy complete /etc/wvdial.conf file is as follows:
New PPPD = yes ;Don't forget to include this line
Modem = /dev/modem
Baud = 14000 ;I use the linuxant driver so speed is less
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
;BSNL phone no:,username and password settings
Phone = 172222
Username = "My login name"
Password = "My Password"