CGNAT Configuration
此内容尚不支持你的语言。
CGNAT Configuration
Section titled “CGNAT Configuration”show cgnat interface
Section titled “show cgnat interface”[Command]
show cgnat interface
[Purpose]
Display the interfaces on which CGNAT is enabled and their zone (inside or outside).
[View]
System view
[Use Cases]
sonic# show cgnat interface+-------------+--------------+| INTERFACE | CGNAT_ZONE |+=============+==============+| Ethernet14 | inside |+-------------+--------------+| Ethernet15 | outside |+-------------+--------------+show cgnat instance config [name instance_name]
Section titled “show cgnat instance config [name instance_name]”[Command]
show cgnat instance config [name instance_name]
[Purpose]
Display the detailed configuration of CGNAT instance(s) and the status of the bound ACL.
[Parameter]
| instance_name | Optional. The name of a CGNAT instance. If not specified, all instances are displayed |
[View]
System view
[Use Cases]
sonic# show cgnat instance configshow cgnat binding
Section titled “show cgnat binding”[Command]
show cgnat binding
[Purpose]
Display the current CGNAT bindings, including the binding name, bound instance, ACL and binding status.
[View]
System view
[Use Cases]
sonic# show cgnat bindingshow cgnat port-allocation-profile [name profile_name]
Section titled “show cgnat port-allocation-profile [name profile_name]”[Command]
show cgnat port-allocation-profile [name profile_name]
[Purpose]
Display the configured CGNAT port allocation profiles and their reference (bound) status.
[Parameter]
| profile_name | Optional. The name of a port allocation profile. If not specified, all profiles are displayed |
[View]
System view
[Use Cases]
sonic# show cgnat port-allocation-profileshow cgnat addresses-pool [config {name addresses-pool_name} | resource-status {name addresses-pool_name}]
Section titled “show cgnat addresses-pool [config {name addresses-pool_name} | resource-status {name addresses-pool_name}]”[Command]
show cgnat addresses-pool [config {name addresses-pool_name} | resource-status {name addresses-pool_name}]
[Purpose]
Display the configured CGNAT address pools, including address ranges, bound port allocation profiles, reference status and block statistics.
[Parameter]
| addresses-pool_name | Optional. The name of an address pool. If not specified, all pools are displayed |
[View]
System view
[Use Cases]
sonic# show cgnat addresses-pool configshow cgnat instance resource-status [name instance_name]
Section titled “show cgnat instance resource-status [name instance_name]”[Command]
show cgnat instance resource-status [name instance_name]
[Purpose]
Display the port block allocation status and resource usage of CGNAT instance(s), including the number of total/allocated/cooling blocks and active users. Used to check resource exhaustion during operation.
[Parameter]
| instance_name | Optional. The name of a CGNAT instance. If not specified, all instances are displayed |
[View]
System view
[Use Cases]
sonic# show cgnat instance resource-statuscgnat enable
Section titled “cgnat enable”[Command]
cgnat enable
[Purpose]
Enable cgnat globally
[View]
System configuration view
[Use Cases]
sonic# configure terminalsonic(config)# cgnat enablecgnat port-allocation-profile profile_name
Section titled “cgnat port-allocation-profile profile_name”[Command]
cgnat port-allocation-profile profile_name
[Purpose]
Create a CGNAT port allocation profile and enter the port-allocation-profile view. The port allocation profile defines the port block allocation policy , including block size, block allocation mode, port allocation mode, reserved port range and block cooling time.
[Parameter]
| profile_name | The name of the port allocation profile |
[View]
System configuration view
[Notes]
The parameters marked as non-modifiable below cannot be changed once the profile is referenced (bound) by an address pool.
[Use Cases]
sonic# configure terminalsonic(config)# cgnat port-allocation-profile test1sonic(config-cgnat-port-allocation-profile-test1)#block-size block_size
Section titled “block-size block_size”[Command]
block-size block_size
[Purpose]
Configure the number of ports contained in one port block. The public IP port range of the pool is divided into port blocks according to this size, and each block is allocated to a user as a whole.
[Parameter]
| block_size | The number of ports per block. Default: 2048 |
[View]
Port-allocation-profile view
[Notes]
This command cannot be modified after the profile is referenced by an address pool.
[Use Cases]
sonic(config-cgnat-port-allocation-profile-test1)# block-size 2048block-alloc-mode on-demand | pre-alloc
Section titled “block-alloc-mode on-demand | pre-alloc”[Command]
block-alloc-mode on-demand | pre-alloc
[Purpose]
Configure the port block allocation mode.
[Parameter]
| on-demand | Allocate a port block to a user only when the user actually needs ports (default) |
| pre-alloc | Pre-allocate a fixed number of port blocks to each user. The number is specified by prealloc-blocks-per-user |
[View]
Port-allocation-profile view
[Notes]
This command cannot be modified after the profile is referenced by an address pool.
[Use Cases]
sonic(config-cgnat-port-allocation-profile-test1)# block-alloc-mode on-demandport-alloc-mode [random | sequence]
Section titled “port-alloc-mode [random | sequence]”[Command]
port-alloc-mode [random | sequence]
[Purpose]
Configure the port selection mode within a port block.
[Parameter]
| random | Allocate ports randomly within the block (default) |
| sequence | Allocate ports sequentially within the block |
[View]
Port-allocation-profile view
[Notes]
This command cannot be modified after the profile is referenced by an address pool.
[Use Cases]
sonic(config-cgnat-port-allocation-profile-test1)# port-alloc-mode randomreserved-port port-start port-end
Section titled “reserved-port port-start port-end”[Command]
reserved-port port-start port-end
[Purpose]
Configure the reserved (excluded) port range at the beginning of the port range. Reserved ports do not participate in port block division or allocation.
[Parameter]
| port-start | The start of the reserved port range |
| port-end | The end of the reserved port range. Default: 1023 |
[View]
Port-allocation-profile view
[Notes]
This command cannot be modified after the profile is referenced by an address pool.
[Use Cases]
sonic(config-cgnat-port-allocation-profile-test1)# reserved-port 0 1023prealloc-blocks-per-user number
Section titled “prealloc-blocks-per-user number”[Command]
prealloc-blocks-per-user number
[Purpose]
Configure the number of port blocks pre-allocated to each user. Only effective when block-alloc-mode is pre-alloc.
[Parameter]
| number | The number of pre-allocated blocks per user |
[View]
Port-allocation-profile view
[Notes]
This command cannot be modified after the profile is referenced by an address pool.
[Use Cases]
sonic(config-cgnat-port-allocation-profile-test1)# prealloc-blocks-per-user 1cooling-time second
Section titled “cooling-time second”[Command]
cooling-time second
[Purpose]
Configure the cooling time of a released port block. A block enters the COOLING state after being released and cannot be re-allocated to other users until the cooling time expires. This prevents packets of the old user from being forwarded to a new user by mistake.
[Parameter]
| second | The cooling time in seconds. Range: 1-3600. Default: 120 |
[View]
Port-allocation-profile view
[Notes]
Modifiable after binding.
[Use Cases]
sonic(config-cgnat-port-allocation-profile-test1)# cooling-time 120cgnat addresses-pool pool_name [range ip-start ip-end|prefix ip/mask] port-allocation-profile profile_name
Section titled “cgnat addresses-pool pool_name [range ip-start ip-end|prefix ip/mask] port-allocation-profile profile_name”[Command]
cgnat addresses-pool pool_name [range ip-start ip-end|prefix ip/mask] port-allocation-profile profile_name
[Purpose]
Create a CGNAT public address pool. The pool defines the public IPv4 addresses used for dynamic port block allocation, and binds a port allocation profile.
[Parameter]
| pool_name | The name of the address pool |
| range ip-start ip-end | Specify the public address range by start and end IP addresses |
| prefix ip/mask | Specify the public address range by a prefix |
| profile_name | The port allocation profile referenced by the pool |
[View]
System configuration view
[Notes]
The address range of a pool supports dynamic expansion (adding addresses), but does not support shrinking.
[Use Cases]
sonic(config)# cgnat addresses-pool pool1 range 23.159.240.1 23.159.240.254 port-allocation-profile test1cgnat instance cgnat_name dynamic [vrf vrf_name]
Section titled “cgnat instance cgnat_name dynamic [vrf vrf_name]”[Command]
cgnat instance cgnat_name dynamic [vrf vrf_name]
[Purpose]
Create a CGNAT instance in dynamic (Port Block Allocation) mode and enter the instance view. Dynamic mode allocates public IP and ports to users on demand or by pre-allocation in units of port blocks. All instances share the inside VRF where user traffic resides; vrf specifies the VRF of the instance itself.
[Parameter]
| cgnat_name | The name of the CGNAT instance |
| vrf vrf_name | The VRF of the instance. If not specified, the default VRF is used |
[View]
System configuration view
[Use Cases]
sonic(config)# cgnat instance cgnat1 dynamicsonic(config-cgnat-instance-dynamic-cgnat1)#outside-address-pool pool_name
Section titled “outside-address-pool pool_name”[Command]
outside-address-pool pool_name
[Purpose]
Bind a public address pool to the instance. The public IP and ports of dynamic sessions are allocated from the bound pools. Multiple pools can be configured.
[Parameter]
| pool_name | The name of an existing CGNAT address pool |
[View]
CGNAT instance view
[Notes]
This command cannot be modified after the instance is bound to an ACL (see cgnat binding).
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# outside-address-pool pool1outside-vrf vrf_name
Section titled “outside-vrf vrf_name”[Command]
outside-vrf vrf_name
[Purpose]
Configure the VRF used when the instance forwards traffic to the public network side (the VRF where the public address pool is reachable).
[Parameter]
| vrf_name | The name of the outside VRF |
[View]
CGNAT instance view
[Notes]
This command cannot be modified after the instance is bound to an ACL.
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# outside-vrf Vrf124filtering-mode [eif |adf |apdf]
Section titled “filtering-mode [eif |adf |apdf]”[Command]
filtering-mode [eif |adf |apdf]
[Purpose]
Configure the outbound-to-inbound filtering behavior of the instance, that is, whether packets from external hosts are allowed to pass through an existing mapping.
[Parameter]
| eif | Endpoint-Independent Filtering (endpoint-independent filtering / full cone behavior). As long as the mapping exists, any external host can send packets to the public IP:port. Default, maximizes P2P application compatibility |
| adf | Address-Dependent Filtering (address-dependent filtering). Only packets from the external IP address that the user has already communicated with are allowed |
| apdf | Address-Port-Dependent Filtering (address-and-port-dependent filtering). Only packets from the external IP address and port that the user has already communicated with are allowed |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# filtering-mode eifhairpining enable
Section titled “hairpining enable”[Command]
hairpining enable
[Purpose]
Enable hairpining (hairpin NAT). After it is enabled, users on the inside of the same CGNAT instance can access each other through the peer’s public mapping address.
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# hairpining enablemax-user-blocks 1-256
Section titled “max-user-blocks 1-256”[Command]
max-user-blocks 1-256
[Purpose]
Configure the maximum number of port blocks that a single user (inside source IP) can own at the same time. When the limit is reached, the user cannot apply for new port blocks.
[Parameter]
| 1-256 | The maximum number of port blocks per user |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# max-user-blocks 4max-user-ports 1-65535
Section titled “max-user-ports 1-65535”[Command]
max-user-ports 1-65535
[Purpose]
Configure the maximum number of ports that a single user (inside source IP) can occupy at the same time. Together with max-user-blocks, it limits the public port resources a user can consume.
[Parameter]
| 1-65535 | The maximum number of ports per user |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# max-user-ports 8192max-user-sessions 1-10240
Section titled “max-user-sessions 1-10240”[Command]
max-user-sessions 1-10240
[Purpose]
Configure the maximum number of concurrent sessions of a single user (inside source IP). New sessions beyond the limit are discarded. If not configured, the number of concurrent sessions per user is not limited.
[Parameter]
| 1-10240 | The maximum number of concurrent sessions per user |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# max-user-sessions 4096max-user-create-sessions-rate 1-10240
Section titled “max-user-create-sessions-rate 1-10240”[Command]
max-user-create-sessions-rate 1-10240
[Purpose]
Configure the maximum session creation rate of a single user (inside source IP), in sessions per second. Statistics are calculated in a rolling 1-second cycle. New sessions beyond the limit are discarded.
[Parameter]
| 1-10240 | The maximum number of new sessions per second per user |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# max-user-create-sessions-rate 200aging-tcp-syn 1-262144
Section titled “aging-tcp-syn 1-262144”[Command]
aging-tcp-syn 1-262144
[Purpose]
Configure the aging time of TCP sessions in the SYN-SENT / SYN-RCVD state, to limit the resource occupation of abnormal half-open connections.
[Parameter]
| 1-262144 | The aging time in seconds |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# aging-tcp-syn 75aging-tcp-established 1-262144
Section titled “aging-tcp-established 1-262144”[Command]
aging-tcp-established 1-262144
[Purpose]
Configure the aging time of TCP sessions in the ESTABLISHED state. The aging timer is refreshed when packets pass through the session.
[Parameter]
| 1-262144 | The aging time in seconds |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# aging-tcp-established 7440aging-tcp-fin-rst 1-262144
Section titled “aging-tcp-fin-rst 1-262144”[Command]
aging-tcp-fin-rst 1-262144
[Purpose]
Configure the aging time of TCP sessions after the connection is closed (FIN/RST received). The session is deleted when the timer expires and the occupied resources are released.
[Parameter]
| 1-262144 | The aging time in seconds |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# aging-tcp-fin-rst 60aging-udp 1-262144
Section titled “aging-udp 1-262144”[Command]
aging-udp 1-262144
[Purpose]
Configure the aging time of UDP sessions. The aging timer is refreshed when packets pass through the session.
[Parameter]
| 1-262144 | The aging time in seconds |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# aging-udp 300aging-icmp 1-262144
Section titled “aging-icmp 1-262144”[Command]
aging-icmp 1-262144
[Purpose]
Configure the aging time of ICMP (Echo Request/Reply) sessions.
[Parameter]
| 1-262144 | The aging time in seconds |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# aging-icmp 60tcp-mss 160-9540
Section titled “tcp-mss 160-9540”[Command]
tcp-mss 160-9540
[Purpose]
Configure the TCP MSS clamping value. The MSS option in TCP packets passing through the CGNAT instance is adjusted to this value when it exceeds it, to avoid IP fragmentation caused by MTU reduction.
[Parameter]
| 160-9540 | The MSS clamping value in bytes |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# tcp-mss 1460log mode [port-block | session]
Section titled “log mode [port-block | session]”[Command]
log mode [port-block | session]
[Purpose]
Configure the traceability log mode of the instance.
[Parameter]
| port-block | Port block log. Logs are recorded only when a port block is allocated or released. The log volume is about 1/1000 of session-level logging (default, recommended) |
| session | Session-level log. One log is recorded for each mapping creation and deletion, for fine-grained audit |
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# log mode port-blocksyslog disable
Section titled “syslog disable”[Command]
syslog disable
[Purpose]
Disable syslog output for the instance. By default, syslog output is enabled when the log mode and syslog server are configured.
[View]
CGNAT instance view
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# syslog disableipfix enable
Section titled “ipfix enable”[Command]
ipfix enable
[Purpose]
Enable IPFIX export for the instance. Port block allocation/release and session create/delete events are exported to the IPFIX collector.
[View]
CGNAT instance view
[Notes]
IPFIX collector, template and other related configurations refer to the IPFIX CLI manual. This command only enables IPFIX export on the CGNAT instance.
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# ipfix enableipfix collector ipaddress port src ipaddress port
Section titled “ipfix collector ipaddress port src ipaddress port”[Command]
ipfix collector ipaddress port src ipaddress port
[Purpose]
Configure the IPFIX collector address and the local source address/port used to send IPFIX packets for the instance.
[Parameter]
| ipaddress port | The IPv4 address and UDP port of the IPFIX collector |
| src ipaddress port | The local source IPv4 address and UDP port of IPFIX packets |
[View]
CGNAT instance view
[Notes]
The global IPFIX configuration (exporter, template, etc.) refers to the IPFIX CLI manual. This command only specifies the destination and source parameters for the CGNAT instance.
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# ipfix collector 192.0.2.100 4739 src 23.159.240.254 4739static-mapping outside ipaddress inside ipaddress [protocol {tcp| udp| icmp}]
Section titled “static-mapping outside ipaddress inside ipaddress [protocol {tcp| udp| icmp}]”[Command]
static-mapping outside ipaddress inside ipaddress [protocol {tcp| udp| icmp}]
[Purpose]
Configure an address-level static CGNAT mapping: outside_ip ↔ inside_ip, with the port kept unchanged. The outside (public) address must belong to the static address pool, which is isolated from the dynamic CGNAT address pool.
[Parameter]
| outside ipaddress | The public IPv4 address (static pool) |
| inside ipaddress | The private IPv4 address |
| protocol | Optional. tcp, udp or icmp. If not specified, all protocols are matched (equivalent to all) |
[View]
CGNAT instance view
[Notes]
An address-level static mapping does not create mappings for all 65535 ports. It is stored in the static address table, and an exact mapping is created lazily only when traffic hits a specific port. Conflict checks are performed when the mapping is created: the outside address must not overlap with any dynamic address pool of the instance; the same public endpoint (outside_ip + protocol, or outside_ip + outside_port + protocol) cannot be configured repeatedly; a static mapping cannot cover an existing dynamic mapping with the same inside endpoint.
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)#static-mapping outside 203.0.113.11 inside 10.0.0.11 protocol tcpstatic-mapping outside ipaddress port inside ipaddress port protocol [tcp|udp|icmp]
Section titled “static-mapping outside ipaddress port inside ipaddress port protocol [tcp|udp|icmp]”[Command]
static-mapping outside ipaddress port inside ipaddress port protocol [tcp|udp|icmp]
[Purpose]
Configure a port-level static CGNAT mapping: outside_ip:outside_port ↔ inside_ip:inside_port. The mapping table is created immediately upon configuration.
[Parameter]
| outside ipaddress port | The public IPv4 address and port (static pool) |
| inside ipaddress port | The private IPv4 address and port |
| protocol | tcp, udp or icmp |
[View]
CGNAT instance view
[Notes]
The conflict check rules are the same as the address-level static mapping: outside endpoints and inside endpoints cannot be duplicated, address-level and port-level rules of the same protocol on the same IP are mutually exclusive, and a static mapping cannot cover an existing dynamic mapping.
[Use Cases]
sonic(config-cgnat-instance-dynamic-cgnat1)# static-mapping outside 203.0.113.10 8080 inside 10.0.0.10 80 protocol tcpcgnat instance cgnat_name deterministic [vrf vrf_name]
Section titled “cgnat instance cgnat_name deterministic [vrf vrf_name]”[Command]
cgnat instance cgnat_name deterministic [vrf vrf_name]
[Purpose]
Create a CGNAT instance in deterministic (Deterministic NAT) mode and enter the instance view. In this mode, the mapping relationship between each inside address and the public address + port block is derived from a fixed algorithm: the port block of each inside user is calculated from the inside/outside address ratio, so the mapping can be reverse-derived without maintaining the runtime binding state. Suitable for traceability scenarios that require algorithmic reverse lookup.
[Parameter]
| cgnat_name | The name of the CGNAT instance |
| vrf vrf_name | The VRF of the instance. If not specified, the default VRF is used |
[View]
System configuration view
[Notes]
The deterministic instance view supports the following sub-commands. Except for inside-address , they have the same semantics as the dynamic instance and are not repeated here: outside-address-pool, outside-vrf, hairpinning enable, max-user-sessions, max-user-create-sessions-rate, aging-tcp-syn, aging-tcp-established, aging-tcp-fin-rst, aging-udp, aging-icmp, tcp-mss, syslog disable, ipfix enable, ipfix collector, static-mapping.
[Use Cases]
sonic(config)# cgnat instance cgnat2 deterministicsonic(config-cgnat-instance-deterministic-cgnat2)#inside-address [range ip-start ip-end|prefix ip/mask]
Section titled “inside-address [range ip-start ip-end|prefix ip/mask]”[Command]
inside-address [range ip-start ip-end|prefix ip/mask]
[Purpose]
Configure the inside address range of the deterministic instance. The deterministic mapping (inside address → public IP + port block) is derived from the ratio of the inside address count to the outside address count. Multiple inside address ranges can be configured.
[Parameter]
| range ip-start ip-end | Specify the inside address range by start and end IP addresses |
| prefix ip/mask | Specify the inside address range by a prefix |
[View]
CGNAT (deterministic) instance view
[Notes]
This command cannot be modified after the instance is bound to an ACL.
[Use Cases]
sonic(config-cgnat-instance-deterministic-cgnat2)# inside-address range 10.0.0.1 10.0.3.254cgnat binding binding_name cgnat_name acl_name
Section titled “cgnat binding binding_name cgnat_name acl_name”[Command]
cgnat binding binding_name cgnat_name acl_name
[Purpose]
Create a binding between an ACL and a CGNAT instance. Inside traffic matching the permit rules of the ACL is diverted to the CGNAT instance for translation.
[Parameter]
| binding_name | The name of the binding |
| cgnat_name | The name of an existing CGNAT instance |
| acl_name | The name of an existing ACL |
[View]
System configuration view
[Notes]
The ACL is matched in binding priority order. Only permit rules divert traffic to CGNAT; deny rules and non-matched traffic follow normal forwarding. After the instance is bound by a binding, its non-modifiable parameters (address pool, outside VRF, port profile related parameters, etc.) cannot be changed.
[Use Cases]
sonic(config)# cgnat binding bind1 cgnat1 acl1acl acl_name
Section titled “acl acl_name”[Command]
acl acl_name
[Purpose]
Apply an existing ACL to the interface. Together with the CGNAT binding, it implements traffic diversion: the ACL classifies the traffic, and the binding redirects the matched traffic to the CGNAT instance.
[Parameter]
| acl_name | The name of an existing ACL |
[View]
Interface view
[Use Cases]
sonic(config)# interface ethernet 4sonic(config-if-4)# acl acl1cgnat-zone [inside|outside]
Section titled “cgnat-zone [inside|outside]”[Command]
cgnat-zone [inside|outside]
[Purpose]
Configure the CGNAT zone of the interface. The zone identifies the direction of traffic on the interface: inside (user side) traffic is translated by the CGNAT instance, and outside (public network side) traffic performs the reverse translation lookup.
[Parameter]
| inside | The interface belongs to the inside (user side) zone |
| outside | The interface belongs to the outside (public network side) zone |
[View]
Interface view
[Use Cases]
sonic(config)# interface ethernet 4sonic(config-if-4)# cgnat-zone insidesonic(config)# interface ethernet 8sonic(config-if-8)# cgnat-zone outsidecgnat syslog
Section titled “cgnat syslog”[Command]
cgnat syslog
[Purpose]
Configure the server information for sending CGNAT syslog logs.
[View]
System configuration view
[Use Cases]
sonic(config)# cgnat syslogsonic(config-cgnat-syslog)#server number target-ip target_ip protocol [tcp|udp] port l4_port [src-ip src_ip |vrf vrf_name]
Section titled “server number target-ip target_ip protocol [tcp|udp] port l4_port [src-ip src_ip |vrf vrf_name]”[Command]
server number target-ip target_ip protocol [tcp|udp] port l4_port [src-ip src_ip |vrf vrf_name]
[Purpose]
Configure the syslog server information to which CGNAT syslog is output.
[Parameter]
| number | Syslog server number |
| target_ip | Syslog server IP address |
| l4_port | Port number used by the syslog server |
[View]
CGNAT Syslog view
[Use Cases]
sonic(config-cgnat-syslog)# server 1 target-ip 10.10.10.1 protocol udp port 514