GRE Configuration
GRE Configuration
Section titled “GRE Configuration”show gre
Section titled “show gre”[Command]
show gre [ gre_id ]
[Purpose]
View the configuration of the GRE tunnel
[Parameter]
Parameter | Description |
---|---|
gre_id | The name of GER tunnel |
[View]
System view
[Use Cases]
sonic# show gregre tunnel source ip src vnet destination ip dst vnet local ips---------- ----------- -------- -------------- ----------- ------------Brgre1 30.1.1.2 default 40.1.1.2 default 100.1.1.1/24
show counters tunnel
Section titled “show counters tunnel”[Command]
show counters tunnel [ name ]
[Purpose]
View counters of the GRE tunnel
[Parameter]
Parameter | Description |
---|---|
name | The name of GER tunnel |
[View]
System view
[Use Cases]
sonic# show counters tunnel IFACE RX_OK RX_BYTES RX_PPS TX_OK TX_BYTES TX_PPS------- ------- ------- -------- ------- -------- -------- Brgre1 474 N/A 1.00/s 239 N/A 0.00/s
gre name
Section titled “gre name”[Command]
gre name gre_id [vrf vrf_name ]
no gre name gre_id [vrf vrf_name ]
[Purpose]
Create GRE tunnel
[Parameter]
Parameter | Description |
---|---|
gre_id | GRE name ID, range 0 to 323 |
vrf_name | Specify the VRF name |
[View]
System configuration view
[Use Cases]
sonic(config)# gre name 1
gre interface-ip name
Section titled “gre interface-ip name”[Command]
gre interface-ip { A.B.C.D/M | X:X::X:X/M } name gre_id
no gre interface-ip { A.B.C.D/M | X:X::X:X/M } name gre_id
[Purpose]
Configuring IP addresses for GRE tunnels
[Parameter]
Parameter | Description |
---|---|
A.B.C.D/M | IPv4 addrss |
X:X::X:X/M | IPv6 address |
gre_id | GRE ID |
[View]
System configuration view
[Use Cases]
sonic(config)# gre interface-ip 1.1.1.1/24 name 1
gre dst-ip name
Section titled “gre dst-ip name”[Command]
gre dst-ip { A.B.C.D | X:X::X:X } { a.b.c.d | xx::xx } [vrf vrf_name ] name gre_id
[Purpose]
Configure the source and destination IP addresses of the tunnel
[Parameter]
Parameter | Description |
---|---|
A.B.C.D | Destination IPv4 address |
X:X::X:X | Destination IPv6 address |
a.b.c.d | Source IPv4 address |
xx::xx | Source IPv6 address |
vrf_name | VRF name |
gre_id | GRE ID |
[View]
System configuration view
[Use Cases]
sonic(config)# gre dst-ip 30.1.1.2 40.1.1.2 name 1