此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍如何使用网桥域接口(BDI)和vlan-range配置以太网点对点协议(PPPoE)服务器。
Cisco 建议您了解以下主题:
本文档中的信息基于以下软件和硬件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
注意:使用命令查找工具(仅限注册用户)可获取有关本部分所使用命令的详细信息。
主机1
!
interface FastEthernet0
switchport access vlan 100
no ip address
end
!
interface Vlan100
no ip address
pppoe enable group global
pppoe-client dial-pool-number 1
end
!
interface Dialer1
ip address negotiated
encapsulation ppp
dialer pool 1
ppp chap hostname dsl
ppp chap password 0 dsl
end
!
主机2
!
interface FastEthernet0
switchport access vlan 200
no ip address
end
!
!
interface Vlan200
no ip address
pppoe enable group global
pppoe-client dial-pool-number 1
end
!
!
interface Dialer1
ip address negotiated
encapsulation ppp
dialer pool 1
ppp chap hostname dsl
ppp chap password 0 dsl
end
!
交换机
SWITCH#sh cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
D - Remote, C - CVTA, M - Two-port Mac Relay
Device ID Local Intrfce Holdtme Capability Platform Port ID
SERVER Gig 0/1 130 R I ASR1001-X Gig 0/0/0
HOST-1 Fas 0/2 141 R B S I 887G Fas 0
HOST-2 Fas 0/1 167 R B S I 887 Fas 0
!
interface FastEthernet0/2
switchport access vlan 100
end
!
interface FastEthernet0/1
switchport access vlan 200
end
!
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100,200
switchport mode trunk
end
!
PPPoE服务器
!
username dsl password 0 dsl
!
bba-group pppoe global
virtual-template 1
!
interface GigabitEthernet0/0/0
no ip address
negotiation auto
cdp enable
service instance 100 ethernet
encapsulation dot1q 100 etype pppoe-all
rewrite ingress tag pop 1 symmetric
bridge-domain 100
!
service instance 200 ethernet
encapsulation dot1q 200 etype pppoe-all
rewrite ingress tag pop 1 symmetric
bridge-domain 200
!
!
interface Virtual-Template1
ip unnumbered Loopback0
peer default ip address pool POOL
ppp authentication chap
!
interface BDI100
no ip address
pppoe enable group global
!
interface BDI200
no ip address
pppoe enable group global
!
interface Loopback0
ip address 192.168.10.1 255.255.255.255
end
!
ip local pool POOL 192.168.1.1 192.168.1.100
!
或者,您可以配置vlan-range,如图所示:
!
interface GigabitEthernet0/0/0
no ip address
negotiation auto
service instance 100 ethernet
encapsulation default
bridge-domain 1
!
end
!
interface BDI1
no ip address
vlan-range dot1q 1 4094
pppoe enable group global
!
end
使用本部分可确认配置能否正常运行。
在HOST-1上
HOST-1#show ip interface brief | exclude un
Interface IP-Address OK? Method Status Protocol
Dialer1 192.168.1.4 YES IPCP up up
HOST-1#show caller ip
Line User IP Address Local Number Remote Number <->
Vi2 SERVER 192.168.10.1 - <unknown phone in
HOST-1#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
HOST-1#show ppp interface virtual-Access 2
PPP Serial Context Info
-------------------
Interface : Vi2
PPP Serial Handle: 0x1F000003
PPP Handle : 0xB2000003
SSS Handle : 0x8000004
AAA ID : 24
Access IE : 0xA7000003
SHDB Handle : 0x0
State : Up
Last State : Binding
Last Event : LocalTerm
PPP Session Info
----------------
Interface : Vi2
PPP ID : 0xB2000003
Phase : UP
Stage : Local Termination
Peer Name : SERVER
Peer Address : 192.168.10.1
Control Protocols: LCP[Open] IPCP[Open] CDPCP[Stopped]
Session ID : 3
AAA Unique ID : 24
SSS Manager ID : 0x8000004
SIP ID : 0x1F000003
PPP_IN_USE : 0x11
Vi2 LCP: [Open]
Our Negotiated Options
Vi2 LCP: MagicNumber 0x7735647E (0x05067735647E)
Peer's Negotiated Options
Vi2 LCP: MRU 1500 (0x010405DC)
Vi2 LCP: AuthProto CHAP (0x0305C22305)
Vi2 LCP: MagicNumber 0xA7A011AC (0x0506A7A011AC)
Vi2 IPCP: [Open]
Our Negotiated Options
Vi2 IPCP: Address 192.168.1.5 (0x0306C0A80105)
Peer's Negotiated Options
Vi2 IPCP: Address 192.168.10.1 (0x0306C0A80A01)
在HOST-2上
HOST-2#show ip interface brief | exclude un
Interface IP-Address OK? Method Status Protocol
Dialer1 192.168.1.6 YES IPCP up up
HOST-2#show caller ip
Line User IP Address Local Number Remote Number <->
Vi2 SERVER 192.168.10.1 - <unknown phone in
HOST-2#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
HOST-2#show ppp interface virtual-Access 2
PPP Serial Context Info
-------------------
Interface : Vi2
PPP Serial Handle: 0x7B00000A
PPP Handle : 0xA000000A
SSS Handle : 0x4C00000B
AAA ID : 68
Access IE : 0x1D00000A
SHDB Handle : 0x0
State : Up
Last State : Binding
Last Event : LocalTerm
PPP Session Info
----------------
Interface : Vi2
PPP ID : 0xA000000A
Phase : UP
Stage : Local Termination
Peer Name : SERVER
Peer Address : 192.168.10.1
Control Protocols: LCP[Open] IPCP[Open] CDPCP[Stopped]
Session ID : 10
AAA Unique ID : 68
SSS Manager ID : 0x4C00000B
SIP ID : 0x7B00000A
PPP_IN_USE : 0x11
Vi2 LCP: [Open]
Our Negotiated Options
Vi2 LCP: MagicNumber 0x421AC8AB (0x0506421AC8AB)
Peer's Negotiated Options
Vi2 LCP: MRU 1500 (0x010405DC)
Vi2 LCP: AuthProto CHAP (0x0305C22305)
Vi2 LCP: MagicNumber 0xA7A0942C (0x0506A7A0942C)
Vi2 IPCP: [Open]
Our Negotiated Options
Vi2 IPCP: Address 192.168.1.6 (0x0306C0A80106)
Peer's Negotiated Options
Vi2 IPCP: Address 192.168.10.1 (0x0306C0A80A01)
在交换机上
SWITCH#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24, Gi0/2
11 VLAN0011 active
12 VLAN0012 active
13 VLAN0013 active
100 VLAN0100 active Fa0/2
200 VLAN0200 active Fa0/1
SWITCH#Show interface trunk
Port Mode Encapsulation Status Native vlan
Gi0/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi0/1 100,200
Port Vlans allowed and active in management domain
Gi0/1 100,200
Port Vlans in spanning tree forwarding state and not pruned
Gi0/1 100,200
在PPPoE服务器上
SERVER#show caller ip
Line User IP Address Local Number Remote Number <->
Vi2.1 dsl 192.168.1.6 - - in
Vi2.2 dsl 192.168.1.5 - - in
SERVER#show ip local pool POOL
Pool Begin End Free In use
POOL 192.168.1.1 192.168.1.100 98 2
Available addresses:
192.168.1.7
192.168.1.8
192.168.1.9
.....
.....
使用“vlan-range”时,请注意“Port”中的更改:
SERVER#show caller ip
Line User IP Address Local Number Remote Number <->
Vi2.1 dsl 192.168.1.7 - - in
Vi2.2 dsl 192.168.1.8 - - in
本部分提供了可用于对配置进行故障排除的信息。
这些调试有助于排除PPP/PPPoE故障。