OpenFastPath / ofp

OpenFastPath project
BSD 3-Clause "New" or "Revised" License
349 stars 126 forks source link

How to ifconfig more than one IP on the same port #193

Open lvsgate opened 6 years ago

lvsgate commented 6 years ago

It seems that ofp only support one ip on a port.

iufl commented 6 years ago

Yes, it supports only one IP.

If you need an workaround to have multiple IPs on a single port, you can create a local route with network mask /32 and OFP_RTF_LOCAL flag: ofp_set_route_params(OFP_ROUTE_ADD, 0 /vrf/, vlan, port, destaddr, 32, 0, OFP_RTF_LOCAL);

sovu commented 6 years ago

TSC meeting 18.06: Sorin proposes removing ip address(ip_addr and masklen) from ifnet structure and to accommodate multiple ip address for an interface with list of pointers to Route table(/32 entries)

remove: https://github.com/OpenFastPath/ofp/blob/master/include/ofpi_portconf.h#L152 Instead add a list with pointers to Rule or NextHop