PracticeDev/study_python/tcp_relay-master/ovs-vlan.txt

79 lines
3.1 KiB
Plaintext
Raw Permalink Normal View History

2022-12-20 17:31:11 +08:00
ovs-vsctl set Port ovs-iq1-eth1 tag=100
ovs-vsctl set Port ovs-iq1-eth2 tag=200
ovs-vsctl set Port ovs-iq2-eth1 tag=300
ovs-vsctl set Port ovs-iq2-eth2 tag=400
ovs-vsctl set Port ovs-mpp-neth1 trunks=100,300
ovs-vsctl set Port ovs-mpp-neth2 trunks=200,400
/usr/local/lib/python2.7/dist-packages/scapy/layers/l2.py
cp /home/mimic/mpp/l2.py /usr/local/lib/python2.7/dist-packages/scapy/layers/l2.py
cp /home/mimic/mpp/config.py /usr/local/lib/python2.7/dist-packages/scapy/config.py
docker exec -it eq1 /bin/bash
zebra& isisd& vtysh
con t
router isis 1
net 49.0001.0000.0000.0001.00
ip router isis 1
mac
eq1 eth1 1a:e8:3a:f4:f6:5e
iq1 eth1 f2:18:34:41:07:3a
eth2 a6:4c:c7:b8:89:8d
iq2 eth1 56:68:f2:bf:1f:4e
eth2 da:33:77:63:93:59
pipework $OVS -i neth1 -l ovs-mpp-neth1 mpp 10.10.1.1/24
pipework $OVS -i neth2 -l ovs-mpp-neth2 mpp 10.10.2.1/24
pipework $OVS -i eth1 -l ovs-iq1-eth1 iq1 1.1.1.100/24 00:00:00:00:00:01
pipework $OVS -i eth2 -l ovs-iq1-eth2 iq1 2.2.2.100/24 00:00:00:00:00:02
pipework $OVS -i eth1 -l ovs-iq2-eth1 iq2 1.1.1.100/24 00:00:00:00:00:03
pipework $OVS -i eth2 -l ovs-iq2-eth2 iq2 2.2.2.100/24 00:00:00:00:00:04
#south interfaces
echo "Config mpp south interfaces"
connect eq1 eth1 1.1.1.1/24 00:00:00:00:00:05 mpp seth1 10.1.1.1/24 00:00:00:00:00:06
connect eq2 eth1 2.2.2.1/24 00:00:00:00:00:07 mpp seth2 10.1.2.1/24 00:00:00:00:00:08
ip route 192.168.2.10 255.255.255.255 192.168.1.101
ip route 192.168.2.11 255.255.255.255 192.168.1.101
ip route 192.168.2.12 255.255.255.255 192.168.1.101
ip route 192.168.2.13 255.255.255.255 192.168.1.101
ip route 192.168.2.14 255.255.255.255 192.168.1.101
ip route 192.168.2.15 255.255.255.255 192.168.1.101
ip route 192.168.2.16 255.255.255.255 192.168.1.101
ip route 192.168.2.17 255.255.255.255 192.168.1.101
ip route 192.168.2.18 255.255.255.255 192.168.1.101
ip route 192.168.2.19 255.255.255.255 192.168.1.101
ip route 192.168.2.20 255.255.255.255 192.168.1.101
ip route 192.168.2.21 255.255.255.255 192.168.1.101
ip route 192.168.2.22 255.255.255.255 192.168.1.101
ip route 192.168.2.23 255.255.255.255 192.168.1.101
ip route 192.168.2.24 255.255.255.255 192.168.1.101
ip route 192.168.2.25 255.255.255.255 192.168.1.101
ip route 192.168.2.26 255.255.255.255 192.168.1.101
ip route 192.168.2.27 255.255.255.255 192.168.1.101
ip route 192.168.2.28 255.255.255.255 192.168.1.101
ip route 192.168.2.28 255.255.255.255 192.168.1.101
ip route 192.168.2.30 255.255.255.255 192.168.1.101
ip route 192.168.2.31 255.255.255.255 192.168.1.101
ip route 192.168.2.32 255.255.255.255 192.168.1.101
ip route 192.168.2.33 255.255.255.255 192.168.1.101
ip route 192.168.2.34 255.255.255.255 192.168.1.101
ip route 192.168.2.35 255.255.255.255 192.168.1.101
ip route 192.168.2.36 255.255.255.255 192.168.1.101
ip route 192.168.2.37 255.255.255.255 192.168.1.101
ovs-vsctl set Port eq1_eth1-ovs tag=100
ovs-vsctl set Port eq2_eth1-ovs tag=101
ovs-vsctl set Port iq1_eth1-ovs tag=200
ovs-vsctl set Port iq1_eth2-ovs tag=201
ovs-vsctl set Port iq2_eth1-ovs tag=300
ovs-vsctl set Port iq2_eth2-ovs tag=301
ovs-vsctl set Port mpp_eth1-ovs trunks=100,101
ovs-vsctl set Port mpp_eth2-ovs trunks=200,201,300,301