H3C VXLAN集中式网关配置案例

在这里插入图片描述拓扑 要求VM1-VM3可以互访 VM2-VM4可以互访
配置文件
Switch A

undo vxlan ip-forwarding

ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 20.1.1.0 0.0.0.255

vlan 20

l2vpn enable

vsi vpna
vxlan 10
tunnel 1
tunnel 2

vsi vpnb
vxlan 20
tunnel 1
tunnel 2

interface LoopBack0
ip address 1.1.1.1 255.255.255.255

interface Vlan-interface20
ip address 20.1.1.1 255.255.255.0

interface HundredGigE1/0/1
port link-mode bridge
service-instance 1000
encapsulation s-vid 10
xconnect vsi vpna
service-instance 2000
encapsulation s-vid 11
xconnect vsi vpnb

interface HundredGigE1/0/2
port link-mode bridge
port access vlan 20

interface Tunnel1 mode vxlan
source 1.1.1.1
destination 2.2.2.2

interface Tunnel2 mode vxlan
source 1.1.1.1
destination 3.3.3.3

Switch B

undo vxlan ip-forwarding

ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 30.1.1.0 0.0.0.255

vlan 30

l2vpn enable

vsi vpna
vxlan 10
tunnel 1
tunnel 2

vsi vpnb
vxlan 20
tunnel 1
tunnel 2

interface LoopBack0
ip address 2.2.2.2 255.255.255.255

interface Vlan-interface30
ip address 30.1.1.2 255.255.255.0

interface HundredGigE1/0/1
port link-mode bridge
service-instance 1000
encapsulation s-vid 12
xconnect vsi vpna
service-instance 2000
encapsulation s-vid 13
xconnect vsi vpnb

interface HundredGigE1/0/2
port link-mode bridge
port access vlan 30

interface Tunnel1 mode vxlan
source 2.2.2.2
destination 1.1.1.1

interface Tunnel2 mode vxlan
source 2.2.2.2
destination 3.3.3.3

Switch C

ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 40.1.1.0 0.0.0.255

ospf 2 router-id 3.3.3.3
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
network 100.1.1.0 0.0.0.255

vlan 40

vlan 100

l2vpn enable

vsi vpna
gateway vsi-interface 1
vxlan 10
tunnel 1
tunnel 2

vsi vpnb
gateway vsi-interface 2
vxlan 20
tunnel 1
tunnel 2

interface LoopBack0
ip address 3.3.3.3 255.255.255.255

interface Vlan-interface40
ip address 40.1.1.3 255.255.255.0

interface Vlan-interface100
ip address 100.1.1.1 255.255.255.0

interface HundredGigE1/0/2
port link-mode bridge
port access vlan 40

interface HundredGigE1/0/3
port link-mode bridge
port access vlan 100

interface Vsi-interface1
ip address 10.1.1.1 255.255.255.0

interface Vsi-interface2
ip address 10.1.2.1 255.255.255.0

interface Tunnel1 mode vxlan
source 3.3.3.3
destination 1.1.1.1

interface Tunnel2 mode vxlan
source 3.3.3.3
destination 2.2.2.2

return

Switch D

ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 20.1.1.0 0.0.0.255
network 30.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255

vlan 20

vlan 30

vlan 40

interface LoopBack0
ip address 4.4.4.4 255.255.255.255

interface Vlan-interface20
ip address 20.1.1.4 255.255.255.0

interface Vlan-interface30
ip address 30.1.1.4 255.255.255.0

interface Vlan-interface40
ip address 40.1.1.4 255.255.255.0

interface HundredGigE1/0/1
port link-mode bridge
port access vlan 20

interface HundredGigE1/0/2
port link-mode bridge
port access vlan 30

interface HundredGigE1/0/3
port link-mode bridge
port access vlan 40

return

  • 25
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值