设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 860|回复: 2
收起左侧

[求助] 单臂路由+负载均衡+负载冗余

[复制链接]
发表于 2019-11-18 00:39:35 | 显示全部楼层 |阅读模式

                               
登录/注册后可看大图


我做了单臂路由+负载均衡+负载冗余,我用几个问题不明白
1.我做了nat1、nat2、nat3、nat4的PBR,和4个nat的转换,我不大明白为这么要写这4条,这4条分别是什么意思,为什么要写4条
2.为什么这的PC1 ping 得通1.1.1.1, PC2 ping 不通2.2.2.2
配置如下


sp1


version 15.7
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname sp1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
clock timezone EET 2 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!


!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
no ip address
shutdown
!
interface Ethernet0/1
ip address 100.100.100.1 255.255.255.0
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
ip forward-protocol nd
!
!
no ip http server
!
ipv6 ioam timestamp
!
!
!
control-plane
!         
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end


SP2
hostname sp2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
clock timezone EET 2 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!


!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
no ip address
shutdown
!
interface Ethernet0/1
no ip address
shutdown
!
interface Ethernet0/2
ip address 200.200.200.2 255.255.255.0
!
interface Ethernet0/3
no ip address
shutdown
!
ip forward-protocol nd
!
!
no ip http server
!
ipv6 ioam timestamp
!
!
!
control-plane
!         
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end

R3

redundancy
!
!
!
!
!
!
interface Ethernet0/0
no ip address
!
interface Ethernet0/0.10
encapsulation dot1Q 10
ip address 192.168.1.254 255.255.255.0
ip nat inside
ip virtual-reassembly in
ip policy route-map PBR
!
interface Ethernet0/0.20
encapsulation dot1Q 20
ip address 192.168.2.254 255.255.255.0
ip nat inside
ip virtual-reassembly in
ip policy route-map PBR
!
interface Ethernet0/1
ip address 100.100.100.100 255.255.255.0
ip nat outside
ip virtual-reassembly in
!
interface Ethernet0/2
ip address 200.200.200.200 255.255.255.0
ip nat outside
ip virtual-reassembly in
!         
interface Ethernet0/3
no ip address
shutdown
!
ip forward-protocol nd
!
!
no ip http server
ip nat inside source route-map nat1 interface Ethernet0/1 overload
ip nat inside source route-map nat2 interface Ethernet0/2 overload
ip nat inside source route-map nat3 interface Ethernet0/1 overload
ip nat inside source route-map nat4 interface Ethernet0/2 overload
!
ipv6 ioam timestamp
!
route-map PBR permit 10
match ip address list 1
set ip next-hop 100.100.100.1 200.200.200.2
!
route-map PBR permit 20
match ip address list 2
set ip next-hop 200.200.200.2 100.100.100.1
!         
route-map nat3 permit 10
match ip address list 2
match interface Ethernet0/2
!
route-map nat2 permit 10
match ip address 1
!
route-map nat1 permit 10
match ip address list 1
match interface Ethernet0/1
!
route-map nat4 permit 10
match ip address list 2
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 2 permit 192.168.2.0 0.0.0.255
!
control-plane
!
!
!
!         
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end
switch1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EET 2 0
!
!
!
!         
!
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Ethernet0/1
switchport access vlan 10
switchport mode access
!
interface Ethernet0/2
switchport access vlan 20
switchport mode access
!
interface Ethernet0/3
!
interface Ethernet1/0
!
interface Ethernet1/1
!
interface Ethernet1/2
!
interface Ethernet1/3
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!         
end



您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-3-29 15:07 , Processed in 0.058307 second(s), 9 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表