ADSL+NAT配置实例

拓扑如下:

 

ISP 配置:

R3#sh run
Building configuration...

Current configuration : 1064 bytes
!
version 12.4
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
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
ip dhcp excluded-address 10.0.0.3 255.255.255.0
!
ip dhcp pool dhcpr3
   network 10.0.0.0 255.255.255.0
!
!
vpdn enable
!

username cisco password 0 cisco
username user password 0 user
bba-group pppoe global
 virtual-template 1
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 pppoe enable group global
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 pppoe enable group global
!
interface Virtual-Template1
 ip address 10.0.0.3 255.255.255.0
 peer default ip address dhcp-pool dhcpr3
 ppp authentication chap
 ppp ipcp dns 8.8.8.8
!
!
no ip http server
no ip http secure-server
control-plane
      
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end

-----------------------------------------------------------------------------

Cisco拔号

R2#sh run
Building configuration...

Current configuration : 1052 bytes
!
version 12.4
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
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
vpdn enable
!        
interface FastEthernet0/0
 ip address 192.168.0.2 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 pppoe enable
 pppoe-client dial-pool-number 1
!
interface Dialer1
 ip address negotiated
 ip nat outside
 ip virtual-reassembly
 encapsulation ppp
 dialer pool 1
 ppp authentication chap callin
 ppp chap hostname user
 ppp chap password 0 user
!
!        
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 Dialer1
!
!
ip nat inside source list 1 interface Dialer1 overload
!
access-list 1 permit 192.168.0.0 0.0.0.255
!
!
!
!
control-plane
!

line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end

-------------------------------------------------------------------------

让内网(192.168.0.0/24)主机可以与外网通信

R1#show run
Building configuration...

Current configuration : 720 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
!
!
no ip cef
no ip domain lookup

interface FastEthernet0/0
 ip address 192.168.0.1 255.255.255.0
 no ip route-cache
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
!
ip default-gateway 192.168.0.2
no ip http server
no ip http secure-server
!

control-plane
!        

line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end

公司内部ping ISP

 

nat 转换

 

windows拔号:

 

 

内部网络访问外部主机

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值