带 Nexus 的 intervlan 棒上路由器

网络工程 VLAN cisco-nexus
2021-08-02 23:27:54

好的,大家对 Cisco 路由器和 Cisco 交换机之间的棒上路由器 vlan 间路由进行了相同的练习。除了这一次,它是昂贵的 Nexus 而不是 Catalyst。

2911#show vlans

Virtual LAN ID:  1 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface:   GigabitEthernet0/2

 This is configured as native Vlan for the following interface(s) :
GigabitEthernet0/2

   Protocols Configured:   Address:              Received:        Transmitted:
        Other                                           0                7772

   1431 packets, 403183 bytes input
   7772 packets, 551049 bytes output

Virtual LAN ID:  100 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface:   GigabitEthernet0/2.100

   Protocols Configured:   Address:              Received:        Transmitted:
           IP              10.0.0.1                     2                   3
        Other                                           0                  13

   2 packets, 128 bytes input
   16 packets, 1798 bytes output

Virtual LAN ID:  200 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface:   GigabitEthernet0/2.200

   Protocols Configured:   Address:              Received:        Transmitted:
           IP              10.1.0.1                     0                   3
        Other                                           0                  28

   0 packets, 0 bytes input
   31 packets, 2488 bytes output

这是我的2911路由器接口。

!
interface GigabitEthernet0/2
 no ip address
 ip nat inside
 ip virtual-reassembly in
 duplex auto
 speed auto
!
interface GigabitEthernet0/2.100
 encapsulation dot1Q 100
 ip address 10.0.0.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!
interface GigabitEthernet0/2.200
 encapsulation dot1Q 200
 ip address 10.1.0.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!

这是 nexus 中继接口和 vlan 输出之一。

interface Ethernet1/48
  switchport mode trunk

interface Vlan100
  no shutdown
  ip address 10.1.0.13/24

interface Vlan200
  no shutdown
  ip address 10.0.0.13/24

但是2911和Nexus仍然无法ping通对方的vlan inter ip。

除了我们通常在 Catalyst 上做的事情之外,我还做错了什么或遗漏了什么?

谢谢。

[更新:在 Ron M 的抓获之后]

C#          ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=254 time=0.804 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=254 time=0.57 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=254 time=0.534 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=254 time=0.536 ms
64 bytes from 10.0.0.1: icmp_seq=4 ttl=254 time=0.526 ms

--- 10.0.0.1 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 0.526/0.593/0.804 ms
C#          ping 10.1.0.1
PING 10.1.0.1 (10.1.0.1): 56 data bytes
64 bytes from 10.1.0.1: icmp_seq=0 ttl=254 time=0.769 ms
64 bytes from 10.1.0.1: icmp_seq=1 ttl=254 time=0.56 ms
64 bytes from 10.1.0.1: icmp_seq=2 ttl=254 time=0.534 ms
64 bytes from 10.1.0.1: icmp_seq=3 ttl=254 time=0.522 ms
64 bytes from 10.1.0.1: icmp_seq=4 ttl=254 time=0.53 ms
1个回答

VLAN 100 位于两台设备的不同网络上:

2911 是10.0.0.0/24

interface GigabitEthernet0/2.100
 encapsulation dot1Q 100
 ip address 10.0.0.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!

Nexus是10.1.0.0/24

interface Vlan100
  no shutdown
  ip address 10.1.0.13/24

VLAN 200 位于两台设备的不同网络上:

2911 是10.1.0.0/24

interface GigabitEthernet0/2.200
 encapsulation dot1Q 200
 ip address 10.1.0.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!

Nexus是10.0.0.0/24

interface Vlan200
  no shutdown
  ip address 10.0.0.13/24

此外,您不想要ip nat insideinterface GigabitEthernet0/2因为它没有 IP 地址。您只需要在子接口上使用它。