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

[VPP-2206] SNAT and VRF-----HELP!!! #3593

Open
LadySky opened this issue Feb 13, 2025 · 1 comment
Open

[VPP-2206] SNAT and VRF-----HELP!!! #3593

LadySky opened this issue Feb 13, 2025 · 1 comment

Comments

@LadySky
Copy link

LadySky commented Feb 13, 2025

Question:

My idea is to have different destinations use different NAT address pools. However, the traffic is not passing through as expected. My goal is to have traffic from 55.55.55.2 to 66.66.66.2 go through VRF 1, and traffic from 55.55.55.2 to 77.77.77.2 go through VRF 2. Does anyone know where I might have made a mistake in the configuration, or could this be a bug?

this is conf:

nat44 forwarding enable
create sub-interface GigabitEthernet2/6/0 1
create sub-interface GigabitEthernet2/6/0 2

ip table add 1
ip route add 66.66.66.0/24 table 1 via 66.66.66.2
set interface ip table GigabitEthernet2/6/0.1 1

ip table add 2
ip route add 77.77.77.0/24 table 2 via 77.77.77.2
set interface ip table GigabitEthernet2/6/0.2 2

set interface state GigabitEthernet2/5/0 up
set interface ip address GigabitEthernet2/5/0 55.55.55.1/24
set interface state GigabitEthernet2/6/0 up
set interface state GigabitEthernet2/6/0.1 up
set interface ip address GigabitEthernet2/6/0.1 66.66.66.1/24

set interface state GigabitEthernet2/6/0.2 up
set interface ip address GigabitEthernet2/6/0.2 77.77.77.1/24

set interface promiscuous on GigabitEthernet2/5/0
set interface promiscuous on GigabitEthernet2/6/0

// Configure SNAT usage:
set interface nat44 in GigabitEthernet2/5/0
set interface nat44 out GigabitEthernet2/6/0

set interface nat44 out GigabitEthernet2/6/0.1
set interface nat44 out GigabitEthernet2/6/0.2
set interface nat44 in GigabitEthernet2/5/0 out GigabitEthernet2/6/0.1
set interface nat44 in GigabitEthernet2/5/0 out GigabitEthernet2/6/0.2

nat44 add address 66.66.66.3-66.66.66.6 tenant-vrf 1
nat44 add address 77.77.77.4-77.77.77.7 tenant-vrf 2

Below is a simplified diagram of the network topology:
PC1-55.55.55.2 <-----> 55.55.55.1-vpp-(66.66.66.1 and 77.77.77.1) <-----> PC2-66.66.66.2
<-----> PC3-77.77.77.2

@LadySky LadySky changed the title SNAT and VRF-----HELP!!! SNAT and VRF-----HELP!!! vpp-v2206 Feb 13, 2025
@LadySky
Copy link
Author

LadySky commented Feb 13, 2025

Image

@LadySky LadySky changed the title SNAT and VRF-----HELP!!! vpp-v2206 [VPP-2206] SNAT and VRF-----HELP!!! Feb 14, 2025
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

No branches or pull requests

1 participant