PPP配置:
配置路由器使用广域网封装协议:PPP<H3C路由器默认广域网接口封装方式>:
[RTA]int e0/0
[RTA-Ethernet0/0]ip add 192.168.1.1 24
[RTA]int s0/0
[RTA-s0/0]ip add 10.1.1.1 24
[RTB]int e0/0
[RTB-Ethernet0/0]ip add 192.168.2.1 24
[RTB]int s0/0
[RTB-s0/0]ip add 10.1.1.2 24
PCA:192.168.1.2 255.255.255.0 GT:192.168.1.1
PCB:192.168.2.2 255.255.255.0 GT:192.168.2.1
[RTA]ip route-static 192.168.2.0 255.255.255.0 10.1.1.2
[RTB]ip route-static 192.168.1.0 255.255.255.0 10.1.1.1
此时PCA和PCB可以互访:
C:\Documents and Settings\xiaofei>ping 192.168.2.2
Pinging 192.168.2.2 with 32 bytes of data:
Reply from 192.168.2.2: bytes=32 time=2ms TTL=254
Reply from 192.168.2.2: bytes=32 time<1ms TTL=254
Ping statistics for 192.168.2.2:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 2ms, Average = 1ms
Control-C
在RTA RTB S0/0接口上启用PPP协议:
RTA]int s0/0
[RTA-s0/0]link-protocol ppp
[RTA-s0/0]buadrate 9600
[RTB]int s0/0
[RTB-s0/0]link-protocol ppp
[RTA]disp int s0/0/0
Serial0/0/0 current state: UP
Line protocol current state: UP
Description: Serial0/0/0 Interface
The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet Address is 10.1.1.1/24 Primary
Link layer protocol is PPP
LCP opened, IPCP opened
Output queue : (Urgent queuing : Size/Length/Discards) 0/50/0
Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0
Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0
Interface is V35
608 packets input, 10308 bytes
597 packets output, 10454 bytes
此时接口都启用ppp协议,PCA和PCB正常互访:
C:\Documents and Settings\xiaofei>ping 192.168.2.2
Pinging 192.168.2.2 with 32 bytes of data:
Reply from 192.168.2.2: bytes=32 time=15ms TTL=254
Reply from 192.168.2.2: bytes=32 time=1ms TTL=254
Reply from 192.168.2.2: bytes=32 time=1ms TTL=254
Reply from 192.168.2.2: bytes=32 time<1ms TTL=254
Ping statistics for 192.168.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 15ms, Average = 4ms