我已经为总部和分支机构配置了路由和 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