我的问题是:华为路由器与华为防火墙怎么让各自下面的设备互通:我有一台华为路由器企业级,单独的公网IP,下联设备,一台华为防火墙,单独的公网IP,下联设备,如何让这两个不在同一个外网下的设备能够互访?
(一)实验简介
如图所示,某公司出口连接两个路由器,以双链路接入Internet,为了保证在链路故障时可以动态调整,FW和两台路由器之间配置静态路由绑定IP-Link,将Router 1 为主链路,在出现故障时Router 2切换为主链路,从而不影响内网用户正常访问 Internet
网络拓朴结构
(二)实验目的
掌握配置静态路由的方法;
掌握 IP-Link 的配置方法;
掌握静态路由与IP-Link联动的场景配置方法。
(三)实验条件
一台CPU支持VT技术,内存4GB以上的计算机;
安装eNSP模拟器B510版,导入USG6000V镜像;
终端工具:SecuretyCRT,Putty,Psftp,XShell等。
(四)网络拓朴图
打开ENSP软件,按如下拓朴图创建实验环境,设置地址:
LAN地址:192.168.10.0/24;
ISP1地址:10.1.1.0/24;
ISP2地址:10.2.2.0/24;
Internet地址:10.66.66.0/24;
实验6拓朴(五)配置思路
配置LAN客户机地址,交换机;
配置ISP1,IPS2路由器;
配置Internet客户机的地址,交换机;
配置防火墙的接口,安全域,安全策略;
配置IP-LINK;
配置静态路由与IP-LINK联动。
(六)配置步骤
(1)配置LAN的网络
以下为LAN所在网络的客户机PC1的配置
PC1的网络地址交换机LSW1的配置
The device is running! <Huawei>system-view //进入系统配置视图 Enter system view, return user view with Ctrl+Z. [Huawei]sysname LSW1 //修改交换机名为LSW1 [LSW1] [LSW1]undo info-center enable //关闭信息提示 Info: Information center is disabled. [LSW1]interface Vlanif 1 //进入vlan接口配置视图 [LSW1-Vlanif1]ip address 192.168.10.254 24 //配置vlan的IP地址 [LSW1-Vlanif1]quit //退出vlan接口配置,返回系统配置视图 [LSW1] [LSW1]ip route-static 0.0.0.0 0.0.0.0 192.168.10.1 //配置交换机的默认路由 [LSW1]quit //退出系统配置视图,返回用户视图 <LSW1>save //保存配置 The current configuration will be written to the device. Are you sure to continue?[Y/N]y Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]: Now saving the current configuration to the slot 0. Save the configuration successfully. <LSW1>(2) 配置ISP1网络
路由器AR1的配置
The device is running! <Huawei>system-view //进入系统配置视图 Enter system view, return user view with Ctrl+Z. [Huawei]undo info-center enable //关闭信息提示 Info: Information center is disabled. [Huawei]sysname AR1 //修改路由器名为AR1 [AR1] [AR1]interface GigabitEthernet 0/0/0 //进入接口GE0/0/0配置视图 [AR1-GigabitEthernet0/0/0]ip address 10.1.1.2 24 //配置接口GE0/0/0的IP地址 [AR1-GigabitEthernet0/0/0]quit //退出接口配置,返回系统配置视图 [AR1]interface GigabitEthernet 0/0/1 //进入接口GE0/0/1配置视图 [AR1-GigabitEthernet0/0/1]ip address 10.66.66.3 24 //配置接口GE0/0/1的IP地址 [AR1-GigabitEthernet0/0/1]quit //退出接口配置,返回系统配置视图 [AR1] [AR1]ip route-static 10.66.66.0 24 10.66.66.254 //配置通往Internet的静态路由 [AR1]ip route-static 10.2.2.0 24 10.66.66.4 //配置通往ISP2的静态路由 [AR1] [AR1]quit //退出系统配置视图,返回用户视图 <AR1>save //保存配置 The current configuration will be written to the device. Are you sure to continue? (y/n)[n]:y It will take several minutes to save configuration file, please wait....... Configuration file had been saved successfully Note: The configuration file will take effect after being activated <AR1>(3) 配置ISP2网络
路由器AR2的配置
The device is running! <Huawei>system-view //进入系统配置视图 Enter system view, return user view with Ctrl+Z. [Huawei]undo info-center enable //关闭信息提示 Info: Information center is disabled. [Huawei]sysname AR2 //修改路由器名为AR2 [AR2] [AR2]interface GigabitEthernet 0/0/0 //进入接口GE0/0/0配置视图 [AR2-GigabitEthernet0/0/0]ip address 10.2.2.2 24 //配置接口GE0/0/0的IP地址 [AR2-GigabitEthernet0/0/0]quit //退出接口配置,返回系统配置视图 [AR2]interface GigabitEthernet 0/0/1 //进入接口GE0/0/1配置视图 [AR2-GigabitEthernet0/0/1]ip address 10.66.66.4 24 //配置接口GE0/0/1的IP地址 [AR2-GigabitEthernet0/0/1]quit //退出接口配置,返回系统配置视图 [AR2] [AR2]ip route-static 10.66.66.0 24 10.66.66.254 //配置通往Internet的静态路由 [AR2]ip route-static 10.1.1.0 24 10.66.66.3 //配置通往ISP1的静态路由 [AR2] [AR2]quit //退出系统配置视图,返回用户视图 <AR2>save //保存配置 The current configuration will be written to the device. Are you sure to continue? (y/n)[n]:y It will take several minutes to save configuration file, please wait....... Configuration file had been saved successfully Note: The configuration file will take effect after being activated <AR2>(4) 配置Internet网络
以下为Internet网络的服务器Server1的配置
Server1的网络地址交换机LSW2的配置
The device is running! <Huawei>system-view //进入系统配置视图 Enter system view, return user view with Ctrl+Z. [Huawei]sysname LSW3 //修改交换机名为LSW2 [LSW2] [LSW2]undo info-center enable //关闭信息提示 Info: Information center is disabled. [LSW2]interface Vlanif 1 //进入vlan接口配置视图 [LSW2-Vlanif1]ip address 10.66.66.254 24 //配置vlan的IP地址 [LSW2-Vlanif1]quit //退出vlan接口配置,返回系统配置视图 [LSW2] [LSW2]ip route-static 10.1.1.0 255.255.255.0 10.66.66.3 //配置通往ISP1的静态路由 [LSW2]ip route-static 10.2.2.0 255.255.255.0 10.66.66.4 //配置通往ISP2的静态路由 [LSW2] [LSW2]quit //退出系统配置视图,返回用户视图 <LSW2>save //保存配置 The current configuration will be written to the device. Are you sure to continue?[Y/N]y Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]: Now saving the current configuration to the slot 0. Save the configuration successfully. <LSW2>(5) 配置防火墙的接口
分别为防火墙的各个接口配置IP地址,网关,允许ping
<USG6000V1>system-view //进入系统视图 Enter system view, return user view with Ctrl+Z. [USG6000V1]info-center disable //关闭信息提示 Info: Information center is disabled. [USG6000V1]sysname FW1 //修改设备名称 [FW1] [FW1]interface GigabitEthernet 1/0/1 //进入GE1/0/1接口 [FW1-GigabitEthernet1/0/1]ip address 192.168.10.1 24 //配置接口的IP地址 [FW1-GigabitEthernet1/0/1]gateway 192.168.10.254 //配置接口网关 [FW1-GigabitEthernet1/0/1]service-manage ping permit //允许PING [FW1-GigabitEthernet1/0/1]quit //退出接口配置视图,返回系统视图 [FW1] [FW1]interface GigabitEthernet 1/0/2 //进入GE1/0/2接口 [FW1-GigabitEthernet1/0/2]ip address 10.1.1.1 24 //配置接口的IP地址 [FW1-GigabitEthernet1/0/2]gateway 10.1.1.254 //配置接口网关 [FW1-GigabitEthernet1/0/2]service-manage ping permit //允许PING [FW1-GigabitEthernet1/0/2]quit //退出接口配置视图,返回系统视图 [FW1] [FW1]interface GigabitEthernet 1/0/3 //进入GE1/0/2接口 [FW1-GigabitEthernet1/0/3]ip address 10.2.2.1 24 //配置接口的IP地址 [FW1-GigabitEthernet1/0/3]gateway 10.2.2.254 //配置接口网关 [FW1-GigabitEthernet1/0/3]service-manage ping permit //允许PING [FW1-GigabitEthernet1/0/3]quit //退出接口配置视图,返回系统视图 [FW1]防火墙的接口加入到相应的安全域中
[FW1] [FW1]firewall zone trust //进入安全域trust配置 [FW1-zone-trust]add interface GigabitEthernet 1/0/1 //把GE1/0/1加入安全域 [FW1-zone-trust]quit //退出安全域配置视图,返回系统视图 [FW1] [FW1] [FW1]firewall zone name untrust //进入安全域untrust [FW1-zone-untrust]add interface GigabitEthernet 1/0/2 //把GE1/0/2加入安全域 [FW1-zone-untrust]add interface GigabitEthernet 1/0/3 //把GE1/0/3加入安全域 [FW1-zone-untrust]quit //退出安全域配置视图,返回系统视图 [FW1](6) 配置IP-Link
IP-Link,即链路可达性检查,通过FW定时地向指定的目的IP进行ICMP回显请求或ARP请求,并等待应答。
[FW1] [FW1]ip-link check enable //启用IP-Link链路检查 [FW1]ip-link name link_isp1 //创建名为link_isp1的检查 [FW1-iplink-link_isp1]destination 10.1.1.2 interface GigabitEthernet 1/0/2 mode icmp [FW1-iplink-link_isp1] //检查目的地为10.1.1.2,通过GE1/0/2,使用ICMP报文 [FW1-iplink-link_isp1]quit //退出配置视图,返回系统视图 [FW1] [FW1]ip-link name link_isp2 //创建名为link_isp2的检查 [FW1-iplink-link_isp2]destination 10.2.2.2 interface GigabitEthernet 1/0/3 mode icmp [FW1-iplink-link_isp2] //检查目的地为10.2.2.2,通过GE1/0/3,使用ICMP报文 [FW1-iplink-link_isp2]quit [FW1] [FW1]ip route-static 10.66.66.0 24 10.1.1.2 track ip-link link_isp1 //绑定静态路由 [FW1]ip route-static 10.66.66.0 24 10.2.2.2 track ip-link link_isp2 //绑定静态路由 [FW1]ip route-static 192.168.10.0 24 192.168.10.254 //通往内网的静态路由 [FW1](7) 配置防火墙的安全策略
为防火墙的安全域之间的访问设置安全策略
[FW1] [FW1]security-policy //进入安全策略配置视图 [FW1-policy-security]rule name lan_wan //创建安全规则 [FW1-policy-security-rule-lan_wan]source-zone trust //设置源安全域 [FW1-policy-security-rule-lan_wan]destination-zone untrust //设置目的安全域 [FW1-policy-security-rule-lan_wan]action permit //允许匹配规则的流量通过 [FW1-policy-security-rule-lan_wan]quit //退出规则视图,返回安全策略视图 [FW1-policy-security] [FW1-policy-security]rule name iplink_check //创建安全规则 [FW1-policy-security-rule-iplink_check]source-zone local //设置源安全域 [FW1-policy-security-rule-iplink_check]destination-zone untrust //设置目的安全域 [FW1-policy-security-rule-iplink_check]action permit //允许匹配规则的流量通过 [FW1-policy-security-rule-iplink_check]quit //退出规则视图,返回安全策略视图 [FW1-policy-security]quit //退出安全策略配置视图,返回系统视图 [FW1] [FW1](8) 测试
使用命令 display ip-link
(七)参考资料
华为模拟器eNSP软件,
华为模拟器eNSP社区,
HCNA-Security 华为认证网络安全工程师,
HCNP-Security 华为认证网络安全资深工程师,
HUAWEI USG6000V V500R001C10SPC100 典型配置案例,
HUAWEI USG6000V V500R001C10SPC100 管理员指南,
HUAWEI USG6000V V500R001C10SPC100 命令参考 ,