技术分享
网络的高可用性
2017-09-17
进入系统视图, 键入Ctrl+Z退回到用户视图.
[fw-1]firewall packet-filter default permit
[fw-1]firewall zone trust
[fw-1-zone-trust]add interface e0/2
[fw-1-zone-trust]add interface e0/3
[fw-1-zone-trust]add interface e0/4
[fw-1]int Ethernet0/2
[fw-1-Ethernet0/2]ip add 192.168.2.1 24
[fw-1-Ethernet0/2]quit
[fw-1]int Ethernet 0/3
[fw-1-Ethernet0/3]ip add 192.168.3.1 24
[fw-1-Ethernet0/3]quit
[fw-1]int Ethernet 0/4
[fw-1-Ethernet0/4]ip add 192.168.4.254 24
[fw-1-Ethernet0/4]loopback
[fw-1]osp
[fw-1]ospf
[fw-1-ospf-1]area 0
[fw-1-ospf-1-area-0.0.0.0]ne
[fw-1-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[fw-1-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[fw-1]ip route-static 192.168.4.0 24 192.168.3.2 preference 60
< fw-3>sys
进入系统视图, 键入Ctrl+Z退回到用户视图.
[fw-3]firewall packet-filter default permit
[fw-3]firewall zone trust
[fw-3-zone-trust]add interface Ethernet 0/2
[fw-3-zone-trust]add interface Ethernet 0/3
[fw-3-zone-trust]add interface Ethernet 0/4
[fw-3]interface Ethernet 0/2
[fw-3-Ethernet0/2]ip add 192.168.2.2 24
[fw-3-Ethernet0/2]quit
[fw-3]interface Ethernet0/3
[fw-3-Ethernet0/3]ip add 192.168.3.2 24
[fw-3-Ethernet0/3]quit
[fw-3]interface Ethernet 0/4
[fw-3-Ethernet0/4]ip add 192.168.40.254 24
[fw-3-Ethernet0/4]loopback
[fw-3-Ethernet0/4]quit
[fw-3]ospf
[fw-3-ospf-1]area 0
[fw-3-ospf-1-area-0.0.0.0]network 192.168.40.0 0.0.0.255
[fw-3-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[fw-3]ip route-static 192.168.40.0 24 192.168.3.1 preference 60
<fw-1>sys
进入系统视图, 键入Ctrl+Z退回到用户视图.
[fw-1]firewall packet-filter default permit
[fw-1]firewall zone trust
[fw-1-zone-trust]add interface e0/2
[fw-1-zone-trust]add interface e0/3
[fw-1-zone-trust]add interface e0/4
[fw-1]int Ethernet0/2
[fw-1-Ethernet0/2]ip add 192.168.2.1 24
[fw-1-Ethernet0/2]quit
[fw-1]int Ethernet 0/3
[fw-1-Ethernet0/3]ip add 192.168.3.1 24
[fw-1-Ethernet0/3]quit
[fw-1]int Ethernet 0/4
[fw-1-Ethernet0/4]ip add 192.168.4.254 24
[fw-1-Ethernet0/4]loopback
[fw-1]ip route-static 192.168.4.0 24 192.168.3.2 preference 60
[fw-1]interface Ethernet0/2
[fw-1-Ethernet0/2]standby interface Ethernet 0/3
[fw-1-Ethernet0/2]standby timer delay 10(表示打开的延时) 10(表示关闭的延时)
<fw-3>sys
进入系统视图, 键入Ctrl+Z退回到用户视图.
[fw-3]firewall packet-filter default permit
[fw-3]firewall zone trust
[fw-3-zone-trust]add interface Ethernet 0/2
[fw-3-zone-trust]add interface Ethernet 0/3
[fw-3-zone-trust]add interface Ethernet 0/4
[fw-3]interface Ethernet 0/2
[fw-3-Ethernet0/2]ip add 192.168.2.2 24
[fw-3-Ethernet0/2]quit
[fw-3]interface Ethernet0/3
[fw-3-Ethernet0/3]ip add 192.168.3.2 24
[fw-3-Ethernet0/3]quit
[fw-3]interface Ethernet 0/4
[fw-3-Ethernet0/4]ip add 192.168.40.254 24
[fw-3-Ethernet0/4]loopback
[fw-3-Ethernet0/4]quit
[fw-3]ip route-static 192.168.40.0 24 192.168.3.1 preference 60
[fw-3]interface Ethernet0/2
[fw-3-Ethernet0/2]standby interface Ethernet 0/3
[fw-3-Ethernet0/2]standby timer delay 10 10
2.二层冗余技术中
sw1
link-aggregation group 1 mode manual
int e1/0/10
port link-type trunk
port trunk permit vlan all
int e1/0/1
port link-type trunk
port trunk permit vlan all
port link-aggregation group 1
int e1/0/2
port link-type trunk
port trunk permit vlan all
port link-aggregation group 1
vlan 10
vlan 5
stp en
stp region-configuration 区域配置
region-name zzdx 区域名称
instance 1 vlan 10 映射
instance 2 vlan 5
quit
stp instance 1 root primary 作为区域1的根
stp region-configuration
check reegion-configuration 检测区域配置
revision-level 1 改修订号
active region-configuration 激活区域
[sw2]link-aggregation group 1 mode manual
int e1/0/20
port link-type trunk
port trunk permit vlan all
int e1/0/1
port link-type trunk
port trunk permit vlan all
port link-aggregation group 1
int e1/0/2
port link-type trunk
port trunk permit vlan all
port link-aggregation group 1
vlan 10
vlan 5
is link-aggregation summarty
stp en
stp region-con
reion-name zzdx
instance 1 vlan 10
instance 2 vlan 5
revision-level 1
check reegion-configuration
active region-configuration
quit
stp instance 2 root primary
stp ena
vlan 10
vlan 5
int e1/0/20
port link-type trunk
port trunk permit vlan all
int e1/0/10
port link-type trunk
port trunk permit vlan all
stp region-conf
reion-name zzdx
instance 1 vlan 10
instance 2 vlan 5
revision-leve 1
check region-conf
active region-conf
[sw2]
vlan 10
port e1/0/10
vlan 20
port e1/0/20
int e1/0/1
port link-type trunk
port trunk vlan all
int e1/0/24
port link-type trunk
port trunk vlan all
vlan 10
port e1/0/10
vlan 20
port e1/0/20
int e1/0/1
port link-type trunk
port trunk vlan all
int e1/0/24
port link-type trunk
port trunk vlan all
vrrp ping-enable
int e1.10
vlan-type dot1q vid 10
ip add 192.168.10.2 24
vrrp vrid 10 virtual-ip 192.168.10.254
int e1.20
vlan-type dot1q vid 20
ip add 192.168.20.2 24
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 120
vrrp vrid 20 track serial 1 reduce 30
acl 2000
rule permit source any
ip route 0.0.0.0 0 10.2.2.2.2
int serial 1
ip add 10.2.1.1 30
nat outbound 2000 interface
vrrp ping-enable
int e1.10
vlan-type dot1q vid 10
ip add 192.168.10.1 24
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 120
vrrp vrid 10 track serial 0 reduce 30
int e1.20
vlan-type dot1q vid 20
ip add 192.168.20.1 24
vrrp vrid 20 virtual-ip 192.168.20.254
acl 2000
rule permit source any
ip route 0.0.0.0 0 10.1.1.2
int serial0
ip add 10.1.1.1 30
nat outbound 2000 interface
int 20
ip add 202.102.224.25
int s0
ip add 10.1.1.2 30
shut
undu shut
int s1
ip add 10.2.1.2 30
shut
undu shut
sw1全局模式下
vlan database
vlan 10
vlan 20
int f0/1
swichport mode trunk
channel-group 1 mode on
int f0/2
swichport mode trunk
channel-group 1 mode on
int f0/0
swichport mode trunk
int f0/3
swichport mode access vlan 10
show int f0/0 swtichport
show int port-channel 1 switchport
show vlan swtichoport
sw2全局模式下
vlan database
vlan 10
vlan 20
int f0/1
swichport mode trunk
channel-group 1 mode on
int f0/2
swichport mode trunk
channel-group 1 mode on
int f0/0
swichport mode trunk
int f0/3
swichport mode access vlan 20
show int f0/0 swtichport
show int port-channel 1 switchport
show vlan swtic
r1全局模式下
int f0/0
no shutdown
int f0/0.10
encapsulation dot1Q 10
ip add 192.168.10.1 255.255.255.0
standby 10 ip 192.168.10.254 加入虚拟组10,设置虚拟网关
standby 10 priority 130(默认100 越大越优先)
standby 10 preempt 配置争夺
int f0/0.20
encapsulation dot1Q 20
ip add 192.168.20.1 255.255.255.0
standby 10 ip 192.168.20.254 设置虚拟网关
standby 10 priority 130(默认100 越大越优先)[no standby 20 priority 优先级还为默认]
standby 10 preempt 配置争夺[去掉抢占]
show ip rout
show standby
r2全局模式下
int f0/0
no shutdown
int f0/0.10
encapsulation dot1Q 10
ip add 192.168.10.2 255.255.255.0
standby 10 ip 192.168.10.254 设置虚拟网关
int f0/0.20
encapsulation dot1Q 20
ip add 192.168.20.2 255.255.255.0
standby 10 ip 192.168.10.254 设置虚拟网关
[standby 20 priority 130(默认100 越大越优先)
standby 20 preempt]
show ip rout
show standby
pc1
当网关指向左边路由器
int f0/0
ip add 192.168.10.100 255.255.255.0
no shut
ip route 0.0.0.0 0.0.0.0 192.168.10.1
当网关指向虚拟IP
no ip route 0.0.0.0 0.0.0.0
ip route 0.0.0.0 0.0.0.0 192.168.10.254
跟踪 traceroute 192.168.20.100
pc2
当网关指向右边路由器
int f0/0
ip add 192.168.20.100 255.255.255.0
no shut
ip route 0.0.0.0 0.0.0.0 192.168.20.2
当网关指向虚拟IP
ip route 0.0.0.0 0.0.0.0
ip route 0.0.0.0 0.0.0.0 192.168.20.254
跟踪 traceroute 192.168.10.100
[sw1]link-aggregation group 1 mode manual
[sw1]interface Ethernet 1/0/1
[sw1-Ethernet1/0/1]port link-aggregation group 1
[sw1-Ethernet1/0/1]interface Ethernet 1/0/2
[sw1-Ethernet1/0/2]port link-aggregation group 1
[sw1-Ethernet1/0/2]quit
[sw2]link-aggregation group 1 mode manual
[sw2]interface Ethernet 1/0/1
[sw2-Ethernet1/0/1]port link-aggregation group 1
[sw2-Ethernet1/0/1]interface Ethernet 1/0/2
[sw2-Ethernet1/0/2]port link-aggregation group 1
[sw2-Ethernet1/0/2]quit
R2
int e0
ip add 192.168.2.254 24
loopback
int virtual-tem 1 虚拟模板接口
ip add 192.168.6.2 24
int s0
ppp mp int vir 1 捆绑物理接口
ppp mp 启动协商功能
int s1
ppp mp int vir 1
ppp mp
quit
ip route 192.168.2.0 24 192.168.6.1
R12
int e0
ip add 192.168.4.254 24
loopback
int virtual-tem 1 虚拟模板接口
ip add 192.168.6.1 24
int s0
ppp mp int vir 1 捆绑物理接口
ppp mp 启动协商功能
int s1
ppp mp int vir 1
ppp mp
quit
ip route 192.168.4.0 24 192.168.6.2

- 标签:
-
容灾备份