第1章 VXLAN

1.1 静态VXLAN

图片[1]-第1章 VXLAN-大赛人网
图1-1 VXLAN配置网络拓扑

1.配置CE1三层OSPF。

<HUAWEI>system
[~HUAWEI]sysname CE1
[*HUAWEI]commit
[~CE1]interface GE 1/0/1
[~CE1-GE1/0/1]undo shutdown 
[*CE1-GE1/0/1]undo portswitch 
[*CE1-GE1/0/1]ip address 13.1.1.1 8
[*CE1-GE1/0/1]commit
[*CE1]interface LoopBack 0
[*CE1-LoopBack0]ip address 1.1.1.1 32

[CE1]ospf 1 router-id 1.1.1.1
[*CE1-ospf-1]area 0
[*CE1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[*CE1-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
[~CE1]commit 

2.配置CE2三层OSPF。

<HUAWEI>system
[~HUAWEI]sysname CE2
[*HUAWEI]commit
[~CE2]interface GE 1/0/2
[~CE2-GE1/0/2]undo shutdown 
[*CE2-GE1/0/2]undo portswitch 
[*CE2-GE1/0/2]ip address 23.1.1.2 8
[*CE2-GE1/0/2]commit
[~CE2]interface LoopBack 0
[*CE2-LoopBack0]ip address 2.2.2.2 32

[~CE2]ospf 1 router-id 2.2.2.2
[*CE2-ospf-1]area 0
[*CE2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[*CE2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
[~CE]commit 

3.配置CE3三层OSPF。

<HUAWEI>system
[~HUAWEI]sysname CE3
[*HUAWEI]commit
[~CE3]interface GE 1/0/1
[~CE3-GE1/0/1]undo shutdown
[*CE3-GE1/0/1]undo portswitch 
[*CE3-GE1/0/1]ip address 13.1.1.3 8
[*CE3]interface GE 1/0/2
[*CE3-GE1/0/2]undo shutdown
[*CE3-GE1/0/2]undo portswitch
[*CE3-GE1/0/2]ip address 23.1.1.3 8
[*CE3-GE1/0/2]commit 
[*CE3]interface LoopBack 0
[*CE3-LoopBack0]ip address 3.3.3.3 32

[~CE3]ospf 1 router-id 3.3.3.3
[*CE3-ospf-1]area 0
[*CE3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[*CE3-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
[*CE3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
[~CE3]commit 

4.CE1配置业务接入点

[~CE1]bridge-domain 10
[*CE1]bridge-domain 20
[~CE1]interface GE 1/0/0
[~CE1-GE1/0/0]undo shutdown 
[*CE1]interface GE 1/0/0.10 mode l2             
[*CE1-GE1/0/0.10]encapsulation dot1q vid 10
[*CE1-GE1/0/0.10]bridge-domain 10

[*CE1-bd20]interface GE 1/0/0.20 mode l2
[*CE1-GE1/0/0.20]encapsulation dot1q vid 20   
[*CE1-GE1/0/0.20]bridge-domain 20       

5.CE2配置业务接入点

[~CE2]bridge-domain 10
[*CE2]bridge-domain 20
[~CE2]interface GE1/0/0
[~CE2-GE1/0/0]undo shutdown 
[*CE2]interface GE 1/0/0.10 mode l2
[*CE2-GE1/0/0.10]encapsulation dot1q vid 10
[*CE2-GE1/0/0.10]bridge-domain 10
[*CE2]interface GE 1/0/0.20 mode l2
[*CE2-GE1/0/0.20]encapsulation dot1q vid 20
[*CE2-GE1/0/0.20]bridge-domain 20

6.CE1配置VXLAN隧道

[*CE1]bridge-domain 10
[*CE1-bd10]vxlan vni 10
[*CE1]bridge-domain 20
[*CE1-bd20]vxlan vni 20
[*CE1]interface nve 1
[*CE1-Nve1]source 1.1.1.1
[*CE1-Nve1]vni 10 head-end peer-list 2.2.2.2
[*CE1-Nve1]vni 20 head-end peer-list 2.2.2.2

7.CE2配置VXLAN隧道

[*CE2]bridge-domain 10
[*CE2-bd10]vxlan vni 10
[*CE2]bridge-domain 20
[*CE2-bd20]vxlan vni 20
[*CE2]interface nve 1
[*CE2-Nve1]source 2.2.2.2
[*CE2-Nve1]vni 10 head-end peer-list 1.1.1.1
[*CE2-Nve1]vni 20 head-end peer-list 1.1.1.1

8.SW1配置

[SW1]vlan batch 10 20
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk 
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access 
[SW1-GigabitEthernet0/0/2]port default vlan 10
[SW1]interface GigabitEthernet 0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access 
[SW1-GigabitEthernet0/0/3]port default vlan 20

9.SW2配置

[SW2]vlan batch 10 20
[SW2]interface GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk 
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[SW2]interface GigabitEthernet 0/0/2
[SW2-GigabitEthernet0/0/2]port link-type access 
[SW2-GigabitEthernet0/0/2]port default vlan 10
[SW2]interface GigabitEthernet 0/0/3
[SW2-GigabitEthernet0/0/3]port link-type access
[SW2-GigabitEthernet0/0/3]port default vlan 20
© 版权声明
THE END
喜欢就支持一下吧
点赞8 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容