<div dir="ltr">Hi, Jiaqing<div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">We have noticed an issue while using Static IPv4 addresses on both eth0 and eth1.<br>
We have configured a static private IP with the matching subnet of Laptop Connected on eth0 and<span class="gmail-Apple-converted-space">  </span>configured a static public IP on eth1.<br>Both routes have got the metric value 0. eth0 route is the first entry of the routing table which was being used for routing.<br>
</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br></p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">Ping to eth1 IP <9.x.x.84> does not work and that Eth0 private IP pings from the laptop connected.<br>
<br><b>
IP<span class="gmail-Apple-converted-space">  </span>Config:</b><br>
</p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">    </span>link/ether 08:94:ef:82:4c:76 brd ff:ff:ff:ff:ff:ff</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">    </span>inet <a href="http://169.254.7.123/16">169.254.7.123/16</a> brd 169.254.255.255 scope link eth0</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">       </span>valid_lft forever preferred_lft forever</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">    </span>inet 10.x.x.100/24 brd 10.6.6.255 scope global eth0.<span class="gmail-Apple-converted-space">          </span>—> Private IP (Connected to laptop)</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">       </span>valid_lft forever preferred_lft forever</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">    </span>inet6 fe80::a94:efff:fe82:4c76/64 scope link</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">       </span>valid_lft forever preferred_lft forever</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">    </span>link/ether 08:94:ef:82:4c:77 brd ff:ff:ff:ff:ff:ff</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">    </span>inet 9.x.x.84/24 brd 9.x.x.255 scope global eth1. <span class="gmail-Apple-converted-space">              </span>—> Public IP<span class="gmail-Apple-converted-space"> </span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">       </span>valid_lft forever preferred_lft forever</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">    </span>inet6 fe80::a94:efff:fe82:4c77/64 scope link</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><span class="gmail-Apple-converted-space">       </span>valid_lft forever preferred_lft forever</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br>
<br><b>
Routing table:</b><br>
<br>
Kernel IP routing table</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">Destination <span class="gmail-Apple-converted-space">    </span>Gateway <span class="gmail-Apple-converted-space">        </span>Genmask <span class="gmail-Apple-converted-space">        </span>Flags <span class="gmail-Apple-converted-space">  </span>MSS <span class="gmail-Apple-converted-space">  </span>Window<span class="gmail-Apple-converted-space">  </span>irtt<span class="gmail-Apple-converted-space">  </span>Iface</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">0.0.0.0<span class="gmail-Apple-converted-space">                </span>10.x.x.1 <span class="gmail-Apple-converted-space">            </span>0.0.0.0 <span class="gmail-Apple-converted-space">          </span>UG <span class="gmail-Apple-converted-space">        </span>0 <span class="gmail-Apple-converted-space">      </span>0 <span class="gmail-Apple-converted-space">          </span>0 <span class="gmail-Apple-converted-space">  </span>eth0</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">0.0.0.0 <span class="gmail-Apple-converted-space">                </span>9.x.x.1<span class="gmail-Apple-converted-space">              </span>0.0.0.0 <span class="gmail-Apple-converted-space">          </span>UG<span class="gmail-Apple-converted-space">        </span>0<span class="gmail-Apple-converted-space">        </span>0 <span class="gmail-Apple-converted-space">          </span>0 <span class="gmail-Apple-converted-space">  </span>eth1<span class="gmail-Apple-converted-space">  </span><<==== not pingable.<span class="gmail-Apple-converted-space"> </span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">9.x.x.0 <span class="gmail-Apple-converted-space">                </span>0.0.0.0 <span class="gmail-Apple-converted-space">        </span>255.255.255.0 <span class="gmail-Apple-converted-space">  </span>U<span class="gmail-Apple-converted-space">          </span>0<span class="gmail-Apple-converted-space">        </span>0 <span class="gmail-Apple-converted-space">          </span>0 <span class="gmail-Apple-converted-space">  </span>eth1</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">10.x.x.0 <span class="gmail-Apple-converted-space">              </span>0.0.0.0 <span class="gmail-Apple-converted-space">        </span>255.255.255.0 <span class="gmail-Apple-converted-space">  </span>U<span class="gmail-Apple-converted-space">          </span>0 <span class="gmail-Apple-converted-space">        </span>0<span class="gmail-Apple-converted-space">          </span>0 <span class="gmail-Apple-converted-space">  </span>eth0</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">169.254.0.0<span class="gmail-Apple-converted-space">        </span>0.0.0.0 <span class="gmail-Apple-converted-space">        </span>255.255.0.0<span class="gmail-Apple-converted-space">        </span>U<span class="gmail-Apple-converted-space">          </span>0 <span class="gmail-Apple-converted-space">        </span>0<span class="gmail-Apple-converted-space">          </span>0 <span class="gmail-Apple-converted-space">  </span>eth0</p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br>
<br>
But with DHCP enabled on eth1, dhcp subnet with metric value 1024 was always at the bottom and was reachable<br>
as DHCP routes<span class="gmail-Apple-converted-space">  </span>get priority over static routes. </p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br></p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue""><br></p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">Regards,</p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:"Helvetica Neue"">Raviteja</p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 23, 2022 at 12:34 PM Jiaqing Zhao <<a href="mailto:jiaqing.zhao@linux.intel.com">jiaqing.zhao@linux.intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi, Raviteja<br>
<br>
Can you help explain the routing issue you met?<br>
<br>
I've also met a metric-related issue. When there are 2 interfaces, one use DHCP,<br>
the other use Static, systemd-networkd sets the metric 1024 on the DHCP-assigned<br>
default routev (metric for static default gateway is 0), which causing peers<br>
only reachable via the DHCP-assigned default route cannot be accessed.<br>
<br>
And in current OpenBMC implementation, I think we should allow setting null to<br>
Gateway of IPv4StaticAddress to not set default route on that interface.<br>
<br>
Thanks,<br>
Jiaqing<br>
<br>
On 2022-06-22 18:50, raviteja bailapudi wrote:<br>
> Hi Team<br>
> <br>
> We have hit network routing issues while using Static IPv4 addresses on<br>
> both eth0 and eth1,  as both default gateways at the interfaces were of the<br>
> same metric value. To solve this problem we are planning to provide an<br>
> interface for admins to set the metric value for the gateway while setting<br>
> up the Static IPv4 network on BMC.<br>
> <br>
> <br>
> To enable users to connect from outside-subnet clients, we also need to<br>
> support static routes on BMC.<br>
> <br>
> <br>
> I have started a thread in redfish forum as well<br>
> <br>
> <a href="https://redfishforum.com/thread/683/network-routing-table-management-support" rel="noreferrer" target="_blank">https://redfishforum.com/thread/683/network-routing-table-management-support</a><br>
> <br>
> <br>
> Please share your views on the same.<br>
> <br>
> <br>
> <br>
> Regards,<br>
> <br>
> Raviteja<br>
> <br>
</blockquote></div>