常用命令
配置RIP
\\配置RIP
FW1(config)# ip vrouter trust-vr
FW1(config-vrouter)# router rip
FW1(config-router)# network 172.16.50.6/30
配置OSPF
\\防火墙配置OSPF
FW1(config)# ip vrouter trust-vr \\进入路由配置
FW1(config-vrouter)# router ospf \\进行配置OSPF
FW1(config-router)# network 172.16.50.6/30 area 0
\\配置OSPF 认证
area 33 authentication message-digest \\启用OSPF认证
interface Vlan5 \\进入VLAN
ip ospf authentication message-digest \\启用OSFP认证
ip ospf authentication-key 0 OspfArea \\配置密钥
default-information originate always metric 5 \\下发默认路由
配置聚合接口
interface aggregate1 \\配置聚合口IP地址
zone "trust"
ip address 172.16.99.254 255.255.255.0
manage ping
将接口划入聚合组
interface ethernet0/1
aggregate aggregate1
interface aggregate1.1000 \\创建聚合口子接口
zone "trust"
ip address 10.80.255.2 255.255.255.252
interface ethernet0/3 \\将对应的接口划入聚合子接口
aggregate aggregate1
interface aggregate1 \\将集聚口启用LACP协议,是用来和交换机做聚合使用的
lacp enable
其他命令
expanded-port-poo \\开启扩展PAT端口地址池功能
FW1(config-if-eth0/1)# manage ip 172.20.97.2 \\指定管理ip
FW-config_g0/6#speed 100 \\设置接口速率
rule id 1 \\创建策略
action permit \\动作
src-addr "Any" \\匹配源ip
dst-addr "Any" \\匹配目的地址
service "Any" \\匹配所有服务
这里没有写区域表示放行所有区域
实例
在FW1上使用BGP MED属性进行业务选路配置,只允许使用Route-map来改变MED属性,且MED值必须为100或200,使FW2从R1学到的路由Metric值为100,从R2学到的路由Metric值为200;
配置route-map
FW2:
access-list route "MED" permit any \\创建ACL匹配流量
route-map "FW2-R1" permit 10 \\创建路由策略
match ip address "MED" \\匹配ACL
set metric 100 \\修改MED
route-map "FW2-R2" permit 10
match ip address "MED"
set metric 200
router bgp 65500
neighbor 1.1.1.1 route-map FW2-R1 in
neighbor 2.2.2.2 route-map FW2-R2 in
#奇怪了,如果按道理来讲,在R1和R2上设置,然后应用route-map到BGP中,设为out方向应该也能修改成功,但是我设了基础还是不行,也不知道为什么,我玩思科的时候也是这样,这个原因以后再去考察,反正在防火墙in方向接收的肯定会修改成功就对了
HA
hostname(config)# track trackobj1 \\配置检测对象
hostname(config-trackip)# interface ethernet0/0 weight 255 \\检测接口
hostname(config-trackip)# exit
hostname(config)# ha group 0 \\指定HA组
hostname(config-ha-group)# priority 50 \\指定优先级
hostname(config-ha-group)# monitor track trackobj1 \\指定检测对象
hostname(config-ha-group)# exit
hostname(config)# ha link interface ethernet0/2 \\指定HA连接接口,用来同步时传输数据用的同步时接口要UP
hostname(config)# ha link interface ethernet0/3
hostname(config)# ha link ip 1.1.1.1/24 \\HA连接接口IP
hostname(config)# ha cluster 1 \\将设备加入HA簇中开启HA功能
这是主的配置 (备的配置需要把节点改掉和优先级改大)
配置主主可能还需要修改簇ID(不太确定要验证)
hostname(config)# interface ethernet0/1 \\配置管理IP地址
hostname(config-if-eth0/1)# zone trust
hostname(config-if-eth0/1)# manage ip 192.168.1.253
ha sync rdo session \\启用HA会话同步
查看 HA 簇配置信息:show ha cluster
查看 HA 组配置信息:show ha group {config | group-id} ¨
查看 HA 连接配置状态:show ha link status
查看 HA 同步状态:show ha sync state {pki | dns | dhcp | vpn | ntp | config | flow | scvpn | l2tp | route}
查看 HA traffic 状态:show ha traffic status
查看 HA traffic 报文延迟时间:show ha traffic delay
查看 HA 同步统计信息:show ha sync statistic {pki | dns | dhcp | vpn | ntp | config | scvpn | route}
显示接收和发送的 HA 协议统计信息:show ha protocol statiscitc
显示已同步或未同步的 HA 会话信息:show session {sync | unsync}
显示 HA 统计信息:show ha flow statistic
配置GRE隧道
tunnel gre "FW1-R1-GRE" \\创建隧道
source interface ethernet0/3 \\源
destination 172.20.99.253 \\目
interface ethernet0/4 \\指定出接口
绑定GRE到隧道接口
interface tunnel1 \\进入隧道接口
zone "trust"
ip address 172.20.253.18 255.255.255.252
manage ping
tunnel gre FW2-R1-tunnl gw 172.20.254.17 \\调用定义的隧道,gw表示定义隧道下一跳地址
配置SSLvpn
配置防火墙透明模式
FW-1(config)# interface e0/7
FW-1(config-if-eth0/7)# zone l2-trust
FW-1(config)# interface e0/6
FW-1(config-if-eth0/6)# zone l2-untrust
FW-1(config)# vswitch vswitch1
FW-1(config-vswitch)# virtual-wire enable unstrict
FW-1(config-vswitch)# virtual-wire set ethernet0/6 ethernet0/7