鄞州 发表于 2018-6-19 10:21:38

ASA5500系列防火墙配置手册

使用console连接线登录方法
1.使用cisco的console连接线,连接设备的console口和计算机com口(笔记本用USB转COM口连接线)
2.使用超级终端或secureCRT软件连接设备
串行选项: 波特率:9600 数据位:8 奇偶校验:无 停止位:1 数据流控制: RTS/CTS
登陆设备后,基本配置命令与cisco路由器保持一致。

1. 设置主机名:
<config>#hostname ASA5510
2. 设置时区:
<config>#clock timezone EST 7
3. 设置时钟:
#clock set 12:00:00 1 FEB 2012
4. 配置内接口IP
<config>#int Ethernet 0/0
<config-if>#nameif inside
<config-if>#security-level 100
<config-if>#ip address 192.168.55.254 255.255.255.0
5. 配置外部接口IP
<config>#int Ethernet 0/1
<config-if>#nameif outside
<config-if>#security-level 0
<config-if>#ip address 210.X.X.X 255.255.255.248
6. 配置用户名和密码
<config>#username admin password ********* encrypted
privilege 15 注:15 表示有最高权限
7. 配置HTTP 和TELNET
<config>#aaa authentication telnet console LOCAL <config>#http server enable
<config>#http 192.168.55.0 255.255.255.0 inside <config>#telnet 192.168.55.0 255.255.255.0 inside
8. 配置site to site vpn
crypto map outside_map 20 match address outside_cryptomap_20_1
crypto map outside_map 20 set pfs
crypto map outside_map 20 set peer 210.75.1.X
crypto map outside_map 20 set transform-set ESP-3DES-SHA
crypto map outside_map 20 set nat-t-disable
crypto map outside_map interface outside
Cisco清除配置使用:erase startup-config(删除NVRAM中的内容),然后重启路由器 reload;
华为清除配置使用:reset saved-configuration,重启路由器 reboot;
Cisco路由器、交换机口令恢复专题:http://www.net130.com/CMS/Pub/special/special_pass word/index.htm

关于快捷键:
ctrl+b(backward) 光标左移一个字符
ctrl+f(foreward) 光标右移一个字符
ctrl+a(a是?????) 光标移到命令开头
ctrl+e(end) 光标移到命令末端
esc+b (backward) 光标左移一个词
esc+f (foreward) 光标右移一个词
ctrl+z 一次性退出特权模式 Router#关于模式:用户模式(user execution mode),特权模式(privilege execution mode),全局配置模式(global configuration mode),以及在全局配置模式下的具体配置模式(如路由接口配置模式,路由子接口配置模式,路由协议配置模式,line配置模式等)模式的转换:连接路由后首先进入的是用户模式,特征是有符号">",用户模式只能查找路由的配置和状态,不能配置路由,需要配置路由必须进入特权模式,进入特权模式的命令是:enable 若有密码,需要正确密码才能进入,进入特权模式,其特征是有符号"#".从特权模式进入路由全局配置模式命令是:configure terminal
从全局配置模式进入各个具体配置模式的命令如下:
特权模式--->路由接口配置模式
interface serial??(串口)
interface ethernet??(以太网口)
特权模式--->路由子接口配置模式
subinterface
特权模式--->路由协议配置模式
route rip
特权模式--->line配置模式
line vty ? ?
以下是各个模式下的命令以及用法:
用户模式:Router>
show ping telnet connect的用法和特权模式一样
特权模式:Router#
show users 查看连接到路由器的所有用户
show hosts 查看ip和名字的映射表
show arp 查看ip地址解释
show protocol 查看路由器的协议
show version 查看ISO的版本,内存
show flash 查看flash使用状况
show clock 查看路由器的时间
show history 查看最近输入的十个命令
show ip interface brief 查看接口的ip设置和状态
show interfaces 查看路由器所有端口的状态
show interfaces 具体端口 查看路由器特定端口的状态
show running-config 查看在RAM中的配置文件
show startup-config 查看在NVRAM中的配置文件
show cdp 查看cdp的信息
show cdp entry ??(router) 查看特定的邻近连接的路由器
show cdp neighbors 查看所有邻近连接的路由器
show cdp neighbors detail 查看所有邻近连接的路由器详细信息
show cdp traffic 查看cdp数据包的信息
show cdp ??(端口号) 查看特定端口的cdp信息
show session 远程登陆下查看原路由器的状态
clear cdp counters 清除CDP计数器
clear cdp table 清除CDP信息
copy running-config startup-config 把在RAM中的配置文件复制到NVRAM中
copy startup-config running-config 把在NVRAM中的配置文件复制到RAM中
copy tftp running-config 把tftp服务器的配置文件传到RAM中
copy running-config tftp 把RAM中的配置文件传到tftp服务器
ping ??(名字或ip) 检查路由器与远端路由器的连通性
telnet ??(名字或ip) 远程登陆路由器(需要登陆密码)
connect ??(名字或ip) 和telnet一样
traceroute ??(名字或ip) 查看经过的路由
全局配置模式:Router(config)#
hostname ???(名字)
//配置服务器端ciscoasa(config)#crypto key generate rsa modulus 1024 //指定rsa系数的大小,这个值越大,产生rsa的时间越长,cisco推荐使用1024.
ciscoasa(config)#write mem    //保存刚刚产生的密钥
ciscoasa(config)#ssh 0.0.0.0 0.0.0.0 outside //0.0.0.0 0.0.0.0 表示任何外部主机都能通过SSH访问outside接口,当然你可以指定具体的主机或网络来进行访问,outside也可以改为inside即表示内部通过SSH访问防火墙
ciscoasa(config)#ssh timeout 30 //设置超时时间,单位为分钟
ciscoasa(config)#ssh version 1   //指定SSH版本,可以选择版本2
         
//配置客户端
ciscoasa(config)#passwd 密码 //passwd命令所指定的密码为远程访问密码,同样适用于telnet

鄞州 发表于 2018-6-19 10:47:03

SecureCRT SecureFX v8.3.2

https://zhangwenbing.com/blog/other/3401

鄞州 发表于 2018-6-19 10:54:08

一、 基础配置
1.1 密码配置 ciscoasa(config)#passwd password 一般用于telnet登陆ASA的登录密码
1.2 Enable密码配置 ciscoasa(config)#enable password password 用于进入enable特权模式的密码
1.3 设备命名 ciscoasa(config)#hostname hostname 用于设备命名管理
二、 接口配置
2.1 接口命名 ciscoasa(config)#interface interface_id 进入接口配置模式
ciscoasa(config-if)#nameif interface_name 配置接口名称
2.2 配置接口安全级别
ciscoasa(config-if)#security-level security_level 安全级别为0-100,0为最低
2.3 配置IP地址
ciscoasa(config-if)#ip address ip_address netmask 配置接口IP地址与掩码
2.4 关闭/激活接口
ciscoasa(config-if)#shutdown
//关闭接口
ciscoasa(config-if)#no shutdown
//激活接口
2.5 范例
ciscoasa(config)#interface g0/0
//进入g0/0接口
ciscoasa(config-if)#nameif outside
//配置g0/0接口名称为outside
ciscoasa(config-if)#security-level 0
//配置outside接口安全级别为0(outside接口默认安全级别为0)
ciscoasa(config-if)#ip address 218.21.217.161 255.255.255.252
//配置outside接口IP地址为218.21.217.162,掩码为255.255.255.252
ciscoasa(config-if)#no shutdown
//激活该接口
三、 路由配置
3.1 静态路由配置
ciscoasa(config)#route interface_name destination_network netmask gateway_address
interface_name:路由方向的接口名称
destination_network:目的网络地址
netmask:目的网络掩码
gateway_address:下一跳网关地址
3.2 外口默认路由配置
ciscoasa(config)#route outside 0 0 gateway_address
3.3 范例
ciscoasa(config)#route inside 172.16.0.0 255.255.0.0 192.168.100.1
//在inside接口上创建一条到172.16.0.0/16网络走192.168.100.1的路由,ASA会将到172.16.0.0/16网络的所有数据包转发给下一跳网关192.168.100.1
ciscoasa(config)#route outside 0 0 218.21.217.161
//创建一条外网的默认路由,ASA将所有的互联网流量发给internet网关218.21.217.161
四、 网络地址转换(NAT)配置
4.1 关于NAT
随着接入Internet的计算机数量的不断猛增,IP地址资源也就愈加显得捉襟见肘,即使是拥有几百台计算机的大型局域网用户,当他们申请IP地址时,所分配的地址也不过只有一个或几个IP地址,显然,这样少的IP地址根本无法满足网络用户的需求,于是也就产生了NAT技术。
借助于NAT,私有(保留)地址的"内部"网络通过路由器发送数据包时,私有地址被转换成合法的IP地址,一个局域网只需使用少量IP地址(甚至是1个)即可实现私有地址网络内所有计算机与Internet的通信需求。
NAT的实现方式有三种:动态NAT、静态NAT、PAT
动态NAT:指将内部网络的私有IP地址转换为公用IP地址时,IP地址对是不确定的,而是随机的,所有被授权访问上Internet的私有IP地址可随机转换为任何指定的合法IP地址。
静态NAT:指将内部网络的私有IP地址转换为公有IP地址,IP地址对是一对一的,是一成不变的,某个私有IP地址只转换为某个公有IP地址。
PAT: 指改变外出数据包的源端口并进行端口转换,即端口地址转换(PAT,Port Address Translation).采用端口多路复用方式。内部网络的所有主机均可共享一个合法外部IP地址实现对Internet的访问,从而可以最大限度地节约IP地址资源。同时,又可隐藏网络内部的所有主机,有效避免来自internet的攻击。因此,目前网络中应用最多的就是端口多路复用方式。
4.2 动态NAT的配置
ciscoasa(config)#nat (if_name) nat_id network netmask
if_name:激活NAT的接口,一般是inside
nat_id:NAT转换的序号,对应global序号
network:需要做NAT转换的网络
netmask:需要转换网络的掩码
ciscoasa(config)#global (if_name) nat_id address_range netmask netmask
if_name:NAT转换后的出接口名,一般是outside
nat_id:对应NAT转换的序号
address_range:用作NAT的地址池
netmask:地址池的掩码
范例:
ciscoasa(config)#nat (inside) 1 network 172.16.0.0 255.255.0.0
//在inside接口为172.16.0.0/16网络激活NAT
ciscoasa(config)#global (outside) 1 10.78.139.129-10.78.139.254 netmask 255.255.255.0
//把来自inside接口172.16.0.0/16网络的地址动态转换为10.78.139.129-254/24中的地址
4.3 静态NAT的配置
ciscoasa(config)#nat (if_name) nat_id host 255.255.255.255
if_name:激活NAT的接口,一般是inside
nat_id:NAT转换的序号,对应global序号
host:被转换的主机IP地址
ciscoasa(config)#global (if_name) nat_id address netmask
if_name:NAT转换后的出接口名,一般是outside
nat_id:对应NAT转换的序号
address:转换后的IP地址
netmask:转换后地址的掩码
范例:
ciscoasa(config)#nat (inside) 2 10.78.224.9 255.255.255.255
//为来自inside接口的10.78.224.9这个地址激活NAT
ciscoasa(config)#global (outside) 2 218.21.217.162 255.255.255.252
//将10.78.224.9这个地址转换为218.21.217.162
4.4 PAT的配置
ciscoasa(config)#nat (if_name) nat_id network netmask
if_name:激活NAT的接口,一般是inside
nat_id:NAT转换的序号,对应global序号
network:需要做NAT转换的网络
netmask:需要转换网络的掩码
ciscoasa(config)#global (if_name) nat_id interface
if_name:NAT转换后的出接口名,一般是outside
nat_id:对应NAT转换的序号
范例:
ciscoasa(config)#nat (inside) 3 172.16.0.0 255.255.0.0
//为来自inside接口的172.16.0.0/16网络激活NAT
ciscoasa(config)#global (outside) 3 interface
//把来自inside接口172.16.0.0/16网络的地址做PAT转换为outside接口的地址
4.5 端口映射的配置
4.5.1. 什么时候需要做端口映射
当外网需要访问内网中的一台服务器时,ASA并不知道访问的是哪一台内网中的机器,这时就需要做静态的端口映射。
4.5.2. 端口映射的配置 ciscoasa(config)#access-list list_name extended permit tcp/udp any host outside_address eq port_num(具体内容详见访问控制配置)
list_name:访问控制列表名称
tcp/udp:需要映射的协议类型
outside_address:outside接口IP地址
port_num:需要映射的端口号
ciscoasa(config)#static (inside,outside) tcp/udp interface port_num local_address port_num netmask 255.255.255.255
tcp/udp:需要映射的协议类型
port_num:映射前的端口号
local_address:映射后的内网主机IP地址
Port_num:映射后的端口号
ciscoasa(config)#access-group 100 in interface outside
//在outside接口in方向调用名称为100的访问控制列表
4.5.3. 范例:
ciscoasa(config)#access-list 100 extended permit tcp any host 218.21.217.162 eq 80
//允许外网访问218.21.217.162的tcp 80端口
ciscoasa(config)#static (inside,outside) tcp interface 80 10.78.224.10 80 netmask 255.255.255.255
//外网访问218.21.217.162的tcp 80端口时启用静态PAT映射至内网10.78.224.10的TCP 80端口
ciscoasa(config)#access-group 100 in interface outside inbound
//访问必须调用ACL
五、 访问控制(ACL)配置
5.1. 配置访问控制列表的一般步骤
配置访问控制列表
接口方向的调用
5.2. 标准访问控制列表
ciscoasa(config)#access-list list_name standard deny/permit des_address netmask
list_name:标准访问控制列表的名称
deny/permit:阻止/允许符合此条规则的流量
des_address:需要做控制的目的地址
netmask:需要做控制的目的地址的掩码
ciscoasa(config)#access-group list_name in/out interface interface_name
in/out:调用接口的入/出方向
interface_name:调用控制列表的接口名
5.3. 扩展访问控制列表
ciscoasa(config)#access-list list_name extended deny/permit tcp/udp sour_address sour_netmask des_address des_netmask eq port_num
list_name:扩展访问控制列表名称
deny/permit:阻止/允许符合此条规则的流量
tcp/udp:此条规则匹配的协议
sour_address:此条规则匹配的源地址
sour_netmask:此条规则匹配的源地址掩码
des_address:此条规则匹配的目的地址
des_netmask:此条规则匹配的目的地址掩码
port_num:此条规则所匹配的端口号
ciscoasa(config)#access-group list_name in/out interface interface_name
in/out:调用接口的入/出方向
interface_name:调用控制列表的接口名
5.4. 范例
ciscoasa(config)#access-list 400 extended deny udp 10.78.224.0 255.255.255.0 61.134.1.4 255.255.255.255 eq 53
//阻止源地址10.78.224.0/24网段对目的地址61.134.1.4主机UDP 53端口
ciscoasa(config)#access-group 400 in interface inside
//在inside接口的入方向调用
六、 ASA防火墙工作状态调试
6.1. 防火墙健康检查
查看当前ASA配置
ciscoasa#show run
查看CPU利用率
ciscoasa#show cpu usage (show cpu usage context all 正常应该在80%以下)
内存利用:
ciscoasa#show memory
Xlate 表大小:
ciscoasa#show xlate count
Conn 表大小:
ciscoasa#show conn count
端口状态:
ciscoasa#show interface interface_name
6.2. 验证防火墙的连接性
ping测试:
ciscoasa#ping ip_address
traceroute测试:
ciscoasa#traceroute ip_address
查看路由表:
ciscoasa#show route
ASA防火墙ACL检查:
ciscoasa#show access-list

鄞州 发表于 2018-6-19 10:55:28

在三层交换机上,支持多种类型的ACL,有支持IP的ACL还有支持MAC的Ethernet ACL。
IP ACL只过滤IPv4流量,而Ethernet ACL过滤除IP之外的流量,也就是非IP流量。
根据ACL不同的应用,可以分成三种:Port ACL,Router ACL,VLAN ACL(VLAN map)

Port ACL
应用在二层接口上的,并没有任何特别之处,将任何ACL应用到二层接口后,就称为Port ACL,但在二层接口只支持in方向,一个接口只能使用一条ACL,IP或MAC的ACL都可以应用到二层接口,但不能应用到EtherChannel。

Router ACL
和路由器接口上应用的ACL没有区别,将任何ACL应用到三层接口后,就称为Router ACL,但只能是IP ACL,不能是MAC ACL。Router ACL在in和out方向上都可以使用,每个接口每个方向只能使用一条ACL。

VLAN ACL(VLAN map)
使用在VLAN与VLAN之间的ACL,相同VLAN也是可以过滤,只要流量是进入或离开指定的VLAN,都会被过滤,可以同时控制二层与三层流量。准确地讲,VLANACL并不是一个ACL,只是一个能调用ACL到VLAN的技术,只要被调用的ACL支持什么功能,那么VLANACL就支持什么功能。当需要控制IPv4流量时,VLANACL需要调用IP ACL,而其它流量则需要靠调用MAC ACL。当应用VLANACL后,进入或离开VLAN的流量都会被检测,无论是通过二层转发的还是三层转发的。而VLANACL是不能定义方向的,所以所有经过指定VLAN的流都都会被过滤到。
VLANACL根据所调用的ACL匹配到的流量,来做出是转发还是丢弃的动作,当被调用的ACL匹配到流量后,默认动作是转发,可以改为丢弃,而没有被匹配到的流量,默认也全部丢弃。

以上三种方式的ACL可以同时使用,但Port ACL优先于任何ACL。

说明:
★Port ACL支持标准,扩展ACL和MAC ACL,也就是支持所有类型ACL。
★接口上可同时应用IP和MAC ACL,而MAC ACL是不能过滤IP流量的。
★Router ACL可用在SVI,三层接口,或3层EtherChannel,每个接口每个方向只能使用一个。
★在配置IP ACL时,可以使用数字,也可以使用名字,而命名ACL的好处是可以删除单条ACL语句,而数字ACL则不可以,只能删除整条ACL。
★交换机上不支持Dynamic ACL和 Reflexive ACL。
★VLANACL是不能定义方向的,也就相当于会在两个方向上同时生效,所以在配置VLAN ACL时,所以请注意所写的ACL一定要考虑来回两个方向,否则只匹配到单向的流量,另外一方向可能被丢掉。
★一个VLANACL可以用于多个VLAN,但一个VLAN只能使用一个VLANACL。
★被ACL拒绝的ICMP,ACL将向源发送ICMP-unreachable。

1.配置MAC ACL
说明:在VLAN或2层接口上过滤非IP流量,3层接口上不能使用MAC ACL。

(1)定义MAC ACL:
sw1(config)#mac access-list extended cisco
sw1(config-ext-macl)#deny host 0001.0001.0001 host 0002.0002.0002 netbios
sw1(config-ext-macl)#permit any any
说明:拒绝源MAC为0001.0001.0001发送到MAC为 0002.0002.0002的netbios流量,并允许其它所有,MAC ACL匹配的协议为非IP协议,协议可以不指定。

(2)应用MAC ACL
sw1(config)#int f0/1
sw1(config-if)#mac access-group cisco in
说明:在二层接口F0/1上使用,并且只能应用于in方向。因为MAC ACL只能过滤非IP流量,所以难以用实验来验证效果。


2.配置Port ACL
说明:将任何ACL应用于二层接口,便称为Port ACL。
以下图为例,在SW1上配置Port ACL拒绝R3去往R1的流量,并放行其它所有流量。

Security <wbr>with <wbr>ACL <wbr>以及配置
(1)测试在没有配置Port ACL之前的网络连通性
r3#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r3#ping 10.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
r3#
说明:在没有配置Port ACL之前,R3到R1与R2的通信正常。

(2)在SW1上配置Port ACL(只能用于in方向)
sw1(config)#access-list 100 deny ip host 10.1.1.3 host 10.1.1.1
sw1(config)#access-list 100 permit ip any any
sw1(config)#int f0/3
sw1(config-if)#ip access-group 100 in

(3)测试配置Port ACL之后的网络连通性
r3#ping 10.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r3#
r3#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
r3#
说明:可以看到,Port ACL拒绝了R3去往R1的流量,并放行其它流量。

3.配置VLAN ACL(VLAN map)


Security <wbr>with <wbr>ACL <wbr>以及配置

说明:以上图为例,所有接口在VLAN1,配置VLAN ACL,设置R4到R1的为默认动作,设置R4到R2的为丢弃动作,其它流量不作设置。

(1)测试在没有配置VLAN ACL之前的网络连通性
r4#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r4#
r4#ping 10.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
r4#
r4#ping 10.1.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r4#
说明:在没有配置VLAN ACL之前,所有通信正常。

(2)创建各ACL
sw1(config)#access-list 111 permit ip host 10.1.1.4 host 10.1.1.1      
sw1(config)#access-list 111 permit ip host 10.1.1.1 host 10.1.1.4
sw1(config)#access-list 112 permit ip host 10.1.1.4 host 10.1.1.2   
sw1(config)#access-list 112 permit ip host 10.1.1.2 host 10.1.1.4
说明:分别匹配R4到R1的流量,R4到R2的流量,因为VLAN ACL没有方向,也就是在两个方向生效,所以请注意所写的ACL一定要考虑来回两个方向,否则只匹配到单向的流量,另外一方向可能被丢掉。

