嗨,大家,只是需要帮助……我也是初学者。我的实验室通过BGP和OSPF运行Cisco3850。
我为端口11、12和13创建Vlan11、12和13,并为我的路由器创建/30 IP地址 — 此地址在bgp和ospf上运行。
现在,我为点对点天线在同一端口上创建了另一个Vlan11、112和113 /30 ip地址。
问题是VLAN 111、112和113没有Internet。有人能帮我吗?我在此配置中遗漏了什么?我很感激你的回应。
请查看下面的我的运行配置。
interface Loopback0
ip address 10.1.1.1 255.255.255.255
ip ospf dead-interval 20
ip ospf hello-interval 5
!
interface Port-channel1
no switchport
ip address 172.31.254.2 255.255.255.252
ip ospf network point-to-point
ip ospf dead-interval 20
ip ospf hello-interval 5
!
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
ip address 10.254.254.254 255.255.255.0
negotiation auto
!
interface GigabitEthernet1/0/1
!
interface GigabitEthernet1/0/2
!
interface GigabitEthernet1/0/3
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
switchport trunk allowed vlan 11,111
switchport mode trunk
!
interface GigabitEthernet1/0/12
switchport trunk allowed vlan 12,112
switchport mode trunk
!
interface GigabitEthernet1/0/13
switchport trunk allowed vlan 13,113
switchport mode trunk
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
description *po1 lacp to ccr*
no switchport
no ip address
channel-group 1 mode active
lacp rate fast
!
interface GigabitEthernet1/0/21
description *po1 lacp to ccr*
no switchport
no ip address
channel-group 1 mode active
lacp rate fast
!
interface GigabitEthernet1/0/22
description *po1 lacp to ccr*
no switchport
no ip address
channel-group 1 mode active
lacp rate fast
!
interface GigabitEthernet1/0/23
description *po1 lacp to ccr*
no switchport
no ip address
channel-group 1 mode active
lacp rate fast
!
interface GigabitEthernet1/0/24
description *po1 lacp to ccr*
no switchport
no ip address
channel-group 1 mode active
lacp rate fast
!
interface GigabitEthernet1/1/1
!
interface GigabitEthernet1/1/2
!
interface GigabitEthernet1/1/3
!
interface GigabitEthernet1/1/4
!
interface TenGigabitEthernet1/1/1
!
interface TenGigabitEthernet1/1/2
!
interface TenGigabitEthernet1/1/3
!
interface TenGigabitEthernet1/1/4
!
interface Vlan1
no ip address
!
interface Vlan11
description *nat core link*
ip address 172.16.11.1 255.255.255.252
ip ospf network point-to-point
ip ospf dead-interval 20
ip ospf hello-interval 5
!
interface Vlan12
description *R2 link*
ip address 172.16.12.1 255.255.255.252
ip ospf network point-to-point
ip ospf dead-interval 20
ip ospf hello-interval 5
!
interface Vlan13
description *R3 link*
ip address 172.16.13.1 255.255.255.252
ip ospf network point-to-point
ip ospf dead-interval 20
ip ospf hello-interval 5
!
interface Vlan111
ip address 172.16.111.1 255.255.255.252
!
interface Vlan112
ip address 172.16.112.1 255.255.255.252
!
interface Vlan113
ip address 172.16.113.1 255.255.255.252
!
router ospf 1
router-id 10.1.1.1
network 10.0.0.254 0.0.0.0 area 0
network 10.1.1.1 0.0.0.0 area 0
network 172.16.11.0 0.0.0.3 area 0
network 172.16.12.0 0.0.0.3 area 0
network 172.16.13.0 0.0.0.3 area 0
network 172.31.254.0 0.0.0.3 area 0
!
router bgp 65000
bgp router-id 10.1.1.1
bgp log-neighbor-changes
neighbor 10.0.0.0 remote-as 65000
neighbor 10.0.0.0 update-source Loopback0
neighbor 10.0.0.1 remote-as 65000
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.2 remote-as 65000
neighbor 10.0.0.2 update-source Loopback0
neighbor 10.0.0.3 remote-as 65000
neighbor 10.0.0.3 update-source Loopback0
!
address-family ipv4
neighbor 10.0.0.0 activate
neighbor 10.0.0.0 route-reflector-client
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 route-reflector-client
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 route-reflector-client
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 route-reflector-client
exit-address-family
!
已解决! 转到解答。
亨利
你的环境有些事情我不理解。例如,我在您的配置中看不到任何默认路由。您是否学习了默认路由?如果是,从什么?此外,我看到BGP,但所有对等体都位于同一AS中,IBGP也位于同一AS中。是否有外部BGP?
我注意到,您在11、12和13的子网上运行OSPF,而在111、112和113的子网上运行OSPF。我建议为新vlan/子网运行OSPF,并查看它是否有所不同。
问题的另一个猜测可能是地址转换的可能问题。您告诉我们NAT由Mikrotik完成。Mikrotik是否可能具有原始子网的转换逻辑,但不具有新子网的转换逻辑?
当您说“无互联网”时,我认为您是指您希望通过BGP通告路由(因为如前一条回复所述,“互联网”不关心私有地址范围 — 而且仅仅因为您向BGP对等体通告并不意味着此对等体必须是“互联网”的一部分。
要将VLAN111,112,113通告给您的BGP对等体,最简单的选项可能是在ipv4 address-family下通告BGP中的子网
"network 172.16.111.0 255.255.255.252"
"network 172.16.112.0 255.255.255.252"
"network 172.16.113.0 255.255.255.252"
或者,您应该能够重新分发这些直连子网
ip access-list extended redistribute-subnets
permit 172.16.111.0 0.0.0.3
permit 172.16.112.0 0.0.0.3
permit 172.16.113.0 0.0.0.3
route-map redistribute-connected
match ip address redistribute-subnets
router bgp 65000
address-family ipv4 unicast
redistriibute connected route-map redistribute-connected
然后,使用以上任一方法,您应该看到在BGP中发送到对等设备的路由,如果这些路由可以到达10.1.1.1,则您应该是好的。
你好,保罗,谢谢你的回复。
我将此3850用于核心,环回10.0.0.0是我的Mikrotik NAT,10.0.1、10.0.0.2等等是连接到互联网的客户端路由器。
网络设计:
Mikrotik NAT >> Cisco 3850>> Vlan11、12、13到客户端。我唯一担心的是Vlan11、112和113没有Internet。
有人说我添加了Bgp通告子网,但我不知道如何执行
亨利
亨利
你的环境有些事情我不理解。例如,我在您的配置中看不到任何默认路由。您是否学习了默认路由?如果是,从什么?此外,我看到BGP,但所有对等体都位于同一AS中,IBGP也位于同一AS中。是否有外部BGP?
我注意到,您在11、12和13的子网上运行OSPF,而在111、112和113的子网上运行OSPF。我建议为新vlan/子网运行OSPF,并查看它是否有所不同。
问题的另一个猜测可能是地址转换的可能问题。您告诉我们NAT由Mikrotik完成。Mikrotik是否可能具有原始子网的转换逻辑,但不具有新子网的转换逻辑?
当您说“无互联网”时,我认为您是指您希望通过BGP通告路由(因为如前一条回复所述,“互联网”不关心私有地址范围 — 而且仅仅因为您向BGP对等体通告并不意味着此对等体必须是“互联网”的一部分。
要将VLAN111,112,113通告给您的BGP对等体,最简单的选项可能是在ipv4 address-family下通告BGP中的子网
"network 172.16.111.0 255.255.255.252"
"network 172.16.112.0 255.255.255.252"
"network 172.16.113.0 255.255.255.252"
或者,您应该能够重新分发这些直连子网
ip access-list extended redistribute-subnets
permit 172.16.111.0 0.0.0.3
permit 172.16.112.0 0.0.0.3
permit 172.16.113.0 0.0.0.3
route-map redistribute-connected
match ip address redistribute-subnets
router bgp 65000
address-family ipv4 unicast
redistriibute connected route-map redistribute-connected
然后,使用以上任一方法,您应该看到在BGP中发送到对等设备的路由,如果这些路由可以到达10.1.1.1,则您应该是好的。
亨利
很高兴我们的建议有所帮助。感谢您将此问题标记为已解决。这将帮助社区中的其他参与者确定包含有用信息的讨论。此社区是提问和学习网络的绝佳场所。希望您继续活跃在社区中。