思科DevNet思科ACI

基于组播的VxLAN实验

2017-12-22  本文已影响65人  王力_9541

VxLAN综述

VXLAN(Virtual Extensible LAN)虚拟可扩展局域网, 是一种overlay网络技术,将原始2层以太网帧进行UDP封装(MAC-in-UDP),增加8字节VXLAN头部,8字节UDP头部,20字节IP头部和14字节以太网头部,共50字节


image.png

VxLAN优点

VxLAN术语

VXLAN数据转发

VTEP发现和地址学习过程

如下图所示,举例说明采用组播实现的VxLAN场景中End System A和End System B通信过程中,ARP请求报文封装过程

VxLAN.png

VxLAN单播数据流转发过程

通过上面的ARP请求,终端设备A已经有了终端B的MAC地址,VTEP-1也有了终端B对应的映射表项


image.png

VxLAN实验

实验拓扑:构造如下图所示网络拓扑;
实验目标:从LAN-EAST能够ping通LAN-WEST;
协议规划:ISP网络运行OSPF,启用组播,VxLAN控制面选用组播模式;

lab.JPG

实验使用的镜像文件:

VTEP-1配置:

feature ospf
feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 10.1.1.1 group-list 224.0.0.0/4
ip pim ssm range 232.0.0.0/8
vlan 1,10
vlan 10
  vn-segment 10000

interface nve1
  no shutdown
  source-interface loopback0
  member vni 10000 mcast-group 230.1.1.1

interface Ethernet1/1
  no switchport
  ip address 20.1.1.2/24
  ip router ospf 1 area 0.0.0.0
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  switchport mode trunk
  switchport access vlan 10

interface loopback0
  ip address 100.100.100.1/32
  ip router ospf 1 area 0.0.0.0
  ip pim sparse-mode

ip route 0.0.0.0/0 20.1.1.1
router ospf 1
  router-id 100.100.100.1

VTEP-2配置:

feature ospf
feature pim
feature vn-segment-vlan-based
feature nv overlay

ip pim rp-address 10.1.1.1 group-list 224.0.0.0/4
ip pim ssm range 232.0.0.0/8
vlan 1,10
vlan 10
  vn-segment 10000

interface nve1
  no shutdown
  source-interface loopback0
  member vni 10000 mcast-group 230.1.1.1

interface Ethernet1/1
  no switchport
  ip address 30.1.1.2/24
  ip router ospf 1 area 0.0.0.0
  ip pim sparse-mode
  no shutdown

interface Ethernet1/2
  switchport mode trunk
  switchport access vlan 10

interface loopback0
  ip address 100.100.100.2/32
  ip router ospf 1 area 0.0.0.0
  ip pim sparse-mode

ip route 0.0.0.0/0 30.1.1.1
router ospf 1
  router-id 100.100.100.2

ISP-EAST配置:

!
interface Ethernet0/0
 ip address 10.1.1.1 255.255.255.0
 ip pim sparse-mode
!
interface Ethernet0/1
 ip address 20.1.1.1 255.255.255.0
 ip pim sparse-mode
!
router ospf 1
 network 10.1.1.1 0.0.0.0 area 0
 network 20.1.1.0 0.0.0.255 area 0
!
ip pim rp-address 10.1.1.1
!

ISP-WEST配置:

!
interface Ethernet0/0
 ip address 10.1.1.2 255.255.255.0
 ip pim sparse-mode
!
interface Ethernet0/1
 ip address 30.1.1.1 255.255.255.0
 ip pim sparse-mode
!
router ospf 1
 network 10.1.1.2 0.0.0.0 area 0
 network 30.1.1.0 0.0.0.255 area 0
!
ip pim rp-address 10.1.1.1
!

SW-EAST配置:

!
interface GigabitEthernet0/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 no cdp enable
!
interface GigabitEthernet0/1
 switchport access vlan 10
 switchport mode access
 media-type rj45
 negotiation auto
 no cdp enable
!

SW-WEST配置:

!
interface GigabitEthernet0/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
 no cdp enable
!
interface GigabitEthernet0/1
 switchport access vlan 10
 switchport mode access
 media-type rj45
 negotiation auto
 no cdp enable
!

VTEP-1状态确认:

