新能源车停车充电方法图解,让绿色出行更便捷
随着我国新能源汽车产业的快速发展,越来越多的消费者选择购买新能源汽车。许多车主在停车充电方面存在一些困惑。本文将结合新能源车停车充...
扫一扫用手机浏览
之前有客户要求,把电信链路设置装备摆设为上彀主要链路,联通链路则作为备份使用,我固然感到很挥霍,但照样照做了,由于客户总会有本身的斟酌。
设置装备摆设完成交付使用后,趁便跟客户提了一下我的概念,然后IT就报告请示了引导,于是又要求改为:主要营业使用电信链路,别的利用就使用联通链路,当某个链路呈现故障的时刻,能主动切换。
客户乐意接受我的意见和建议,是值得愉快的工作,那么活儿又来了,历久外包的客户,这种工作是不会另外收费的,想问我收若干银两同伙,就别再问我了。
进正题吧,如上图所示,出口是一台华为路由器,接入两条宽带,分离是电信和联通,都有固定IP;下面是台华为三层互换机,二层互换机就疏忽了,没画出来,对我们本日要讲的内容,没什么影响。
一、路由器的设置装备摆设:
第一步,设置装备摆设接口IP
interface GigabitEthernet0/0/0
ip address 222.92.xx.xx 255.255.255.252
interface GigabitEthernet0/0/1
ip address 221.6.x.xxx 255.255.255.252
interface GigabitEthernet0/0/2
ip address 192.168.46.1 255.255.255.252
第二步,设置装备摆设NQA,1为电信,2为联通
nqa test-instance user nqa1 //创立nqa1
test-type icmp //设置类型为icmp,也便是ping
destination-address ipv4 222.92.xx.xx //设置目的IP,也便是运营商给的网关IP
frequency 15 // 设置NQA主动执行测试的光阴距离为15秒
source-interface GigabitEthernet0/0/0 //设置源接口
start now //立刻开端
nqa test-instance user nqa2
test-type icmp
destination-address ipv4 221.6.x.xxx
frequency 15
source-interface GigabitEthernet0/0/1
start now
第三步,设置装备摆设默认路由与NQA联动
ip route-static 0.0.0.0 0.0.0.0 222.92.76.1 track nqa user nqa1
ip route-static 0.0.0.0 0.0.0.0 221.6.4.1 track nqa user nqa2
第四步,设置装备摆设VLAN的回程路由
ip route-static 192.168.10.0 255.255.255.0 192.168.46.2
ip route-static 192.168.20.0 255.255.255.0 192.168.46.2
第五步,创立ACL指定匹配规矩
acl number 3001
rule 5 permit ip source 192.168.10.0 0.0.0.255
acl number 3002
rule 5 permit ip source 192.168.20.0 0.0.0.255
第六步,设置装备摆设流分类
traffic classifier ct operator or
if-match acl 3001
traffic classifier cu operator or
if-match acl 3002
第七步,设置装备摆设流行动,并与NQA联动
traffic behavior ct
redirect ip-nexthop 222.92.76.1 track nqa user nqa1
traffic behavior cu
redirect ip-nexthop 221.6.4.1 track nqa user nqa2
第八步,设置装备摆设流策略,绑定流分类和流行动
traffic policy tu
classifier ct behavior ct
classifier cu behavior cu
第九步,衔接内网的接口利用策略
interface GigabitEthernet0/0/2
traffic-policy tu inbound
第十步,创立上彀的ACL,设置装备摆设easy-ip NAT
acl number 2999
rule 5 permit
interface GigabitEthernet0/0/0
nat outbound 2999
interface GigabitEthernet0/0/1
nat outbound 2999
二、互换机的设置装备摆设:
vlan batch 10 20 46
dhcp enable
ip pool vlan10
gateway-list 192.168.10.1
network 192.168.10.0 mask 255.255.255.0
excluded-ip-address 192.168.10.2 192.168.10.20
dns-list 114.114.114.114
ip pool vlan20
gateway-list 192.168.20.1
network 192.168.20.0 mask 255.255.255.0
excluded-ip-address 192.168.20.2 192.168.20.20
dns-list 114.114.114.114
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
dhcp select global
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
dhcp select global
interface Vlanif46
ip address 192.168.46.2 255.255.255.252
interface GigabitEthernet0/0/1
port link-type access
port default vlan 46
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
ip route-static 0.0.0.0 0.0.0.0 192.168.46.1
三、测试
设置装备摆设完成后,属于VLAN10的PC1测试上彀,打开ip138网站,显示为电信IP,反之,PC2则显示为联通IP,表现选路策略设置装备摆设正确;
手动断开衔接电信光猫的网线,PC1也显示为联通的IP了,规复网线衔接后,流量又回到电信的链路;反之,断开联通的链路,PC2的流量也顺遂切换到电信的链路了,规复后,也会回到联通链路;抓包软件同样监测到以上切换进程,至此,表现设置装备摆设正确无误。