gentoo ADSL 拨号 安装手册

本文介绍如何在系统中配置两个网络接口(eth0为内网,eth1为外网),并实现通过PPPoE进行拨号上网的方法。包括内核配置、网络脚本创建及系统自动启动配置等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

eth0(内网)  IP : 192.168.0.102

 eth1(外网) 

配置内核:

 Device Drivers  ---> 

         Network 
device support  ---> 

                [*]   PPP 
(point-to-point protocol) support                        
                       [ ]     PPP multilink support 
(EXPERIMENTAL)   
                       [ ]     PPP filtering                                                      
                       [*]     PPP support 
for async serial ports              
                       [ ]     PPP support 
for sync tty ports                                             
                       [ ]     PPP Deflate compression                                                              
                       [ ]     PPP BSD-Compress compression                                                         
                       [ ]     PPP MPPE compression 
(encryption) (EXPERIMENTAL)                                     
                       [*]     PPP over Ethernet 
(EXPERIMENTAL)   

 

创建eth1网络脚本

# ln -s /etc/init.d/net.lo /etc/init.d/net.eth1

安装ppp软件:

# emerge net-dialup/ppp

创建PPP和以太网卡网络脚本

# ln -s /etc/init.d/net.lo /etc/init.d/net.ppp0

确保在/etc/conf.d/rc设定RC_NET_STRICT_CHECKING="yes"。

配置/etc/conf.d/net

config_eth0="192.168.1.102 netmask 255.255.255.0"
config_eth1
=( null )
config_ppp0
=( "ppp" )
link_ppp0
="eth1"
plugins_ppp0
=( "pppoe" )
username_ppp0
='ADSL账号'
password_ppp0
='ADSL密码'
pppd_ppp0
=(
       
"noauth"
       
"defaultroute"
       
"usepeerdns"
       
"holdoff 3"
       
"child-timeout 60"
       
"lcp-echo-interval 15"
       
"lcp-echo-failure 3"
       noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
)

depend_ppp0
() {
    need 
net.eth1
}

 

 设置 系统启动,自动启动拨号:

#rc-update add net.eth0 default

#rc-update add net.eth1 default

#rc-update add net.ppp0 default

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值