-
Notifications
You must be signed in to change notification settings - Fork 1
/
vm
31 lines (25 loc) · 1.13 KB
/
vm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
sudo ip link add name vpp1out type veth peer name vpp1host
sudo ip link set dev vpp1out up
sudo ip link set dev vpp1host up
sudo ip addr add 10.10.1.1/24 dev vpp1host
sudo ip -6 addr add 2001:f1::1/126 dev vpp1host
sudo ip link add name vpp2out type veth peer name vpp2host
sudo ip link set dev vpp2out up
sudo ip link set dev vpp2host up
sudo ip addr add 10.11.4.1/24 dev vpp2host
sudo ip -6 addr add 2001:f4::1/126 dev vpp2host
# routes for vpp2 and vpp3
sudo ip route add 10.10.2.0/24 via 10.10.1.2
sudo ip route add 2001:f2::0/126 via 2001:f1::2
sudo ip route add 10.10.3.0/24 via 10.10.1.2
sudo ip route add 2001:f3::0/126 via 2001:f1::2
# route from host1 to host2 in linux
sudo ip route add 2001:f4::1/126 via 2001:f1::2
# remove default routes
# sudo ip route del 10.10.1.0/24 via 0.0.0.0
# sudo ip route del 10.11.4.0/24 via 0.0.0.0
# sudo ip route add 10.10.1.2/32 via 10.10.1.1
# sudo ip route add 10.11.4.2/32 via 10.11.4.1
export STARTUP_CONF=/home/vagrant/Unyte/vpp/dev_srh_export/1_vpp.conf
export STARTUP_CONF=/home/vagrant/Unyte/vpp/dev_srh_export/2_vpp.conf
export STARTUP_CONF=/home/vagrant/Unyte/vpp/dev_srh_export/3_vpp.conf