From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=intel.com (client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=johnathanx.mantey@intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=intel.com Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49mbdz107mzDqTm for ; Wed, 17 Jun 2020 04:03:01 +1000 (AEST) IronPort-SDR: zq6HkjLzBqThqC7Ssj/YlT/52wB7vg1XRrbA/8T3QTTEtl+w3jWJ7ZWvdiBvEONE7EfmRD+R9H Q+Dvo0WfVn+Q== X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2020 11:02:46 -0700 IronPort-SDR: J8a9+4/GzPybN9QDUQo4oOVqL1GgpoDeCr+1VBLT65UMbEotaXMegiqaj6UTNAKqvq0mb0TbPS GdA+oAJap0PQ== X-IronPort-AV: E=Sophos;i="5.73,519,1583222400"; d="asc'?scan'208,217";a="308538176" Received: from jmanteyx-desk.jf.intel.com ([10.54.51.75]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2020 11:02:46 -0700 Subject: Re: Default Gateway for a system v/s Default gateway per Interface To: Ratan Gupta , wak@google.com, openbmc@lists.ozlabs.org References: From: Johnathan Mantey Autocrypt: addr=johnathanx.mantey@intel.com; prefer-encrypt=mutual; keydata= mQENBFija08BCAC60TO2X22b0tJ2Gy2iQLWx20mGcD7ugBpm1o2IW2M+um3GR0BG/bUcLciw dEnX9SWT30jx8Timeny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TMqkeGUheUhDiYLQ7xwARAQABiQEfBBgBCAAJBQJYo2tPAhsMAAoJ ENBH74k93x8JKEUH/3UPZryjmM0F3h8I0ZWuruxAxiqvksLOOtarU6RikIAHhwjvluEcTH4E JsDjqtRUvBMU907XNotpqpW2e9jN8tFRyR4wW9CYkilB02qgrDm9DXVGb2BDtC/MY+6KUgsG k5Ftr9uaXNd0K4IGRJSyU6ZZn0inTcXlqD+NgOE2eX9qpeKEhDufgF7fKHbKDkS4hj6Z09dT Y8eW9d6d2Yf/RzTBJvZxjBFbIgeUGeykbSKztp2OBe6mecpVPhKooTq+X/mJehpRA6mAhuQZ 28lvie7hbRFjqR3JB7inAKL4eT1/9bT/MqcPh43PXTAzB6/Iclg5B7GGgEFe27VL0hyqiqc= Message-ID: Date: Tue, 16 Jun 2020 11:02:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TzNJjuupMUOKkDmtZfVGB48eNjBy2us7p" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 18:03:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TzNJjuupMUOKkDmtZfVGB48eNjBy2us7p Content-Type: multipart/mixed; boundary="VXLyAMHT6l3qCf9QW6K4yuIdZaqxpAWZY" --VXLyAMHT6l3qCf9QW6K4yuIdZaqxpAWZY Content-Type: multipart/alternative; boundary="------------BB9BC590C46BB3A01FE77719" Content-Language: en-US This is a multi-part message in MIME format. --------------BB9BC590C46BB3A01FE77719 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ratan, In the email trail for this topic on 27 April you indicated you were going to start work on the per NIC gateway. What is the current state of implementing this feature? On 4/24/20 8:06 AM, Ratan Gupta wrote: > Hi All, > > Currently, OpenBMC stack allows a single default gateway for the > system. Latest kernel allows to configure multiple default gateways. > > Eg: In a system with two interfaces eth0 and eth1, > > eth0 configured with static address and having gateway(192.168.2.1) > eth1 configured with DHCP and gets Gateway from DHCP server (10.10.10.1= ) > ~~~~~~~~~~~~~ > Kernel IP routing table > Destination=C2=A0=C2=A0=C2=A0=C2=A0 Gateway=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 Genmask=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Flags=C2=A0=C2=A0 MSS Window=C2=A0 > irtt Iface > 0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 19.168.2.1=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 UG=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > 0 eth0 > 0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 10.10.10.1=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 UG=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > 0 eth1 > ~~~~~~~~~~~~~~ > > Kernel will first try using the default gateway having higher metric > value and then fall back to the lower. > > More references: > https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/= 7/html/networking_guide/sec-configuring_the_default_gateway > > I'm proposing to make this change in the openBMC D-bus interfaces to > tie the gateway property with the Ethernet interface schema instead of > System configuration. > > Ethernet Interface Schema =3D> > > https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/ope= nbmc_project/Network/EthernetInterface.interface.yaml > > > System Configuration Schema =3D> > > https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/ope= nbmc_project/Network/SystemConfiguration.interface.yaml > > > > Please let me know your suggestions. > > Regards > Ratan Gupta > --=20 Johnathan Mantey Senior Software Engineer *azad te**chnology partners* Contributing to Technology Innovation since 1992 Phone: (503) 712-6764 Email: johnathanx.mantey@intel.com --------------BB9BC590C46BB3A01FE77719 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ratan,

In the email trail for this topic on 27 April you indicated you were going to start work on the per NIC gateway.
What is the current state of implementing this feature?

On 4/24/20 8:06 AM, Ratan Gupta wrote:=
Hi All,

Currently, OpenBMC stack allows a single default gateway for the system. Latest kernel allows to configure multiple default gateways.

Eg: In a system with two interfaces eth0 and eth1,

eth0 configured with static address and having gateway(192.168.2.1)
eth1 configured with DHCP and gets Gateway from DHCP server (10.10.10.1)
~~~~~~~~~~~~~
Kernel IP routing table
Destination=C2=A0=C2=A0=C2=A0=C2=A0 Gateway=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 Genmask=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 Flags=C2=A0=C2=A0 MSS Window=C2=A0 irtt Iface
0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 19.168.2.1=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 UG=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 eth0
0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 10.10.10.1=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0.0.0.0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 UG=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 eth1
~~~~~~~~~~~~~~

Kernel will first try using the default gateway having higher metric value and then fall back to the lower.

More references: https://access.redhat.com/documentation/en-u= s/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_the_de= fault_gateway

I'm proposing to make this change in the openBMC D-bus interfaces to tie the gateway property with the Ethernet interface schema instead of System configuration.

Ethernet Interface Schema =3D>

https://github.com/openbmc/phosphor-dbus-interface= s/blob/master/xyz/openbmc_project/Network/EthernetInterface.interface.yam= l

System Configuration Schema =3D>

https://github.com/openbmc/phosphor-dbus-interfa= ces/blob/master/xyz/openbmc_project/Network/SystemConfiguration.interface= =2Eyaml


Please let me know your suggestions.

Regards
Ratan Gupta


--
Johnathan Man= tey
Senior Software Engineer
azad technology partners
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: johnathanx.mantey@intel.com


--------------BB9BC590C46BB3A01FE77719-- --VXLyAMHT6l3qCf9QW6K4yuIdZaqxpAWZY-- --TzNJjuupMUOKkDmtZfVGB48eNjBy2us7p Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEVa822oZtYaVqAzq50EfviT3fHwkFAl7pCUEACgkQ0EfviT3f HwlzBwgAlkyblmAb5Co+SHa3DWc2Xa2FFx45f1ipQqCq0PaXKD5ONHb/clZbMxky 9sFp4UY8tt8BtHqHK78JgvdSK8oVBrWNyU2w2dSHqTtGXqCaeA7q5InQ8oB3d2+E GL28D26mY+1+vhHibLsJ+moW0RY/ap1CzPQpgcZqmdG6zXuLndlHlbSfFfqZRL2q pGCGGUMaL5IfW+gSbTeugWqCQh6nSQxDiwzn2LauGCnCgolkpYHw+3ckJMhU7tzb lPxeuINj6CRe9UWFTqrt+VsCmLx3xVwWbhBgXFBUZTn9+h+Uj+9ULhUPmTPH6XGI V/QWYm2qjJ+A4QQKDRhl9HXEhn0H8Q== =DuwQ -----END PGP SIGNATURE----- --TzNJjuupMUOKkDmtZfVGB48eNjBy2us7p--