Skip to content
Ask AI

GRE Configuration

[Command] show gre [ gre_id ]

[Purpose] View the configuration of the GRE tunnel

[Parameter]

ParameterDescription
gre_idThe name of GER tunnel

[View] System view

[Use Cases]

sonic# show gre
gre 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

[Command] show counters tunnel [ name ]

[Purpose] View counters of the GRE tunnel

[Parameter]

ParameterDescription
nameThe 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

[Command] gre name gre_id [vrf vrf_name ] no gre name gre_id [vrf vrf_name ]

[Purpose] Create GRE tunnel

[Parameter]

ParameterDescription
gre_idGRE name ID, range 0 to 323
vrf_nameSpecify the VRF name

[View] System configuration view

[Use Cases]

sonic(config)# gre name 1

[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]

ParameterDescription
A.B.C.D/MIPv4 addrss
X:X::X:X*/M*IPv6 address
gre_idGRE ID

[View] System configuration view

[Use Cases]

sonic(config)# gre interface-ip 1.1.1.1/24 name 1

[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]

ParameterDescription
A.B.C.DDestination IPv4 address
X:X::X:XDestination IPv6 address
a.b.c.dSource IPv4 address
xx::xxSource IPv6 address
vrf_nameVRF name
gre_idGRE ID

[View] System configuration view

[Use Cases]

sonic(config)# gre dst-ip 30.1.1.2 40.1.1.2 name 1