forked from ligato/vpp-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnat.proto
89 lines (76 loc) · 4.14 KB
/
nat.proto
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
syntax = "proto3";
package nat;
enum Protocol { /* Available protocols. */
TCP = 0;
UDP = 1;
ICMP = 2; /* ICMP is not permitted for load balanced entries. */
};
enum TwiceNatMode { /* Available twice-NAT modes */
DISABLED = 0;
ENABLED = 1;
SELF = 2;
};
/* NAT44 global config */
message Nat44Global {
bool forwarding = 2; /* Enable/disable forwarding. */
message NatInterface { /* Local network interfaces enabled for NAT44. */
string name = 1; /* Interface name. */
bool is_inside = 2; /* Distinguis between inside/outside interface. */
bool output_feature = 3; /* Enable/disable output feature. */
}
repeated NatInterface nat_interfaces = 3;
message AddressPool {
string first_src_address = 1; /* Starting address of the source IPv4 pool range. */
string last_src_address = 2; /* Ending address of the source IPv4 pool range. Optional parameter. */
uint32 vrf_id = 3; /* VRF (table) ID. */
bool twice_nat = 4; /* Enable/disable twice NAT. */
}
repeated AddressPool address_pools = 5;
message VirtualReassembly { /* NAT virtual reassembly */
uint32 timeout = 1; /* Reassembly timeout */
uint32 max_reass = 2; /* Maximum number of concurrent reassemblies */
uint32 max_frag = 3; /* Maximum number of fragments per reassembly */
bool drop_frag = 4; /* If set to true fragments are dropped, translated otherwise*/
}
VirtualReassembly virtual_reassembly_ipv4 = 6;
VirtualReassembly virtual_reassembly_ipv6 = 7;
}
/* Many-to-one (SNAT) setup */
message Nat44SNat {
message SNatConfig { /* DNat configuration list. */
string label = 1; /* Unique identifier of the DNAT config. */
// TBD
}
repeated SNatConfig snat_configs = 1;
}
/* One-to-many (DNAT) setup */
message Nat44DNat {
message DNatConfig { /* DNat configuration list. */
string label = 1; /* Unique identifier of the DNAT config. */
message StaticMapping { /* A list of static mappings in DNAT. */
string external_interface = 2; /* External interface may be used together with IP addresses. */
string external_ip = 3; /* External address. */
uint32 external_port = 4; /* Port (do not set for address mapping). */
message LocalIP {
uint32 vrf_id = 4; /* VRF (table) ID. */
string local_ip = 1; /* Local IP address). */
uint32 local_port = 3; /* port (do not set for address mapping). */
uint32 probability = 2; /* Probability mode. */
}
repeated LocalIP local_ips = 5; /* List of local IP addresses. If there is more than one entry,
Load ballancer is enabled. */
Protocol protocol = 6; /* Protocol used for static mapping. */
TwiceNatMode twice_nat = 7; /* Enable/disable (self-)twice NAT. */
}
repeated StaticMapping st_mappings = 4;
message IdentityMapping { /* A list of identity mappings in DNAT. */
uint32 vrf_id = 1; /* VRF (table) ID. */
string addressed_interface = 2; /* Name of the DHCP addressed interface, preffered before IP address. */
string ip_address = 3; /* IP address. */
uint32 port = 4; /* Port (do not set for address mapping). */
Protocol protocol = 5; /* Protocol used for identity mapping. */
}
repeated IdentityMapping id_mappings = 6;
}
repeated DNatConfig dnat_configs = 1;
}