本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本文說明如何使用橋接網域介面(BDI)和vlan範圍設定乙太網路上的點對點通訊協定(PPPoE)伺服器。
思科建議您瞭解以下主題:
本文中的資訊係根據以下軟體和硬體版本:
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
附註:使用命令查詢工具(僅供已註冊客戶使用)可獲取本節中使用的命令的更多資訊。
主機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故障。