PPPoE
การติดตั้ง PPPoE (Point to Point Protocol over Ethernet)
อุปกรณ์:
ZyXEL PRESTIGE 600
PC Linux Server
ISP : TOT
IP Adress: eth0 : 192.168.1.13
eth1 : 192.168.250.3
ZyXEL PRESTIGE 600 Modem : 192.168.250.1
Install Software (YaST)
-
- linux-atm
- rp-pppoe-3.8 (compile) download
http://www.susethailand.com/public/index.php?dir=sles/x86_64/
-
# pppoe-setup
# tar -zxvf rp-pppoe-3.8.tar.gz
# cd rp-pppoe-3.8
# cd src
# ./configure
# make
# make install
สร้าง Connection ADSL และ คอนฟิกค่าต่าง ดั่งนี้
Login Name
Enter your Login Name (default root): Name Account From ISP
(ขึ้นอยู่กับ ISP ที่ใช้)
Interface
(defualt eth0) : eth1 (Interface ที่ต่อเข้า Modem)
DNS
- Enter the DNS information here : 192.168.1.13 (ในกรณีที่เครื่องของคุณทำหน้าที่เป็น DNS Server
ด้วยเลยใส่ 192.168.1.13 ถ้าไม่ได้ติดตั้ง DNS ก็ให้ใส่ IP Address DNS ของ ISP)
(ถ้าเครื่องของถุณทำหน้าที่เป็น DNS Server อยู่แล้วก็ใส่ IP Address ได้เลย ในที่นี้ใส่ 192.168.1.13)
Password
- Please Enter your Password : เบอร์โทรศัพ์คุณ
- Please re-enter your Passowrd : เบอร์โทรศัพ์คุณ
ึUserctrl
- (default yer) : Enter
Firewall
- Choose a type of firewall (0-2) : 2
- Do you want to start this connection at boot time ?
Please enter no or yes (default no) : Enter
ทำการ Start PPPoE เพื่อหมุนโมเด็ม ใช้คำสั่ง
# pppoe-connect
ใช้คำสั่ง ifconfig เพื่อดูว่าสร้าง connection ได้หรือไม่
# ifconfig -a
Create init.d (เพื่อที่จะให้ connect internet ตอน Start Server)
# vim /etc/init.d/pppoe
#!/bin/sh
# Script by Mr. Sontaya Photibut
#Tweak this
restart_time=120
#From AUTOCONF
prefix=/usr
exec_prefix=${prefix}
#Paths to programs
PPPoE_Start=${exec_prefix}/sbin/pppoe-start
PPPoE_Stop=${exec_prefix}/sbin/pppoe-stop
PPPoE_Status=${exec_prefix}/sbin/pppoe-status
test -x "$PPPoE_Start" || exit 5
#Shell functions sourced from /etc/rc.status:
. /etc/rc.status
#First reset status of this service
rc_reset
case "$1" in
start)
echo -n "Bringing up PPPoE link"
startproc -sq $PPPoE_Start
rc_status -v
;;
stop)
echo -n "Shutting down Bringing up PPPoE link"
killproc -TERM $PPPoE_Stop
rc_status -v
;;
restart)
$0 stop
$0 start
rc_status
;;
reload)
echo -n "Reload service PPPoE"
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for PPPoE link:"
checkproc $PPPoE_Status
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
exit 1
;;
esac
rc_exit
Save
# chmod 744 /etc/init.d/pppoe
Run Level
# yast runlevel
- Enable pppoe Service
Command
# pppoe-connect
# pppoe-status
# pppoe-stop
Check connection
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:17:31:C0:8F:EC
inet addr:192.168.250.13 Bcast:192.168.250.255 Mask:255.255.255.0
inet6 addr: fe80::217:31ff:fec0:8fec/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107815 errors:0 dropped:0 overruns:0 frame:0
TX packets:90542 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:103678478 (98.8 Mb) TX bytes:13183609 (12.5 Mb)
Interrupt:209 Base address:0xa000
eth1 Link encap:Ethernet HWaddr 00:15:E9:F0:66:85
inet addr:192.168.1.13 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::215:e9ff:fef0:6685/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:210791 errors:0 dropped:0 overruns:0 frame:0
TX packets:160863 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64254641 (61.2 Mb) TX bytes:141437705 (134.8 Mb)
Interrupt:58 Base address:0x2000
ppp0 Link encap:Point-to-Point Protocol
inet addr:125.24.135.122 P-t-P:125.24.128.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:97150 errors:0 dropped:0 overruns:0 frame:0
TX packets:81425 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:92607673 (88.3 Mb) TX bytes:10461040 (9.9 Mb)
Note :
*** Ask your DSL ISP Provider if it uses non-standard PPPoE frames
*** Fon Dynamic IP Address use get a new IP Address # /etc/ppp/ip-up
*** file configurations /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
*** Hang up by killing the ppp daemon or using the following command: ifdown ppp0

SUSE Linux Enterprise Cool Solutions
|







