知识库与软件

PPPoE跨三层VLAN寻找服务器拨号上网经典案例

文档编号:2020
浏览:12029 评分:29
最后更新于:2016-04-18

此文档基于ST3582F V2版本

 
问题描述:
     现有环境如下,ISP接入主路由器(192.168.1.1)上网,开启PPPOE强制功能,下接ST3528F三层交换机,且划分有多个VLAN进行管理,各个VLAN是无法上网的。需要VLAN20允许通过路由器的PPPOE服务器拨号上网,其他VLAN不允许上网。具体环境如下图:
 
 
设置步骤:
 
1、打开开始->运行->cmd,telnet进入交换机,可看到交换机已进行过配置,具有默认路由上网及划分过VLAN20,VLAN20也具有V20的DHCP地址池,如图1、图2所示:
 
 
图1
 
 
 
图2
 
2、登录到主路由器,看到已配置过PPPoE服务器,并开启了强制认证,如图3所示:
 
 
 
图3
 
3、再次telnet到ST3528F交换机,进行配置,如图4所示:
 
 
图4
备注:
ST3528F#config                                    进入全局模式
ST3528F(config)#interface ethernet 1/0/1          进入接口1
ST3528F(config-if-ethernet1/0/1)#switchport mode hybrid  改为hybrid模式
Set the port Ethernet1/0/1 mode Hybrid successfully
ST3528F(config-if-ethernet1/0/1)#switchport hybrid native vlan 1  接口1的本征VLAN为VLAN 1,即PVID为VLAN 1
Set the port Ethernet1/0/1 native vlan 1 successfully
ST3528F(config-if-ethernet1/0/1)#switchport hybrid allowed vlan 1;20 untag  设置VLAN 1和VLAN 20在接口1为不打tag帧通过
set the Hybrid port Ethernet1/0/1 untag allowed vlan successfully
ST3528F(config-if-ethernet1/0/1)#quit         退出接口1
ST3528F(config)#interface ethernet 1/0/10     进入接口10
ST3528F(config-if-ethernet1/0/10)#switchport mode hybrid  改为hybrid模式
Set the port Ethernet1/0/10 mode Hybrid successfully
ST3528F(config-if-ethernet1/0/10)#switchport hybrid native vlan 20   接口1的本征VLAN为VLAN 20,即PVID为VLAN 20
Set the port Ethernet1/0/10 native vlan 20 successfully
ST3528F(config-if-ethernet1/0/10)#switchport hybrid allowed vlan 1;20 untag  设置VLAN 1和VLAN 20在接口1为不打tag帧通过
set the Hybrid port Ethernet1/0/10 untag allowed vlan successfully
 
三层交换机配置完成后必须输入命令 WR保存下配置。
 
4、在开启PPPoE强制认证的情况下,接口10下的PC获取到VLAN20的IP正常,但无法上网,如图5、图6所示:
 
 
图5
 
 
图6
 
5、在192.168.20.2的主机上直接使用PPPoE账号拨号,能够拨号成功,且上网正常,VLAN30下的主机无法拨号成功的,如图7、图8、图9、图10所示:
 
图7
 
 
图8
 
 
图9
 
 
图10
 
备注:此案例采用灵活的Hybrid口做跨越VLAN通信PPPoE服务。当路由器与三层交换机级联采用传统的Trunk口时,VLAN都是打上tag帧的,这样基于LAN间通信的PPPoE报文是无法通过的。只有采用Hybrid口,给要通信的VLAN均untag不打tag帧,PPPoE报文请求就会互通,则跨越VLAN可请求PPPoE服务器拨号成功。

   2024 ©上海艾泰科技有限公司 版权所有 沪ICP备05037453号-1

   

      沪公网安备 31011702003579号