免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1309 | 回复: 0
打印 上一主题 下一主题

DSL connection using pppoe kernel-mode, HOW-TO [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-21 21:04 |只看该作者 |倒序浏览

H1, H2, H3 { color: #0000CC; }
SMALL { background-color: silver;
        display: block;
        padding: 5px;
        margin: 5px;
        border: 2px solid grey;
}
PRE { color: black;
      background-color: #CCCCDD;
      padding: 2px;
      margin-right: 15px;
      margin-left:  5px; }
DSL connection using pppoe kernel-mode, HOW-TO
Authors: Fraaz.
Started on dec. 2004.
Introduction
Kernel configuration
Network card configuration
DNS resolvers configuration
Account settings
host.conf
Configuration file for pppoe
Running connection
Stopping the connection
Using a firewall
Introduction
This HOW-TO explains how to set up a DSL connection using the new kernel PPPOE support. The goal is to avoid installation of an external package (such as rp-pppoe) because it tends to be over-complicated, confusing, unreliable, outdated.
Kernel configuration
A proper kernel configuration, with of course ppp support and pppoe support - for example:
CONFIG_PPP=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPPOE=m
This can be set to 'y' instead of 'm', according to your needs. You can type grep -i ppp /boot/linux-`uname -r`.config to check you current kernel's options for ppp support.
It's important to remember that you can produce a custom kernel easily anytime using:
Nmake -gb linux-2.6 -p 'wipe install'.
Network card configuration
If you compiled the support of your network card directly in the kernel, nothing is required here.
If you compiled your network card as a kernel module, you must ensure to specify an alias like this in /etc/modprobe.conf alias eth0 via-rhine
Ensure modules loading upon system booting by adding these lines in /etc/sysconfig/modules.d/site: via-rhine
pppoe
You might also need to specify ppp_generic if you built it as a module
via-rhine is given as an example, replace it with the module name that corresponds to your hardware.
You possibly don't have /etc/modprobe.conf yet - create it !
Now here is the configuration required by the network init service. Edit /etc/sysconfig/network.d/ifconfig.eth0/ipv4:
ONBOOT=yes
SERVICE=ipv4-static
IP=192.168.1.1
GATEWAY=
PREFIX=24
BROADCAST=192.168.1.255
DNS resolvers configuration
Edit /etc/resolv.conf with the values provided by your ISP. This is an example for the French ISP Wanadoo:
search wanadoo.fr
nameserver 80.10.246.130 80.10.256.3
Account settings
Edit /etc/ppp/pap-secrets and /etc/ppp/chap-secrets:
"your_isp_login"       *       "password"
host.conf
Edit /etc/host.conf with:
order   hosts,bind
multi   on
Configuration file for pppoe
You must tell ppp to use the plugin rp-pppoe (installed with the ppp package) in /etc/ppp/options: plugin rp-pppoe.so
name
noipdefault
defaultroute
mtu 1492
mru 1492
lock
Running connection
That's all, you are all done! To bring up the DSL line, just type:
pppd eth0
Stopping the connection /usr/sbin/pppd-stopThis command doesn't come with ppp, we added it for convenience, credits does to
http://casteyde.christian.free.fr/online/install_linux/book1.html
Using a firewall
Using a firewall is almost mandatory with DSL lines. Formerly rp-ppoe bundled firewall scripts, we discourage their use at the benefit of either a dedicated software, or our own firewall service 'nanofw' (we bundles it with iptables):
chmod +x /etc/init.d/runlevel.3/nanofw
# if you wan to setup NAT (connection sharing):
nano /etc/sysonfig/nanofw
# Edit the four values of the NAT section
# now run it:
telinit nanofw start


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/33950/showart_326030.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP