#define BGP_EXT_COM_OSPF_RTYPE 0x0306 /* OSPF Route Type,Format Area(4B):RouteType(1B):Options(1B) */
#define BGP_EXT_COM_OSPF_RTYPE2 0x8000 /* duplicate - keep for backwards compatibility */
+#define BGP_EXT_COM_ENCAP 0x030c /* rfc5512 */
#define BGP_EXT_COM_OSPF_RID 0x0107 /* OSPF Router ID,Format RouterID(4B):Unused(2B) */
#define BGP_EXT_COM_OSPF_RID2 0x8001 /* duplicate - keep for backwards compatibility */
{ BGP_EXT_COM_VPN_ORIGIN4, "ospf-domain"},
{ BGP_EXT_COM_OSPF_RTYPE, "ospf-route-type"},
{ BGP_EXT_COM_OSPF_RTYPE2, "ospf-route-type"},
+ { BGP_EXT_COM_ENCAP, "encapsulation"},
{ BGP_EXT_COM_OSPF_RID, "ospf-router-id"},
{ BGP_EXT_COM_OSPF_RID2, "ospf-router-id"},
{ BGP_EXT_COM_L2INFO, "layer2-info"},
{ 0, NULL},
};
+/* RFC RFC5512 BGP Tunnel Encapsulation Attribute Tunnel Types */
+#define BGP_ENCAP_TUNNEL_L2TPV3_IP 1
+#define BGP_ENCAP_TUNNEL_GRE 2
+#define BGP_ENCAP_TUNNEL_TRANSMIT 3
+#define BGP_ENCAP_TUNNEL_IPSEC 4
+#define BGP_ENCAP_TUNNEL_IP_IPSEC 5
+#define BGP_ENCAP_TUNNEL_MPLS_IP 6
+#define BGP_ENCAP_TUNNEL_IP_IP 7
+#define BGP_ENCAP_TUNNEL_VXLAN 8
+#define BGP_ENCAP_TUNNEL_NVGRE 9
+#define BGP_ENCAP_TUNNEL_MPLS 10
+#define BGP_ENCAP_TUNNEL_MPLS_GRE 11
+#define BGP_ENCAP_TUNNEL_VXLAN_GPE 12
+#define BGP_ENCAP_TUNNEL_MPLS_UDP 13
+#define BGP_ENCAP_TUNNEL_IPV6 14
+#define BGP_ENCAP_TUNNEL_SR_TE 15
+#define BGP_ENCAP_TUNNEL_BARE 16
+#define BGP_ENCAP_TUNNEL_SR 17
+
+static const struct tok bgp_extd_comm_encap_tunnel_values[] = {
+ { BGP_ENCAP_TUNNEL_L2TPV3_IP, "L2TPv3 over IP"},
+ { BGP_ENCAP_TUNNEL_GRE, "GRE"},
+ { BGP_ENCAP_TUNNEL_TRANSMIT, "Transmit Tunnel"},
+ { BGP_ENCAP_TUNNEL_IPSEC, "IPsec"},
+ { BGP_ENCAP_TUNNEL_IP_IPSEC, "IP in IP with IPsec"},
+ { BGP_ENCAP_TUNNEL_MPLS_IP, "MPLS in IP with IPsec"},
+ { BGP_ENCAP_TUNNEL_IP_IP, "IP in IP"},
+ { BGP_ENCAP_TUNNEL_VXLAN, "VXLAN"},
+ { BGP_ENCAP_TUNNEL_NVGRE, "NVGRE"},
+ { BGP_ENCAP_TUNNEL_MPLS, "MPLS"},
+ { BGP_ENCAP_TUNNEL_MPLS_GRE, "MPLS in GRE"},
+ { BGP_ENCAP_TUNNEL_VXLAN_GPE, "VXLAN GPE"},
+ { BGP_ENCAP_TUNNEL_MPLS_UDP, "MPLS in UDP"},
+ { BGP_ENCAP_TUNNEL_IPV6, "IPv6"},
+ { BGP_ENCAP_TUNNEL_SR_TE, "SR TE"},
+ { BGP_ENCAP_TUNNEL_BARE, "Bare"},
+ { BGP_ENCAP_TUNNEL_SR, "SR"},
+ { 0, NULL},
+};
+
/* OSPF codes for BGP_EXT_COM_OSPF_RTYPE draft-rosen-vpns-ospf-bgp-mpls */
#define BGP_OSPF_RTYPE_RTR 1 /* OSPF Router LSA */
#define BGP_OSPF_RTYPE_NET 2 /* OSPF Network LSA */
ND_PRINT("AS %u", GET_BE_U_2(pptr + 2));
break;
+ case BGP_EXT_COM_ENCAP:
+ ND_PRINT("Tunnel type: %s", tok2str(bgp_extd_comm_encap_tunnel_values,
+ "unknown encaps",
+ GET_BE_U_2(pptr + 6)));
+ break;
+
default:
ND_PRINT("%02x%02x%02x%02x%02x%02x",
GET_U_1(pptr + 2),
--- /dev/null
+ 1 12:59:23.482812 IP (tos 0xc0, ttl 255, id 48945, offset 0, flags [none], proto TCP (6), length 156)
+ 10.0.14.4.179 > 10.0.14.1.63656: Flags [P.], cksum 0xa26f (correct), seq 123918763:123918867, ack 3762271638, win 16384, options [nop,nop,TS val 2163155192 ecr 2226825164], length 104: BGP
+ Update Message (2), length: 104
+ Origin (1), length: 1, Flags [T]: IGP
+ AS Path (2), length: 0, Flags [T]: empty
+ Local Preference (5), length: 4, Flags [T]: 100
+ Extended Community (16), length: 16, Flags [OT]:
+ target (0x0002), Flags [none]: 65000:101 (= 0.0.0.101)
+ encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
+ Multi-Protocol Reach NLRI (14), length: 44, Flags [OE]:
+ AFI: VPLS (25), SAFI: EVPN (70)
+ no AFI 25 / SAFI 70 decoder
+ 0x0000: 0019 4604 0404 0404 0002 2100 0104 0404
+ 0x0010: 0400 0400 0000 0000 0000 0000 0000 0000
+ 0x0020: 0030 0206 0a0e faf3 0000 0065