ADSL 拨号上网
原创
©著作权归作者所有:来自51CTO博客作者zc198786的原创作品,请联系作者获取转载授权,否则将追究法律责任
R5模拟PC机,R3模拟CPE,R2模拟CO!
R2配置如下:
r2#show run
Building configuration...
Current configuration : 961 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
vpdn enable
!
vpdn-group 1
accept-dialin
protocol pppoe
virtual-template 1
!
async-bootp dns-server 192.1.1.1
!
!
!
!
!
!
!
!
!
!
!
username 123 password 123
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
duplex half
pppoe enable
!
interface ATM1/0
no ip address
shutdown
no atm ilmi-keepalive
!
interface Virtual-Template1
ip address 192.1.1.1 255.255.255.0
peer default ip address pool 123
ppp authentication chap
!
ip local pool 123 192.1.1.2 192.1.1.100
ip classless
ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end
R3配置如下:
R3#show run
Building configuration...
Current configuration : 1054 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool zc
import all
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex half
pppoe enable
pppoe-client dial-pool-number 1
!
interface FastEthernet1/0
ip address 192.168.1.1 255.255.255.0
ip nat inside
duplex half
!
interface Dialer1
ip address negotiated
ip mtu 1492
ip nat outside
encapsulation ppp
dialer pool 1
ppp chap hostname 123
ppp chap password 123
!
ip nat inside source list 1 interface Dialer1
overload
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1
no ip http server
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
no cdp run
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end
R5配置如下:
pc1#show run
Building configuration...
Current configuration : 752 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname pc1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
no ip routing
!
!
no ip domain lookup
!
no ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
no ip route-cache
shutdown
duplex half
!
interface FastEthernet1/0
ip address dhcp
no ip route-cache
duplex auto
speed auto
!
interface FastEthernet1/1
no ip address
no ip route-cache
shutdown
duplex auto
speed auto
!
ip classless
no ip http server
!
!
no cdp run
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end
PC机测试结果如下:
pc1#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/31/56 ms
pc1#show ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet1/0 192.168.1.2 YES DHCP up up
FastEthernet1/1 unassigned YES unset administratively down down
pc1#show int se
pc1#show int f1/0
FastEthernet1/0 is up, line protocol is up
Hardware is i82543 (Livengood), address is ca04.0fe8.001c (bia ca04.0fe8.001c)
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:06, output 00:00:09, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
250 packets input, 19119 bytes
Received 12 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
252 packets output, 20355 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
如有不明白的,请留言,定会详细解释!谢谢浏览!
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
华为路由器+Modem实现ADSL拨号上网职场 休闲 华为路由器+Modem实现ADSL拨号上