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

Can mahimahi run on an intermediate forwarding server? #156

Open
Yecccccc opened this issue Sep 8, 2022 · 1 comment
Open

Can mahimahi run on an intermediate forwarding server? #156

Yecccccc opened this issue Sep 8, 2022 · 1 comment

Comments

@Yecccccc
Copy link

Yecccccc commented Sep 8, 2022

Hi, as shown in the image below, we want to deploy mahimahi on an intermediate server, making it a bottleneck. Can mahimahi run on an intermediate server? In other words, can mahimahi be deployed in such a server to forward traffic? thank you very much!
QQ图片20220908101508

@Nayald
Copy link

Nayald commented Nov 29, 2022

Hi, I did something like this for some of my experiements. The way I did is to make a mm-link acts as a router. To achieve this, I write a script that move one of my physical interface inside the mm-link (namespace) with ip commands.

Here what I did from inside the mm-link, I previously define a root namespace with id 0 and a NAT rule with iptables:

ip netns exec root ip link set ens1 netns $$
ip link set ens1 up
ip addr add 192.168.1.100/32 dev ens1
ip route add 192.168.1.73/32 dev ens1
dev_name=$(ip netns exec root ip link | grep -oP "link-\d+")
ip netns exec root ip route add 192.168.1.73/32 dev $dev_name

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

2 participants