目录
3.配置border和edge之间的underlay网络的OSPF协议
6.配置NVE、指定vxlan的头尾复制功能,指定静态的vxlan隧道
实验拓扑:
实验目的:配置静态vxlan 、实现二层互访
1.配置IP地址
2.配置VLAN的基本配置
[S1]vlan batch 10 20
[S1]dis current-configuration interface g0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
[S1]dis current-configuration interface g0/0/2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
[S1]dis current-configuration interface g0/0/3
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
3.配置border和edge之间的underlay网络的OSPF协议
[edge1-ospf-1]dis this
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.12.0 0.0.0.255
[border-ospf-1]dis this
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.0.12.0 0.0.0.255
network 10.0.23.0 0.0.0.255
[edge2-ospf-1]dis this
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.0.23.0 0.0.0.255
查看ospf的邻居关系
4.配置edge节点的BD域,将VNI绑定到BD域中。
[edge1]bridge-domain 10 ##创建一个BD域为10
[edge1-bd10]vxlan vni 10 ##绑定vxlan的VNI为10
[edge1]bridge-domain 20
[edge1-bd20]vxlan vni 20
[edge2]bridge-domain 10
[edge2-bd10]vxlan vni 10
[edge2]bridge-domain 20
[edge2-bd20]vxlan vni 20
5.配置子接口,不同的子接口绑定到不同的BD域当中。
[edge1]int g1/0/1
[edge1-GE1/0/1]undo shutdown ##开启接口
[edge1-GE1/0/1.10]dis this
#
interface GE1/0/1.10 mode l2 ##配置子接口为二层接口
encapsulation dot1q vid 10 ##配置子接口能够处理VLAN10的数据
bridge-domain 10 ##绑定到BD域10
[edge1-GE1/0/1.20]dis this
#
interface GE1/0/1.20 mode l2
encapsulation dot1q vid 20
bridge-domain 20
[edge2]interface GE1/0/1
[edge2-GE1/0/1] undo shutdown
[edge2-GE1/0/1.10]dis this
#
interface GE1/0/1.10 mode l2
encapsulation dot1q vid 10
bridge-domain 10
[edge2-GE1/0/1.10]int g1/0/1.20
[edge2-GE1/0/1.20]dis this
#
interface GE1/0/1.20 mode l2
encapsulation dot1q vid 20
bridge-domain 20
6.配置NVE、指定vxlan的头尾复制功能,指定静态的vxlan隧道
[edge1-Nve1]dis this
#
interface Nve1 ##创建nve接口
source 1.1.1.1 ##指定vtep地址为1.1.1.1
vni 10 head-end peer-list 2.2.2.2 ##配置头端复制列表
vni 20 head-end peer-list 2.2.2.2
[edge2-Nve1]dis this
#
interface Nve1
source 2.2.2.2
vni 10 head-end peer-list 1.1.1.1
vni 20 head-end peer-list 1.1.1.1
查看VXLAN建立的隧道情况