Chinaunix首页 | 论坛 | 博客

qsh

  • 博客访问: 3932986
  • 博文数量: 1015
  • 博客积分: 15904
  • 博客等级: 上将
  • 技术积分: 8572
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-04 19:16
文章分类

全部博文(1015)

文章存档

2019年(1)

2017年(1)

2016年(19)

2015年(27)

2014年(30)

2013年(95)

2012年(199)

2011年(72)

2010年(109)

2009年(166)

2008年(296)

分类:

2011-12-28 21:55:49

%CD%FC%D5%E6%E9%AA/blog/item/6a5138ac243766bcca130c4f.html

 

 

 


配置命令:

1 初始化

en                

conf t

no ip do lo

line 0              进入控制台

exec-t 0 0          禁止超时

logg sync           同步日志

exit

ho                  改名

2 配各端口IP

int 端口号

ip add IP地址 子网

no sh

3GZINternet之间配置自动拨号上网

internet:

1 配置各端口IP

internet(config)#int f2/0

internet(config-if)#ip add 202.116.1.46 255.255.255.240

internet(config-if)#no sh

internet(config-if)#int f1/0

internet(config-if)#ip add dhcp

internet(config-if)#no sh

internet(config-if)#int e0/0

internet(config-if)#ip add 201.106.1.46 255.255.255.240

internet(config-if)#no sh

internet(config-if)#int e0/1

internet(config-if)#ip add 61.8.32.30 255.255.255.240

internet(config-if)#no sh

配置loIP,用于测试:

int lo1

ip add 12.12.12.12 255.255.255.0

no sh

int lo2

ip add 13.13.13.13 255.255.255.0

no sh

2 配置企业PPPOE

vpdn enable    

bba-group pppoe global        全局启用PPPOE协议

virtual-template 1            创建虚拟接口模板:用于动态创建虚拟接口

                                    

ip local pool ADSL 202.100.1.1 202.100.1.10       定义IP地址池

定义virtual-template(虚拟接口模板)

int virtual-template 1

ip add 1.1.1.1 255.255.255.0

no sh

peer default ip add pool ADSL      从地址池中分配地址

enc ppp

ppp authentication pap

定义本地用户数据库:

username GZ password 123

username HK password 321

(用于pppoe客户端拨号的账号)

在端口上激活PPPOE

int e0/0

pppoe enable

no sh

int e0/3

pppoe enable

no sh

查看排错:

sh vpdn   查看所有的VPDN链接

sh user   查看当前正在使用的用户

GZ上配置企业用户PPPOE

接口下启用PPPOE,并创建一个拨号地址池 1

int e0/0

pppoe enable

pppoe-client dial-pool-number 1

定义一个虚拟拨号接口dialer 1,并调用拨号地址池:

int dialer 1

dialer pool 1

enc ppp

ppp pap sent-username GZ password 123

启用地址协商方式获取IP地址:

int dialer 1

ip add negotiated

end

int e0/0

no sh

配置NAT不然ping不通:

ip route 0.0.0.0 0.0.0.0 dialer 1

ip addess-list ex nat

permit ip 192.168.102.0 0.0.0.255 any

exit

ip nat in so list nat int dialer 1 overload

int dialer 1

ip nat outside

no sh

int e0/1

ip nat inside

end

家用拨号配置:

虚拟机直接连路由器,配置与企业的一样,虚拟机安装拨号工具,直接拨号即可!

查看排错:

sh run int e0/0       no ip address就对了

sh ip int br          显示多了Dialer,manuelYES IPCP up 就对了

虚拟机上ping 12.12.12.12     

        ping 13.13.13.13     

路由器上ping 12.12.12.12 source e0/1  

如有问题就关闭端口在启用。

HK上同样配置!!!

4 配置上网脚本:

路由器获取地址:

int f1/0

ip address dhcp

no sh

上网脚本:

ip access-list extend nat

permit ip 192.168.0.0 0.0.255.255 any

exit

ip nat inside source list nat int f1/0 overload

int r e0/0 -1

ip nat inside

int f1/0

ip nat outside

4506-SW1上配置STPVTPPVST+HSRP,VLAN

阅读(1748) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~