(3)配置VLAN ACL
sw1(config)#vlan access-map ccie 10
sw1(config-access-map)#match ip address 111
sw1(config-access-map)#exit

sw1(config)#vlan access-map ccie 20
sw1(config-access-map)#match ip address 112
sw1(config-access-map)#action drop
sw1(config-access-map)#exit

说明:设置ACL 111的流量为默认动作,ACL 112的流量被明确丢弃,其它不匹配。

(4)应用VLAN ACL
sw1(config)#vlan filter ccie vlan-list 1

说明:将VLAN ACL应用于VLAN 1,也可以应用于多个VLAN,但不能设置方向。

(5)测试配置VLAN ACL之后的网络连通性
r4#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r4#
r4#ping 10.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
r4#
r4#ping 10.1.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
r4#
说明:R4去往R1的流量是默认动作,证明默认动作是允许转发的,而R4去往R2的流量被明确丢弃了,最后其它没有设置的流量,全部是被隐含拒绝的。

鄞州 发表于 2018-6-19 10:56:07

pppoe是point-to-point protocol over ethernet的简称,可以使以太网的主机通过一个简单的桥接设备连到一个远端的接入集中器上。通过pppoe协议,远端接入设备能够实现对每个接入用户的控制和计费。目前流行的宽带接入方式ADSL 就使用了pppoe协议。
   PPPoE协议的工作流程包含发现和会话两个阶段,发现阶段是无状态的,目的是获得PPPoE终结端(在局端的ADSL设备上)的以太网MAC地址,并建立一个唯一的PPPoESESSION-ID。发现阶段结束后,就进入标准的PPP会话阶段。
  当一个主机想开始一个PPPoE会话,它必须首先进行发现阶段,以识别局端的以太网MAC地址,并建立一个PPPoESESSION-ID。在发现阶段,基于网络的拓扑,主机可以发现多个接入集中器,然后允许用户选择一个。当发现阶段成功完成,主机和选择的接入集中器都有了他们在以太网上建立PPP连接的信息。直到PPP会话建立,发现阶段一直保持无状态的Client/Server(客户/服务器)模式。一旦PPP会话建立,主机和接入集中器都必须为PPP虚接口分配资源。


Server端配置:

PPPOE(config)#vpdn enable#启用虚拟拨号网络vpdn功能
PPPOE(config)#vpdn-group 1 #启用一个vpdn组,让人能够拨他
PPPOE(config-vpdn)#accept-dialin #接受拨入
PPPOE(config-vpdn-acc-in)#protocol pppoe
% PPPoE config from vpdn-group is converted to pppoe-profile based config.
% Continue PPPoE configuration under 'bba-group pppoe global'
NOTICE:继续配置敲上面提示的命令,不支持tab了
PPPOE(config-vpdn-acc-in)#bba-group pppoe global
PPPOE(config-bba-group)#virtual-template 1 #关联一个虚模板

然后配置虚模板
PPPOE(config)#int virtual-template 1
PPPOE(config-if)#ip add 100.100.1.1 255.255.255.0   #PPPOE服务端的IP
PPPOE(config-if)#encapsulation ppp
PPPOE(config-if)#peer default ip address pool pppoe #为拨入的用户分配一个IP,在ip池 pppoe 中找一个分配出去
PPPOE(config-if)#ppp authentication pap/chap      #配认证
建立IP池
PPPOE(config)#ip local pool pppoe 100.1.1.1 100.1.1.100
PPPOE(config)#username cisco password cisco         #配置一个用户名密码
进物理接口启用pppoe
PPPOE(config)#int f1/0
PPPOE(config-if)#pppoe ena
PPPOE(config-if)#no shu

路由器做客户端配置:
client(config)#int f0/0
client(config-if)#pppoe ena
client(config-if)#pppoe-client dial-pool-number 1 #关联一个拨号池
client(config)#int dialer 1                     #建一个拨号虚接口
client(config-if)#ip add negotiated               #地址自动获取
client(config-if)#encapsulation ppp
client(config-if)#ppp pap sent-username benet password test
client(config-if)# ppp authentication pap callin #认证回拨
client(config-if)#mtu 1492                     #减8byte的ip头
client(config-if)#dialer pool 1                  #关联dialer池
client(config)#ip route 0.0.0.0 0.0.0.0 dialer 1
分享:
页: [1]
查看完整版本: ASA5500系列防火墙配置手册