VTEP-1# show nve peers
Interface Peer-IP          State LearnType Uptime   Router-Mac
--------- ---------------  ----- --------- -------- -----------------
nve1      100.100.100.2    Up    DP        00:26:13 n/a

VTEP-1# show nve vni
Codes: CP - Control Plane        DP - Data Plane
       UC - Unconfigured         SA - Suppress ARP
       SU - Suppress Unknown Unicast

Interface VNI      Multicast-group   State Mode Type [BD/VRF]      Flags
--------- -------- ----------------- ----- ---- ------------------ -----
nve1      10000    230.1.1.1         Up    DP   L2 [10]

VTEP-1# show runn interface nve1

!Command: show running-config interface nve1
!Time: Fri Dec 22 11:01:58 2017

version 7.0(3)I7(1)

interface nve1
  no shutdown
  source-interface loopback0
  member vni 10000 mcast-group 230.1.1.1

VTEP-1# show nve internal platform interface detail
Printing details of all NVE Interfaces
|======|=========================|===============|===============|=====|=====|
|Intf  |State                    |PriIP          |SecIP          |Vnis |Peers|
|======|=========================|===============|===============|=====|=====|
|nve1  |UP                       |100.100.100.1  |0.0.0.0        |1    |1    |
|======|=========================|===============|===============|=====|=====|

SW_BD/VNIs of interface nve1:
================================================
|======|======|=========================|======|====|======|========
|Sw BD |Vni   |State                    |Intf  |Type|Vrf-ID|Notified
|======|======|=========================|======|====|======|========
|10    |10000 |UP                       |nve1  |DP  |0     |Yes
|======|======|=========================|======|====|======|========

Peers of interface nve1:
============================================

Peer_ip: 100.100.100.2
  Peer-ID   : 1
  State     : UP
  Learning  : Enabled
  TunnelID  : 0x0
  Mode      : Symmetric
  MAC       : 0000.0000.0000
  Table-ID  : 0x1
  Encap     : 0x1

VTEP-1# show ip mroute detail
IP Multicast Routing Table for VRF "default"

Total number of routes: 3
Total number of (*,G) routes: 1
Total number of (S,G) routes: 1
Total number of (*,G-prefix) routes: 1

(*, 230.1.1.1/32), uptime: 00:37:16, nve(1) ip(0) pim(0)
  RPF Change only
  RPF-Source: 10.1.1.1 [50/110]
  Data Created: No
  VXLAN Flags
    VXLAN Encap
    VXLAN Last Hop
  Stats: 1/100 [Packets/Bytes], 0.000   bps
  Stats: Inactive Flow
  Incoming interface: Ethernet1/1, RPF nbr: 20.1.1.1
  Outgoing interface list: (count: 1) (bridge_only: 0)
    nve1, uptime: 00:37:16, nve


(100.100.100.1/32, 230.1.1.1/32), uptime: 00:37:16, nve(0) mrib(0) ip(0) pim(1)
  RPF-Source: 100.100.100.1 [0/0]
  Data Created: No
  Received Register stop
  VXLAN Flags
    VXLAN Encap
  Stats: 10/996 [Packets/Bytes], 13.333  bps
  Stats: Active Flow
  Incoming interface: loopback0, RPF nbr: 100.100.100.1
  Outgoing interface list: (count: 1) (bridge_only: 0)
    Ethernet1/1, uptime: 00:35:47, pim


(*, 232.0.0.0/8), uptime: 00:37:20, pim(0) ip(0)
  RPF-Source: 0.0.0.0 [0/0]
  Data Created: No
  SSM route
  Stats: 0/0 [Packets/Bytes], 0.000   bps
  Stats: Inactive Flow
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0) (bridge_only: 0)


VTEP-1#

VTEP-2状态确认:

VTEP-2# show nve peers
Interface Peer-IP          State LearnType Uptime   Router-Mac
--------- ---------------  ----- --------- -------- -----------------
nve1      100.100.100.1    Up    DP        00:29:42 n/a

VTEP-2# show nve vni
Codes: CP - Control Plane        DP - Data Plane
       UC - Unconfigured         SA - Suppress ARP
       SU - Suppress Unknown Unicast

Interface VNI      Multicast-group   State Mode Type [BD/VRF]      Flags
--------- -------- ----------------- ----- ---- ------------------ -----
nve1      10000    230.1.1.1         Up    DP   L2 [10]

VTEP-2# show runn interface nve1

!Command: show running-config interface nve1
!Time: Fri Dec 22 11:05:06 2017

version 7.0(3)I7(1)

interface nve1
  no shutdown
  source-interface loopback0
  member vni 10000 mcast-group 230.1.1.1

VTEP-2# show nve internal platform interface detail
Printing details of all NVE Interfaces
|======|=========================|===============|===============|=====|=====|
|Intf  |State                    |PriIP          |SecIP          |Vnis |Peers|
|======|=========================|===============|===============|=====|=====|
|nve1  |UP                       |100.100.100.2  |0.0.0.0        |1    |1    |
|======|=========================|===============|===============|=====|=====|

SW_BD/VNIs of interface nve1:
================================================
|======|======|=========================|======|====|======|========
|Sw BD |Vni   |State                    |Intf  |Type|Vrf-ID|Notified
|======|======|=========================|======|====|======|========
|10    |10000 |UP                       |nve1  |DP  |0     |Yes
|======|======|=========================|======|====|======|========

Peers of interface nve1:
============================================

Peer_ip: 100.100.100.1
  Peer-ID   : 1
  State     : UP
  Learning  : Enabled
  TunnelID  : 0x0
  Mode      : Symmetric
  MAC       : 0000.0000.0000
  Table-ID  : 0x1
  Encap     : 0x1

VTEP-2# show ip mroute detail
IP Multicast Routing Table for VRF "default"

Total number of routes: 3
Total number of (*,G) routes: 1
Total number of (S,G) routes: 1
Total number of (*,G-prefix) routes: 1

(*, 230.1.1.1/32), uptime: 00:40:00, nve(1) ip(0) pim(0)
  RPF Change only
  RPF-Source: 10.1.1.1 [50/110]
  Data Created: No
  VXLAN Flags
    VXLAN Encap
    VXLAN Last Hop
  Stats: 3/298 [Packets/Bytes], 0.000   bps
  Stats: Inactive Flow
  Incoming interface: Ethernet1/1, RPF nbr: 30.1.1.1
  Outgoing interface list: (count: 1) (bridge_only: 0)
    nve1, uptime: 00:40:00, nve


(100.100.100.2/32, 230.1.1.1/32), uptime: 00:40:00, nve(0) mrib(0) ip(0) pim(1)
  RPF-Source: 100.100.100.2 [0/0]
  Data Created: No
  Received Register stop
  VXLAN Flags
    VXLAN Encap
  Stats: 2/200 [Packets/Bytes], 0.000   bps
  Stats: Inactive Flow
  Incoming interface: loopback0, RPF nbr: 100.100.100.2
  Outgoing interface list: (count: 1) (bridge_only: 0)
    Ethernet1/1, uptime: 00:38:33, pim


(*, 232.0.0.0/8), uptime: 00:40:03, pim(0) ip(0)
  RPF-Source: 0.0.0.0 [0/0]
  Data Created: No
  SSM route
  Stats: 0/0 [Packets/Bytes], 0.000   bps
  Stats: Inactive Flow
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0) (bridge_only: 0)


VTEP-2#

LAN-EAST Ping测试:

VPCS> ping 192.168.10.12 -t

84 bytes from 192.168.10.12 icmp_seq=1 ttl=64 time=18.460 ms
84 bytes from 192.168.10.12 icmp_seq=2 ttl=64 time=67.473 ms
84 bytes from 192.168.10.12 icmp_seq=3 ttl=64 time=24.646 ms
84 bytes from 192.168.10.12 icmp_seq=4 ttl=64 time=13.696 ms
84 bytes from 192.168.10.12 icmp_seq=5 ttl=64 time=15.216 ms
84 bytes from 192.168.10.12 icmp_seq=6 ttl=64 time=48.122 ms
84 bytes from 192.168.10.12 icmp_seq=7 ttl=64 time=33.200 ms
84 bytes from 192.168.10.12 icmp_seq=8 ttl=64 time=14.530 ms
^C
VPCS>

上一篇 下一篇

猜你喜欢

热点阅读