13 12
发新话题
打印

[网络转载] 配置路由器实现LAN共享ADSL上网

配置路由器实现LAN共享ADSL上网

实验名称: 配置路由器实现LAN共享ADSL上网
目录:
1 需求说明
2.top图形
3.基本配置
4.测试和验证
5.注意事项
6.总结
1 需求说明
湖南迈威科技公司在电信公司申请了一条8M包月的ADSL宽带,公司要求实现所有的内部的电脑一起共享上网,要求LAN内的所有主机都是通过DHCP服务器(R1)自动分配地址,DHCP分配的同时要求保留192.168.1.x地址 (x=1.2.3.254)
  附:公司现在拥有一台2611路由器和一个Modem,申请到的ADSL帐号:cisco 密码:cisco
2.top图形

3.基本配置
R1基本配置
R1#show run
Building configuration...
!
hostname R1
!
no aaa new-model
ip subnet-zero
!
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.1.2
ip dhcp excluded-address 192.168.1.3
ip dhcp excluded-address 192.168.1.254
!
ip dhcp pool huawei

network 192.168.1.0 255.255.255.0


default-router 192.168.1.1

!
ip cef
!
interface Ethernet0/0

ip address 192.168.1.1 255.255.255.0


ip nat inside


half-duplex

!
interface Ethernet0/1

no ip address


half-duplex


pppoe enable


pppoe-client dial-pool-number 1

!
interface Dialer1

ip address negotiated


ip mtu 1492


ip nat outside


encapsulation ppp


dialer pool 1


ppp chap hostname cisco


ppp chap password 0 cisco

!
ip nat inside source list 10 interface Dialer1 overload
ip http server
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1
!
access-list 10 permit 192.168.1.0 0.0.0.255
!
line con 0
line aux 0
line vty 0 4

login

!
!
end
R2 基本配置
R2#show run
Building configuration...

!
hostname R2
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
ip audit po max-events 100
vpdn enable
!
vpdn-group 1

accept-dialin


protocol pppoe


virtual-template 1

!
username cisco password 0 cisco
!
interface Loopback0

ip address 10.0.0.1 255.255.255.0

!
interface Ethernet0/0

ip address 202.103.1.254 255.255.255.0


half-duplex

!
interface Ethernet0/1

no ip address


half-duplex


pppoe enable

!
interface Virtual-Template1

ip unnumbered Loopback0


peer default ip address pool cisco


ppp authentication chap

!
ip local pool cisco 10.0.0.10 10.0.0.20
ip http server
no ip http secure-server
ip classless
!
end
4.测试和验证
4.1观察PC 1 是否自动获得了IP地址
    在命令行下使用Ipconfig
/all
命令查看

4.2PC 1 ping
Web
服务器202.103.1.1
   在命令行下使用ping 202.103.1.1 命令查看
4.3 R1 上观察内网IP是否进行了NAT转换
   R1使用 debug ip nat 命令查看

TOP

顶了~~~~~~~~~~~~

TOP

配置路由器实现LAN共享ADSL上网,这样可以多拉几台电脑了

TOP

好东东,有这样的教程是应该多学习下的哦,谢谢了

TOP

wu**li) wu**li)

TOP

):gao_xing ):gao_xing

TOP

公司用这样的方法上网真是一机多用!偶得收藏了!

TOP

我自己家就是ADSL能过路由器连接实现两台机器共享的呀,不过多台的,我还不知道怎么配置

TOP

 13 12
发新话题