Saturday, January 31, 2009

PPPOE Internet Configuration For OpenSolaris 2008.05

One of the first things I had to learn when I moved from Windows to OpenSolaris was to get my Internet up and running. I had an Airtel broadband connection which followed the PPPOE (Point to Point Protocol Over Ethernet) network protocol. I had to experiment a bit and due time got a proper process established for network configuration. So if you are also planning to setup a broadband connection in OpenSolaris, edit the following files accordingly -

/etc/ppp/pppoe.if

INTERFACE
And reboot.

/etc/ppp/peers/ISP

sppptun (what device to use)
plugin pppoe.so (initialize the connection)
connect "usr/lib/inet/pppoec INTERFACE" (connect string)
persist (if the connection dies, bring it back)
user "USERNAME" (username)
noauth (do not make the other side authenticate itself)
noipdefault (let them give you what IP they want to give you)
noccp (no compression)
novj (no compression)
noaccomp (no compression)
nopcomp (no compression)
defaultroute (add an appropriate default route)
usepeerdns (for dns)

/etc/ppp/chap-secrets

"USERNAME" * "PASSWORD"
Remember these are tabs and not spaces.

/etc/ppp/pap-secrets

"USERNAME" * "PASSWORD"
Remember these are tabs and not spaces.

Check your work by executing the following command at the terminal -

sppptun query

Sample Output

INTERFACE:pppoe
INTERFACE:pppoed

Execute the following set of commands to finalize the procedure -

rm /etc/resolv.conf (remove the resolv.conf file from /etc)
link /etc/ppp/resolv.conf /etc/resolv.conf (instead link the resolv.conf from /etc/ppp to the one in /etc)
vi /etc/nsswitch.conf (make sure "hosts" and "ipnodes" resolve through "files dns")

Start the internet connection by the following commands -

/etc/init.d/pppd start
/usr/bin/pppd call ISP

Remember many of these files require root privileges, so login as super user using the su command.

INTERFACE is found out from ifconfig from the terminal. Eg. e100g0
ISP is the service provider you are connected to. Eg. airtel
USERNAME is the user name with which you login. Eg. 04040142943@touchtel.india

No comments: