NAT 无法与 2 个网络通信

网络工程 思科 路由 路由器 BGP 纳特
2022-02-09 16:54:58

我已经为总部和分支机构配置了路由和 NAT 的 BGP。我可以从 Windows / 服务器 ping 到公共 IP,也可以从 Linux Mint ping 到公共 IP。但是,我无法在网络总部与分支机构之间 ping / 通信,而分支机构无法 ping / 与网络总部通信。是否有必要在 R2 / R3 中配置某些东西,或者可能需要配置 R1。

顺便说一句,对于 NAT,我遵循https://www.geeksforgeeks.org/types-of-network-address-translation-nat/进行 PAT 配置。谢谢你。

Windows 服务器:DHCP 服务器

Ubuntu:网络服务器

在此处输入图像描述

R2/HQ 路由器:

 interface FastEthernet0/0
 no ip address
 speed auto
 duplex full
!
interface FastEthernet0/0.22
 encapsulation dot1Q 22
 ip address 192.168.27.129 255.255.255.248
 ip nat inside
!
interface FastEthernet0/0.100
 encapsulation dot1Q 100
 ip address 192.168.27.1 255.255.255.192
 ip helper-address 192.168.27.130
 ip helper-address 192.168.27.131
 ip nat inside
!
interface FastEthernet0/1
 no ip address
 shutdown
 speed auto
 duplex auto
!
interface Serial1/0
 ip address 200.200.10.2 255.255.255.0
 ip nat outside
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 3001
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 192.168.27.0 mask 255.255.255.192
 network 192.168.27.128 mask 255.255.255.248
 network 200.200.10.0
 neighbor 200.200.10.1 remote-as 3000
!
ip nat inside source list 1 interface Serial1/0 overload
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
access-list 1 permit 192.168.27.0 0.0.0.63
access-list 1 permit 192.168.27.128 0.0.0.7

R3/分支路由器

 interface FastEthernet0/0
 no ip address
 speed auto
 duplex full
!
interface FastEthernet0/0.200
 encapsulation dot1Q 200
 ip address 192.168.27.65 255.255.255.192
 ip helper-address 192.168.27.130
 ip helper-address 192.168.27.131
 ip nat inside
!
interface FastEthernet0/1
 no ip address
 shutdown
 speed auto
 duplex auto
!
interface Serial1/0
 ip address 200.200.20.2 255.255.255.0
 ip nat outside
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 3002
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 network 192.168.27.64 mask 255.255.255.192
 network 200.200.20.0
 neighbor 200.200.20.1 remote-as 3000
!
ip nat inside source list 1 interface Serial1/0 overload
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
access-list 1 permit 192.168.27.64 0.0.0.63

R1/ISP 路由器

interface Serial1/0
 ip address 200.200.10.1 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 200.200.20.1 255.255.255.0
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 3000
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 network 200.200.10.0
 network 200.200.20.0
 neighbor 200.200.10.2 remote-as 3001
 neighbor 200.200.20.2 remote-as 3002

在此处输入图像描述 在此处输入图像描述

1个回答

您似乎有多个问题:

  • interface FastEthernet0/0不需要帮助地址,因为默认情况下没有任何内容。
  • 您的交换机是否启用了到路由器的中继?
  • 您正在使用 NAT ACL,因此您不需要或不需要该ip nat pool命令。
  • 您不会通过 BGP 发布已转换的网络,因为对于外部世界它们不存在,只有外部地址存在。除非您将特定端口转发到特定内部地址,否则您无法从 NAT 外部发起流量。那肯定会停止你的ping。
  • 您需要将 DHCP 转发到其中一台 DHCP 服务器(您只能将一个端口转发到一个内部地址。

您似乎想要做的是创建从总部到分支机构的隧道,以便在两者之间共享资源。您可以转储 BGP(它实际上并没有按照您的配置方式为您做任何事情)并使用从两个站点到 R1 的默认路由。

然后,在 HQ 和 Branch 路由器之间建立一条隧道。