您的当前位置:首页正文

双WAN口负载均衡

2020-07-19 来源:星星旅游


1、 r0,r1为私有网段,R2为私有网段和公有网段的交界处,私有网段用192.168.1.0、

192.168.2.0,网关分别为192.168.1.254、192.168.2.254。

2、 公有网段分别为210.52.1.0、210.52.2.0、210.52.3.0、210.52.4.0,并且在R4上面配置一

个环回接口210.52.5.1,255.255.255.0。

3、 公有网段R3、R4、R5采用eifrp协议互通,R2采用缺省路由到达外网。 4、 具体的双WAN口配置命令为(主要是在R2上面配置): R2(config)#int f0/0 R2(config-if)#ip nat ou R2(config-if)#ip nat outside R2(config-if)#exit R2(config)#int f0/1 R2(config-if)#ip nat out R2(config-if)#ip nat outside R2(config-if)#exit R2(config)#int e1/0 R2(config-if)#ip nat in R2(config-if)#ip nat inside R2(config-if)#exit R2(config)#int e1/1 R2(config-if)#ip nat in R2(config-if)#ip nat inside R2(config-if)#exit

R2(config)#ip route 0.0.0.0 0.0.0.0 210.52.1.2 R2(config)#ip route 0.0.0.0 0.0.0.0 210.52.4.1

R2(config)# ip nat inside source route-map 1 interface FastEthernet0/0 overload R2(config)#ip nat inside source route-map 2 interface FastEthernet0/1 overload R2(config)#ip nat inside source route-map 3 interface FastEthernet0/1 overload

R2(config)#ip nat inside source route-map 4 interface FastEthernet0/0 overload R2(config)# access-list 1 permit 192.168.1.0 0.0.0.255 R2(config)# access-list 2 permit 192.168.2.0 0.0.0.255 R2(config)#route-m

R2(config)#route-map 1 per

R2(config)#route-map 1 permit 10 R2(config-route-map)#mat

R2(config-route-map)#match ip add

R2(config-route-map)#match ip address 1 R2(config-route-map)#mat

R2(config-route-map)#match int

R2(config-route-map)#match interface f0/0 R2(config-route-map)#exit R2(config)#route-m

R2(config)#route-map 2 per

R2(config)#route-map 2 permit 10 R2(config-route-map)#mac

R2(config-route-map)#match ip add

R2(config-route-map)#match ip address 1 R2(config-route-map)#exit R2(config)#route-map 3 per

R2(config)#route-map 3 permit 10 R2(config-route-map)#mat

R2(config-route-map)#match ip add

R2(config-route-map)#match ip address 2 R2(config-route-map)#matc R2(config-route-map)#match int

R2(config-route-map)#match interface f0/1 R2(config-route-map)#exit R2(config)#route-m

R2(config)#route-map 4 per

R2(config)#route-map 4 permit 10 R2(config-route-map)#matc

R2(config-route-map)#match ip add

R2(config-route-map)#match ip address 2 R2(config-route-map)#exit R2(config)#route-m

R2(config)#route-map 5 per

R2(config)#route-map 5 permit 10 R2(config-route-map)#mac R2(config-route-map)#matc

R2(config-route-map)#match ip add

R2(config-route-map)#match ip address 1 R2(config-route-map)#mac

R2(config-route-map)#mat

R2(config-route-map)#match int

R2(config-route-map)#match interface f0/0 R2(config-route-map)#set R2(config-route-map)#set in

R2(config-route-map)#set interface f0/0 R2(config-route-map)#exit R2(config)#route-map

R2(config)#route-map 6 per

R2(config)#route-map 6 permit 10 R2(config-route-map)#mat

R2(config-route-map)#match ip add

R2(config-route-map)#match ip address 2 R2(config-route-map)#mat

R2(config-route-map)#match int

R2(config-route-map)#match interface f0/1 R2(config-route-map)#se R2(config-route-map)#set in

R2(config-route-map)#set interface f0/1 R2(config-route-map)#exit R2(config)#int e1/0

R2(config-if)# ip policy route-map 5 R2(config)#int e1/1

R2(config-if)# ip policy route-map 6

因篇幅问题不能全部显示,请点此查看更多更全内容