NAT 负载均衡

网络工程 思科 tcp 纳特 负载均衡
2022-03-04 09:13:43

嗨,我在通过 NAT 负载平衡进行远程登录时遇到问题。

当我尝试执行 telnet 192.168.192.100 80: Destination unreachable 时,总是返回;网关或主机关闭

在此处输入图像描述

路由器 NAT 配置:

Current configuration : 1366 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname NAT
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
interface FastEthernet0/0
 ip address 172.16.1.4 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.192.4 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
no ip http server
no ip http secure-server
ip forward-protocol nd
!
ip alias 192.168.192.100 23
!
ip nat pool APACHE_LIST 176.16.1.1 176.16.1.3 prefix-length 24 type rotary
ip nat inside destination list LOADBALANCE pool APACHE_LIST
!
!
ip access-list extended LOADBALANCE
 permit tcp any host 192.168.192.100 eq www
 permit tcp any host 192.168.192.100 eq telnet
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

在 WWW 路由器中,我所做的唯一配置是将 ip 分配给接口并激活 ip http 服务器并激活 VTY 线路

谢谢你的时间

1个回答

我发现您的配置中有一些错误。您如何配置 NAT 可能存在更多问题。

interface FastEthernet0/0
 ip address 172.16.1.4 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto

ip nat pool APACHE_LIST 176.16.1.1 176.16.1.3 prefix-length 24 type rotary

分配给您的接口 FastEthernet 0/0 的子网与您的内部本地地址池不匹配。(172.16.1.0/24 与 176.16.1.0/24)

NAT(config)#ip alias 192.168.192.100 23
Invalid IP address

发出no ip alias 192.168.192.100 23命令。

您可能还想更改双工和速度设置。show int fa 0/0 | in duplex我认为,如果您发出命令 ,您会发现接口以半双工方式运行。