From patchwork Thu Sep 21 09:25:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amine Kherbouche X-Patchwork-Id: 816777 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=6wind-com.20150623.gappssmtp.com header.i=@6wind-com.20150623.gappssmtp.com header.b="EB66jqdq"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xyWSW6YlWz9t43 for ; Thu, 21 Sep 2017 19:26:03 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbdIUJ0A (ORCPT ); Thu, 21 Sep 2017 05:26:00 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:49903 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751528AbdIUJZ7 (ORCPT ); Thu, 21 Sep 2017 05:25:59 -0400 Received: by mail-wm0-f46.google.com with SMTP id e71so13714181wmg.4 for ; Thu, 21 Sep 2017 02:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=jctcM+swe+S4qO4NUYhWnEavH77TxI3crex+ygf7xgU=; b=EB66jqdqnB5DG96hmp5mfKCG0CNtEqFxnD03phUAKLiBtn/mrkJB6U5+rSff/dTIUX vwOCGWwAkeal08nOYSyDGdRv1Ox+bGXZmo49BT3eyLELYEMsSxYr64h89J2nDN2IpQLr HIw9RcpSxQ2psSKVZce/Gwk6C8xY8z3sTcuQ7Y73USB9RipvyzHQKHPZjboekEUUz37g wSBDxL9KxZ5aeCB9wGsaxMrDU0Ux114ObGato/30+LwflT68iPNMFa2UbHR8J7vn3TG8 OPghDw3sx6+lSmeibxwiz54RryC9QD4DmdytQPPtJGWy9OH/19WXQgvdf71h7pKw9VER mBAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jctcM+swe+S4qO4NUYhWnEavH77TxI3crex+ygf7xgU=; b=swq/NIxV9p81yZSzqMKBD3rhKaUy+QGwvibXDAGlJRjEr2zBVL4MCVZ0r2/6kysBlI s77f2KDm/KW7N1yXxjko6HqXxmN2MRfvSWeYeB3sGSMDg5POKf/gBoo0ukTX/TO3GdXw wJnYDAk8DSpf+vuJDLEKNTMRxQiPLs2FRbFyXeaKRfH0ghSCe4AzhjqImzVGxaO+6kgm ZqpggeAgfIN71+k9b3hlblSNSRUlyfgSDBG+mhI9jtj5YM83i4JXDC887g6HPxum+QaG eMKjkTueWW6xBqkgaKc9U/NjjF/ljQQDiYP8vvltZ0q1i4AJT9JeBmQ401gLjyl6Wfyi 060g== X-Gm-Message-State: AHPjjUhUrzaFK5yDxO4y8J020F93p9poKObywbvuPBd2BJIg2Y4Pmgk1 4/mURffVDRvE2wGVRmei6sCHqTKM X-Google-Smtp-Source: AOwi7QBdA1aMtQCDpmGFFh1+9txwC4kj7VTE+d+c1TEz/4bMZK98Nc54sMUC3KTFYuLGex1Omc4ATQ== X-Received: by 10.28.229.129 with SMTP id c123mr352301wmh.153.1505985957188; Thu, 21 Sep 2017 02:25:57 -0700 (PDT) Received: from griffon.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t15sm748591wrb.41.2017.09.21.02.25.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 02:25:55 -0700 (PDT) From: Amine Kherbouche To: netdev@vger.kernel.org, xeb@mail.ru, roopa@cumulusnetworks.com Cc: amine.kherbouche@6wind.com, equinox@diac24.net Subject: [RFC PATCH 0/0] Introduce MPLS over GRE Date: Thu, 21 Sep 2017 11:25:22 +0200 Message-Id: <1505985924-12479-1-git-send-email-amine.kherbouche@6wind.com> X-Mailer: git-send-email 2.1.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series introduces the MPLS over GRE encapsulation (RFC 4023). Various applications of MPLS make use of label stacks with multiple entries. In some cases, it is possible to replace the top label of the stack with an IP-based encapsulation, thereby, it is possible for two LSRs that are adjacent on an LSP to be separated by an IP network, even if that IP network does not provide MPLS. An example of configuration: node1 LER1 LER2 node2 +-----+ +------+ +------+ +-----+ | | | | | | | | | | | |p3 GRE tunnel p4| | | | | |p1 p2| +-------------------+ |p5 p6| | | +-------------+ +-------------------+ +------------+| | | |10.100.0.0/24| | | |10.200.0.0/24| | | |fd00:100::/64| | 10.125.0.0/24 | |fd00:200::/64| | | | | | fd00:125::/64 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-----+ +------+ +------+ +-----+ ### node1 ### ip link set p1 up ip addr add 10.100.0.1/24 dev p1 ### LER1 ### ip link set p2 up ip addr add 10.100.0.2/24 dev p2 ip link set p3 up ip addr add 10.125.0.1/24 dev p3 modprobe mpls_router sysctl -w net.mpls.conf.p2.input=1 sysctl -w net.mpls.conf.p3.input=1 sysctl -w net.mpls.platform_labels=1000 ip link add gre1 type gre ttl 64 local 10.125.0.1 remote 10.125.0.2 dev p3 ip link set dev gre1 up ip -M route add 111 as 222 dev gre1 ip -M route add 555 as 666 via inet 10.100.0.1 dev p2 ### LER2 ### ip link set p5 up ip addr add 10.200.0.2/24 dev p5 ip link set p4 up ip addr add 10.125.0.2/24 dev p4 modprobe mpls_router sysctl -w net.mpls.conf.p4.input=1 sysctl -w net.mpls.conf.p5.input=1 sysctl -w net.mpls.platform_labels=1000 ip link add gre1 type gre ttl 64 local 10.125.0.2 remote 10.125.0.1 dev p4 ip link set dev gre1 up ip -M route add 444 as 555 dev gre1 ip -M route add 222 as 333 via inet 10.200.0.1 dev p5 ### node2 ### ip link set p6 up ip addr add 10.200.0.1/24 dev p6 Now using this scapy to forge and send packets from the port p1 of node1: p = Ether(src='de:ed:01:0c:41:09', dst='de:ed:01:2f:3b:ba') p /= MPLS(s=1, ttl=64, label=111)/Raw(load='\xde') sendp(p, iface="p1", count=20, inter=0.1)