Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipvs: add nat-mode support in single-core dpvs #277

Merged
merged 6 commits into from
Sep 20, 2018
Merged

ipvs: add nat-mode support in single-core dpvs #277

merged 6 commits into from
Sep 20, 2018

Conversation

andrewhit
Copy link

@andrewhit andrewhit commented Sep 13, 2018

o In full-nat mode, the link address is added via local_address_group{}
and laddr_group_name configured under virtual_server {}.
o However within non-full-nat mode, like NAT-mode, we fail to configure
the link address via static_address{} because dpdk_port is set to NULL
within start_vrrp().

o In full-nat mode, the link address is added via local_address_group{}
  and laddr_group_name configured under virtual_server {}.
o However within non-full-nat mode, like NAT-mode, we fail to configure
  the link address via static_address{} because dpdk_port is set to NULL
  within start_vrrp().
@andrewhit
Copy link
Author

Here is the test result.

static_ipaddress {
   10.10.127.66/26 dev eth3
}

local_address_group laddr_g1 {
    10.10.127.68 eth3  # use DPDK interface
}

root@n10-023-013:/var/log# dpip addr show
inet 10.10.127.68/32 scope global eth3
     valid_lft forever preferred_lft forever sa_used 0 sa_free 4294950896 sa_miss 0
inet 10.10.127.66/26 scope global eth3
     valid_lft forever preferred_lft forever

zhuangyan added 2 commits September 17, 2018 15:35
o In nat-mode, the received ARP entry is targeted to some IP address configured
  on dpdk interface, we need to find the route of the targeted IP
  address. However since the route is not of RTF_LOCALIN type, we fails to
  update the related created ARP entry previously created via the sent ARP request.

So the solutiuon is to allow updating the ARP entry if the route is of RTF_KNI
type.
@andrewhit andrewhit changed the title keepalived: support adding link address via static_ipaddress{}. ipvs: add nat-mode support Sep 18, 2018
@andrewhit andrewhit changed the title ipvs: add nat-mode support ipvs: add nat-mode support in decentralized packet dispatch Sep 18, 2018
@andrewhit andrewhit changed the title ipvs: add nat-mode support in decentralized packet dispatch ipvs: add nat-mode support in single-core dpvs Sep 18, 2018
strcpy(param->ifname, dpdk_port);
} else {
strcpy(param->ifname, ipaddress->ifp->ifname);
}
param->plen = ipaddress->ifa.ifa_prefixlen;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your pr. And can you add some configuration example in tutorial.md?

Copy link
Author

@andrewhit andrewhit Sep 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Please check commit 6f57d1d

zhuangyan added 3 commits September 19, 2018 14:19
o In nat-mode, there is no need to configure local_address_group{}, but to
  configure static_ipaddress{} for the link addresses of dpvs.
o In nat-mode, there is no need to configure local_address_group{}, but to
  configure static_ipaddress{} for the link addresses of dpvs.
@ywc689 ywc689 merged commit e263519 into iqiyi:master Sep 20, 2018
ytwang0320 pushed a commit to ytwang0320/dpvs that referenced this pull request Dec 22, 2020
ipvs: add nat-mode support in single-core dpvs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants