局域网手动vxlan集中式网关整体配置方案
需求分析
1、局域网部署集中式网关
2、底层ospf打通
3、edge1和border之间建立vxlan隧道,edge2和border之间建立vxlan隧道
4、vlan 10和20可以互通,又都能nat上公网
border
router id 1.1.1.1
bridge-domain 10
vxlan vni 10
bridge-domain 20
vxlan vni 20
interface Vbdif10
ip address 192.168.10.254 255.255.255.0
interface Vbdif20
ip address 192.168.20.254 255.255.255.0
interface MEth0/0/0
undo shutdown
interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.0.11.1 255.255.255.0
interface GE1/0/1
undo portswitch
undo shutdown
ip address 10.0.12.1 255.255.255.0
interface GE1/0/2
undo portswitch
undo shutdown
ip address 10.0.14.2 255.255.255.0
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
interface Nve1
source 1.1.1.1
vni 10 head-end peer-list 2.2.2.2
vni 20 head-end peer-list 3.3.3.3
interface NULL0
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.11.1 0.0.0.0
network 10.0.12.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 10.0.14.1
edge1
router id 2.2.2.2
bridge-domain 10
vxlan vni 10
interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.0.11.2 255.255.255.0
interface GE1/0/1
undo shutdown
interface GE1/0/1.10 mode l2
encapsulation dot1q vid 10
bridge-domain 10
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
interface Nve1
source 2.2.2.2
vni 10 head-end peer-list 1.1.1.1
interface NULL0
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.0.11.2 0.0.0.0
edge2
router id 3.3.3.3
bridge-domain 20
vxlan vni 20
interface MEth0/0/0
undo shutdown
interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.0.12.2 255.255.255.0
interface GE1/0/1
undo shutdown
interface GE1/0/1.20 mode l2
encapsulation dot1q vid 20
bridge-domain 20
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
interface Nve1
source 3.3.3.3
vni 20 head-end peer-list 1.1.1.1
interface NULL0
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.0.12.2 0.0.0.0
switch1
vlan batch 10
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
swithc2
vlan batch 20
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20
interface GigabitEthernet0/0/2
port link-type access
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
ar1
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
interface GigabitEthernet0/0/0
ip address 10.0.14.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 100.0.0.2 255.255.255.0
nat outbound 2000
ip route-static 0.0.0.0 0.0.0.0 100.0.0.1
ip route-static 192.168.0.0 255.255.0.0 10.0.14.2
ar2
interface GigabitEthernet0/0/0
ip address 100.0.0.1 255.255.255.0
隧道查看
两个vlan 的pc测试联通性
上网ping通