您能否将 IP(/32)从一个 vlan 路由到同一路由器的同一 vrf 中的另一个 vlan ?
例如:
example_router#show version
Cisco IOS Software, c7600s72033_rp Software (c7600s72033_rp-ADVIPSERVICESK9-M), Version 12.2(33)SRD6, RELEASE SOFTWARE (fc3)
example_router(config)#ip route vrf EXAMPLE 10.10.10.3 255.255.255.255 vlan 2706
% For VPN or topology routes, must specify a next hop IP address if not a point-to-point interface
example_router(config)#
example_router(config)#ip route vrf EXAMPLE 10.10.10.3 255.255.255.255 vlan 2706 10.10.20.1
%Invalid next hop address (it's this router)
example_router#sh run in vlan 2705
Building configuration...
Current configuration : 339 bytes
!
interface Vlan2705
ip vrf forwarding EXAMPLE
ip address 10.10.10.1 255.255.255.0
ip helper-address 10.0.0.1
no ip redirects
no ip unreachables
no ip proxy-arp
load-interval 30
no clns route-cache
end
example_router#sh run in vlan 2706
Building configuration...
Current configuration : 339 bytes
!
interface Vlan2706
ip vrf forwarding EXAMPLE
ip address 10.10.20.1 255.255.255.0
ip helper-address 10.0.0.1
no ip redirects
no ip unreachables
no ip proxy-arp
load-interval 30
no clns route-cache
end
vrf 配置(由@rnxrx 请求):
example_router#show vrf EXAMPLE
Name Default RD Protocols Interfaces
EXAMPLE xxxxxx:yyyyyy ipv4 Vl2705
Vl2706
[output removed]
example_router#show running-config vrf EXAMPLE
Building configuration...
Current configuration : 7992 bytes
ip vrf EXAMPLE
description mpls_vpn_EXAMPLE
rd xxxxxx:yyyyyy
route-target export xxxxxx:zzzzzz
route-target import xxxxxx:yyyyyy
!
[output removed]
!
router bgp xxxxxx
!
address-family ipv4 vrf EXAMPLE
no synchronization
redistribute connected
exit-address-family
!
end
我需要打破 2 个旧 vlan,并且 1 个设备需要位于第二个 vlan 上,我需要暂时让它运行,直到客户端可以远程连接来更改它的 IP 地址。
如果没有,我看到的唯一选项是与客户端同步并在第二个 vlan 上配置子网(例如 10.10.10.1/24)几分钟。
谢谢
答案1
是的 - 这是有效的,而且实际上相当常见。路由器会将这些接口(和相关路由)视为公共路由/转发表的一部分,这些路由/转发表将与其他路由/转发表分开保存(除非您手动进行交叉导入)。