Friday, September 2, 2011

Setting up Reliance Netconnect on Linux

It can be a very confusing and frustrating to setup wireless broadband like Tata Photon, Reliance Netconnect, etc. on Linux. Here's my experience on successfully setting up Reliance Netconnect on Fedora 15 using the wvdial PPP utility. The same could work for Tata Photon or any other modem based Internet service.

The concept is fairly simple. All such services work through a modem connected to the computer via the USB interface. We need to setup a PPP connection to the service provider via the modem. the wvdial command is more intelligent wrapper over the basic ppp utility.

1) Connect the USB Modem (Huawei EC 150 in my case)
2) Open terminal as root (or run the commands using sudo)
3) Type wvdialconf on the command prompt. This will create a default configuration file /etc/wvdial.conf with the following contents
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = Phone
ISDN = 0
Username = Username
Password = Password
Modem = /dev/ttyUSB0
Baud = 9600
Note: The values for some of the properties might be different based on your modem type

4) Modify /etc/wvdial.conf as follows:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = #777
ISDN = 0
Username = your MDN number
Password = your MDN number
Modem = /dev/ttyUSB0
Baud = 9600

5) Type wvdial on the command prompt. By default it takes the setting from  /etc/wvdial.conf if required you could place this file anywhere and pass it as the first argument to wvdial.
[root@juby juby]# wvdial
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected.  Waiting for prompt.
~[7f]}#@!}!}!} }8}"}&} } } } }#}$@#}%}&"7Hj}'}"}(}"e[12]~
--> PPP negotiation detected.
--> Starting pppd at Fri Sep  2 10:38:55 2011
--> Pid of pppd: 1836
--> Using interface ppp0
--> pppd: <
--> pppd: <
--> pppd: <
--> local  IP address 115.242.244.59
--> pppd: <
--> remote IP address 220.224.141.145
--> pppd: <
--> primary   DNS address 202.138.103.190
--> pppd: <
--> secondary DNS address 202.138.117.60
--> pppd: <

6) Add the primary and secondary DNS addresses to /etc/resolv.conf with the following entries:

nameserver 202.138.103.190
nameserer 202.138.117.60


7) Make sure that Internet traffic is routed through the PPP interface using ifconfig command.
If there are other interfaces (say LAN) turn them off by typing ifconfig if-name down
8) Ensure that the default traffic handler goes through the PPP interface. Type route on the command prompt. You should see something as follows:

[root@juby etc]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
220.224.141.145 *               255.255.255.255 UH    0      0        0 ppp0
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
default         *               0.0.0.0         U     0      0        0 ppp0

The default entry ensures that Internet traffic is routed through the PPP interface.

Till step 5) is usually straightforward and the procedure is explained in many other articles and blogs. However many people typically face problems from  step 6) onwards, wherein inspite of having their modem setup and connected, they are not able to access the Internet.


Note: Please see the man pages for wvdial, wvdialconf, ifconfig, route for the details of these commands.

This approach should work on most Linux distros and versions provided wvdial is installed and the system is able to detect the USB dongle.

No comments:

Post a Comment