PPPoE 原理与配置

PPPoE 原理与配置
4.1 问题
如图规划 VLAN和IP地址
R1作为企业边缘设备,通过PPPoE拨号方式连接运营商
内网中仅仅允许PC-1访问 Server-1
4.2 方案
搭建实验环境,如图-4所示。

PPPoE 原理与配置_第1张图片
图-4

4.3 步骤
实现此案例需要按照如下步骤进行。

1)配置内网设备 – 终端

PC1:
  192.168.1.1
     255.255.255.0
     192.168.1.254
PC2:
  192.168.1.2
     255.255.255.0
     192.168.1.254

2)配置内网设备 – SW1

>undo terminal monitor 
>system-view 
[Huawei]sysname SW1
[SW1]vlan 10
[SW1-vlan10]quit
    
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link access
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]quit
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link access    
[SW1-GigabitEthernet0/0/2]port default vlan  10
[SW1-GigabitEthernet0/0/2]quit
[SW1]interface GigabitEthernet 0/0/3
[SW1-GigabitEthernet0/0/3]port link access    
[SW1-GigabitEthernet0/0/3]port default vlan  10 
[SW1-GigabitEthernet0/0/3]quit

3)配置内网设备 – R1

>undo terminal monitor     
>system-view 
[Huawei]sysname R1
    
[R1]interface GigabitEthernet 0/0/0    
[R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface Dialer 1
[R1-Dialer1]ip address ppp-negotiate 
[R1-Dialer1]ppp pap local-user Huawei password cipher HCIE
[R1-Dialer1]dialer user Huawei
[R1-Dialer1]dialer bundle 12
[R1-Dialer1]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]pppoe-client dial-bundle-number 12
[R1-GigabitEthernet0/0/1]quit
[R1]ip route-static  0.0.0.0  0 Dialer 1
[R1]acl 2000
[R1-acl-basic-2000]rule 10  permit  source  192.168.1.1 0.0.0.0
[R1-acl-basic-2000]quit
[R1]interface Dialer 1
[R1-Dialer1]nat outbound  2000
[R1-Dialer1]quit

4)配置外网设备 – 终端

Server-1:
   200.1.1.1
   255.255.255.0
   200.1.1.254

5)配置外网设备 – R2

>undo terminal monitor 
>system-view 
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address  200.1.1.254 24
[R2-GigabitEthernet0/0/0]q
[R2]aaa
[R2-aaa]local-user Huawei password cipher HCIE
[R2-aaa]local-user Huawei service-type ppp
[R2-aaa]quit
[R2]ip pool ABC
[R2-ip-pool-ABC]network 100.1.1.0 mask 24
[R2-ip-pool-ABC]quit
[R2]interface Virtual-Template 1
[R2-Virtual-Template1]ip address 100.1.1.1 24
[R2-Virtual-Template1]ppp authentication-mode  pap
[R2-Virtual-Template1]remote address pool ABC
[R2-Virtual-Template1]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]pppoe-server bind virtual-template 1
[R2-GigabitEthernet0/0/1]quit

6)测试 PC1 与 Server-1 之间的连通性

PC>ping 200.1.1.1
Ping 200.1.1.1: 32 data bytes, Press Ctrl_C to break
From 200.1.1.1: bytes=32 seq=1 ttl=253 time=47 ms
From 200.1.1.1: bytes=32 seq=2 ttl=253 time=31 ms
From 200.1.1.1: bytes=32 seq=3 ttl=253 time=47 ms
From 200.1.1.1: bytes=32 seq=4 ttl=253 time=31 ms
From 200.1.1.1: bytes=32 seq=5 ttl=253 time=47 ms
--- 200.1.1.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 31/40/47 ms
7)测试 PC2 与 Server-1 之间的连通性

PC2>ping 200.1.1.1
Ping 200.1.1.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!
--- 200.1.1.1 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss

你可能感兴趣的:(理论,操作实例,华为路由器)