]>
git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/dpdk/examples/ip_pipeline/config/network_layers.sh
2 # run ./config/network_layers.sh
5 ################################################################################
7 ################################################################################
8 # Routes added implicitly when links are brought UP:
9 # IP Prefix = 10.0.0.1/16 => (Port 0, Local)
10 # IP Prefix = 10.0.0.1/32 => (Port 4, Local)
11 # IP Prefix = 10.1.0.1/16 => (Port 1, Local)
12 # IP Prefix = 10.1.0.1/32 => (Port 4, Local)
13 # IP Prefix = 10.2.0.1/16 => (Port 2, Local)
14 # IP Prefix = 10.2.0.1/32 => (Port 4, Local)
15 # IP Prefix = 10.3.0.1/16 => (Port 3, Local)
16 # IP Prefix = 10.3.0.1/32 => (Port 4, Local)
21 link
0 config
10.0.0.1 16
22 link
1 config
10.1.0.1 16
23 link
2 config
10.2.0.1 16
24 link
3 config
10.3.0.1 16
31 ################################################################################
33 ################################################################################
34 p
1 arp add default
5 #SINK3
35 p
1 arp add
0 10.0.0.2 a0
:b0
:c0
:d0
:e0
:f0
36 p
1 arp add
1 10.1.0.2 a1
:b1
:c1
:d1
:e1
:f1
37 p
1 arp add
2 10.2.0.2 a2
:b2
:c2
:d2
:e2
:f2
38 p
1 arp add
3 10.3.0.2 a3
:b3
:c3
:d3
:e3
:f3
41 ################################################################################
43 ################################################################################
44 p
1 route add default
4 #SINK2
45 p
1 route add
100.0.0.0 16 port
0 ether
10.0.0.2
46 p
1 route add
100.1.0.0 16 port
1 ether
10.1.0.2
47 p
1 route add
100.2.0.0 16 port
2 ether
10.2.0.2
48 p
1 route add
100.3.0.0 16 port
3 ether
10.3.0.2
51 ################################################################################
52 # Local destination UDP traffic
53 ################################################################################
54 # Prio = Lowest: [SA = ANY, DA = ANY, SP = ANY, DP = ANY, PROTO = ANY] => Drop
55 # Prio = 1 (High): [SA = ANY, DA = 10.0.0.1, SP = ANY, DP = 1000, PROTO = UDP] => Allow
56 # Prio = 1 (High): [SA = ANY, DA = 10.1.0.1, SP = ANY, DP = 1001, PROTO = UDP] => Allow
57 # Prio = 1 (High): [SA = ANY, DA = 10.2.0.1, SP = ANY, DP = 1002, PROTO = UDP] => Allow
58 # Prio = 1 (High): [SA = ANY, DA = 10.3.0.1, SP = ANY, DP = 1003, PROTO = UDP] => Allow
59 p
2 firewall add default
1 #SINK0
60 p
2 firewall add priority
1 ipv4
0.0.0.0 0 10.0.0.1 32 0 65535 1000 1000 17 0xF port
0
61 p
2 firewall add priority
1 ipv4
0.0.0.0 0 10.1.0.1 32 0 65535 1001 1001 17 0xF port
0
62 p
2 firewall add priority
1 ipv4
0.0.0.0 0 10.2.0.1 32 0 65535 1002 1002 17 0xF port
0
63 p
2 firewall add priority
1 ipv4
0.0.0.0 0 10.3.0.1 32 0 65535 1003 1003 17 0xF port
0
66 ################################################################################
67 # Local destination TCP traffic
68 ################################################################################
69 # Unknown connection => Drop
70 # TCP [SA = 100.0.0.10, DA = 10.0.0.1, SP = 1000, DP = 80] => socket ID = 0
71 # TCP [SA = 100.1.0.10, DA = 10.1.0.1, SP = 1001, DP = 80] => socket ID = 1
72 # TCP [SA = 100.2.0.10, DA = 10.2.0.1, SP = 1002, DP = 80] => socket ID = 2
73 # TCP [SA = 100.3.0.10, DA = 10.3.0.1, SP = 1003, DP = 80] => socket ID = 3
74 p
3 flow add default
1 #SINK1
75 p
3 flow add ipv4
100.0.0.10 10.0.0.1 1000 80 6 port
0 id
0
76 p
3 flow add ipv4
100.1.0.10 10.1.0.1 1001 80 6 port
0 id
1
77 p
3 flow add ipv4
100.2.0.10 10.2.0.1 1002 80 6 port
0 id
2
78 p
3 flow add ipv4
100.3.0.10 10.3.0.1 1003 80 6 port
0 id
3