Ubuntu routing between two interfaces has very low speed
up vote
-1
down vote
favorite
I'm routing traffic from enp5s4f0 (private) to enp7s4f0 (internet)
this is my interfaces file:
internet interface
auto enp7s4f0
iface enp7s4f0 inet static
address 10.192.129.164
netmask 255.255.255.224
gateway 10.192.129.161
private subnet
auto enp5s4f0
iface enp5s4f0 inet static
address 172.1.1.1
netmask 255.255.255.0
those are the commands which I'm using for iptables:
iptables -t nat -A POSTROUTING -o enp7s4f0 -j MASQUERADE
iptables -A FORWARD -i enp7s4f0 -o enp5s4f0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp5s4f0 -o enp7s4f0 -j ACCEPT
I have enabled ip_forwarding successfully and the Nat is successful but it is has very low speed on the servers in private Subnet. Note that the speed is normal at the routing server. Can anyone tell me why the speed is low at this private subnet server please?
This is the speed on the Nat Server:
root@r2s1:~# speedtest
Testing download speed.................................. Download: 89.27 Mbit/s
Testing upload speed............................ Upload: 28.46 Mbit/s
This is the speed on the server behind the Nat:
root@ubuntu:~#
speedtest
Testing download speed........................................ Download: 20.84 Mbit/s
Testing upload speed.................................................. Upload: 1.74 Mbit/s
networking iptables interface nat traffic
New contributor
|
show 1 more comment
up vote
-1
down vote
favorite
I'm routing traffic from enp5s4f0 (private) to enp7s4f0 (internet)
this is my interfaces file:
internet interface
auto enp7s4f0
iface enp7s4f0 inet static
address 10.192.129.164
netmask 255.255.255.224
gateway 10.192.129.161
private subnet
auto enp5s4f0
iface enp5s4f0 inet static
address 172.1.1.1
netmask 255.255.255.0
those are the commands which I'm using for iptables:
iptables -t nat -A POSTROUTING -o enp7s4f0 -j MASQUERADE
iptables -A FORWARD -i enp7s4f0 -o enp5s4f0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp5s4f0 -o enp7s4f0 -j ACCEPT
I have enabled ip_forwarding successfully and the Nat is successful but it is has very low speed on the servers in private Subnet. Note that the speed is normal at the routing server. Can anyone tell me why the speed is low at this private subnet server please?
This is the speed on the Nat Server:
root@r2s1:~# speedtest
Testing download speed.................................. Download: 89.27 Mbit/s
Testing upload speed............................ Upload: 28.46 Mbit/s
This is the speed on the server behind the Nat:
root@ubuntu:~#
speedtest
Testing download speed........................................ Download: 20.84 Mbit/s
Testing upload speed.................................................. Upload: 1.74 Mbit/s
networking iptables interface nat traffic
New contributor
I don't know if it will make a difference, but because you have static IP addresses you can use SNAT instead of MASQUERADE:iptables -t nat -A POSTROUTING -o enp7s4f0 -j SNAT --to 10.192.129.164
. Give us some actual values for "very low speed".
– Doug Smythies
Nov 13 at 15:29
1
@DKBose I deleted the duplicated post.
– taym sami
Nov 14 at 12:39
@DougSmythies Thank you for your kind help. I tried your suggestion but the problem is not solved. this is the speed on the Nat Server: root@r2s1:~# speedtest Testing download speed.................................. Download: 89.27 Mbit/s Testing upload speed............................ Upload: 28.46 Mbit/s - This is the speed on the server behind the Nat: root@ubuntu:~# speedtest Testing download speed........................................ Download: 20.84 Mbit/s Testing upload speed.................................................. Upload: 1.74 Mbit/s
– taym sami
Nov 14 at 12:40
I don't have a way to test with my system, because I am very upload limited due to my adsl modem.
– Doug Smythies
Nov 14 at 16:24
@DougSmythies I think the problem will appear for you even if you have a low speed.
– taym sami
Nov 15 at 8:32
|
show 1 more comment
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I'm routing traffic from enp5s4f0 (private) to enp7s4f0 (internet)
this is my interfaces file:
internet interface
auto enp7s4f0
iface enp7s4f0 inet static
address 10.192.129.164
netmask 255.255.255.224
gateway 10.192.129.161
private subnet
auto enp5s4f0
iface enp5s4f0 inet static
address 172.1.1.1
netmask 255.255.255.0
those are the commands which I'm using for iptables:
iptables -t nat -A POSTROUTING -o enp7s4f0 -j MASQUERADE
iptables -A FORWARD -i enp7s4f0 -o enp5s4f0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp5s4f0 -o enp7s4f0 -j ACCEPT
I have enabled ip_forwarding successfully and the Nat is successful but it is has very low speed on the servers in private Subnet. Note that the speed is normal at the routing server. Can anyone tell me why the speed is low at this private subnet server please?
This is the speed on the Nat Server:
root@r2s1:~# speedtest
Testing download speed.................................. Download: 89.27 Mbit/s
Testing upload speed............................ Upload: 28.46 Mbit/s
This is the speed on the server behind the Nat:
root@ubuntu:~#
speedtest
Testing download speed........................................ Download: 20.84 Mbit/s
Testing upload speed.................................................. Upload: 1.74 Mbit/s
networking iptables interface nat traffic
New contributor
I'm routing traffic from enp5s4f0 (private) to enp7s4f0 (internet)
this is my interfaces file:
internet interface
auto enp7s4f0
iface enp7s4f0 inet static
address 10.192.129.164
netmask 255.255.255.224
gateway 10.192.129.161
private subnet
auto enp5s4f0
iface enp5s4f0 inet static
address 172.1.1.1
netmask 255.255.255.0
those are the commands which I'm using for iptables:
iptables -t nat -A POSTROUTING -o enp7s4f0 -j MASQUERADE
iptables -A FORWARD -i enp7s4f0 -o enp5s4f0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp5s4f0 -o enp7s4f0 -j ACCEPT
I have enabled ip_forwarding successfully and the Nat is successful but it is has very low speed on the servers in private Subnet. Note that the speed is normal at the routing server. Can anyone tell me why the speed is low at this private subnet server please?
This is the speed on the Nat Server:
root@r2s1:~# speedtest
Testing download speed.................................. Download: 89.27 Mbit/s
Testing upload speed............................ Upload: 28.46 Mbit/s
This is the speed on the server behind the Nat:
root@ubuntu:~#
speedtest
Testing download speed........................................ Download: 20.84 Mbit/s
Testing upload speed.................................................. Upload: 1.74 Mbit/s
networking iptables interface nat traffic
networking iptables interface nat traffic
New contributor
New contributor
edited Nov 14 at 15:58
Doug Smythies
6,93131428
6,93131428
New contributor
asked Nov 13 at 12:04
taym sami
11
11
New contributor
New contributor
I don't know if it will make a difference, but because you have static IP addresses you can use SNAT instead of MASQUERADE:iptables -t nat -A POSTROUTING -o enp7s4f0 -j SNAT --to 10.192.129.164
. Give us some actual values for "very low speed".
– Doug Smythies
Nov 13 at 15:29
1
@DKBose I deleted the duplicated post.
– taym sami
Nov 14 at 12:39
@DougSmythies Thank you for your kind help. I tried your suggestion but the problem is not solved. this is the speed on the Nat Server: root@r2s1:~# speedtest Testing download speed.................................. Download: 89.27 Mbit/s Testing upload speed............................ Upload: 28.46 Mbit/s - This is the speed on the server behind the Nat: root@ubuntu:~# speedtest Testing download speed........................................ Download: 20.84 Mbit/s Testing upload speed.................................................. Upload: 1.74 Mbit/s
– taym sami
Nov 14 at 12:40
I don't have a way to test with my system, because I am very upload limited due to my adsl modem.
– Doug Smythies
Nov 14 at 16:24
@DougSmythies I think the problem will appear for you even if you have a low speed.
– taym sami
Nov 15 at 8:32
|
show 1 more comment
I don't know if it will make a difference, but because you have static IP addresses you can use SNAT instead of MASQUERADE:iptables -t nat -A POSTROUTING -o enp7s4f0 -j SNAT --to 10.192.129.164
. Give us some actual values for "very low speed".
– Doug Smythies
Nov 13 at 15:29
1
@DKBose I deleted the duplicated post.
– taym sami
Nov 14 at 12:39
@DougSmythies Thank you for your kind help. I tried your suggestion but the problem is not solved. this is the speed on the Nat Server: root@r2s1:~# speedtest Testing download speed.................................. Download: 89.27 Mbit/s Testing upload speed............................ Upload: 28.46 Mbit/s - This is the speed on the server behind the Nat: root@ubuntu:~# speedtest Testing download speed........................................ Download: 20.84 Mbit/s Testing upload speed.................................................. Upload: 1.74 Mbit/s
– taym sami
Nov 14 at 12:40
I don't have a way to test with my system, because I am very upload limited due to my adsl modem.
– Doug Smythies
Nov 14 at 16:24
@DougSmythies I think the problem will appear for you even if you have a low speed.
– taym sami
Nov 15 at 8:32
I don't know if it will make a difference, but because you have static IP addresses you can use SNAT instead of MASQUERADE:
iptables -t nat -A POSTROUTING -o enp7s4f0 -j SNAT --to 10.192.129.164
. Give us some actual values for "very low speed".– Doug Smythies
Nov 13 at 15:29
I don't know if it will make a difference, but because you have static IP addresses you can use SNAT instead of MASQUERADE:
iptables -t nat -A POSTROUTING -o enp7s4f0 -j SNAT --to 10.192.129.164
. Give us some actual values for "very low speed".– Doug Smythies
Nov 13 at 15:29
1
1
@DKBose I deleted the duplicated post.
– taym sami
Nov 14 at 12:39
@DKBose I deleted the duplicated post.
– taym sami
Nov 14 at 12:39
@DougSmythies Thank you for your kind help. I tried your suggestion but the problem is not solved. this is the speed on the Nat Server: root@r2s1:~# speedtest Testing download speed.................................. Download: 89.27 Mbit/s Testing upload speed............................ Upload: 28.46 Mbit/s - This is the speed on the server behind the Nat: root@ubuntu:~# speedtest Testing download speed........................................ Download: 20.84 Mbit/s Testing upload speed.................................................. Upload: 1.74 Mbit/s
– taym sami
Nov 14 at 12:40
@DougSmythies Thank you for your kind help. I tried your suggestion but the problem is not solved. this is the speed on the Nat Server: root@r2s1:~# speedtest Testing download speed.................................. Download: 89.27 Mbit/s Testing upload speed............................ Upload: 28.46 Mbit/s - This is the speed on the server behind the Nat: root@ubuntu:~# speedtest Testing download speed........................................ Download: 20.84 Mbit/s Testing upload speed.................................................. Upload: 1.74 Mbit/s
– taym sami
Nov 14 at 12:40
I don't have a way to test with my system, because I am very upload limited due to my adsl modem.
– Doug Smythies
Nov 14 at 16:24
I don't have a way to test with my system, because I am very upload limited due to my adsl modem.
– Doug Smythies
Nov 14 at 16:24
@DougSmythies I think the problem will appear for you even if you have a low speed.
– taym sami
Nov 15 at 8:32
@DougSmythies I think the problem will appear for you even if you have a low speed.
– taym sami
Nov 15 at 8:32
|
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
taym sami is a new contributor. Be nice, and check out our Code of Conduct.
taym sami is a new contributor. Be nice, and check out our Code of Conduct.
taym sami is a new contributor. Be nice, and check out our Code of Conduct.
taym sami is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1092537%2fubuntu-routing-between-two-interfaces-has-very-low-speed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't know if it will make a difference, but because you have static IP addresses you can use SNAT instead of MASQUERADE:
iptables -t nat -A POSTROUTING -o enp7s4f0 -j SNAT --to 10.192.129.164
. Give us some actual values for "very low speed".– Doug Smythies
Nov 13 at 15:29
1
@DKBose I deleted the duplicated post.
– taym sami
Nov 14 at 12:39
@DougSmythies Thank you for your kind help. I tried your suggestion but the problem is not solved. this is the speed on the Nat Server: root@r2s1:~# speedtest Testing download speed.................................. Download: 89.27 Mbit/s Testing upload speed............................ Upload: 28.46 Mbit/s - This is the speed on the server behind the Nat: root@ubuntu:~# speedtest Testing download speed........................................ Download: 20.84 Mbit/s Testing upload speed.................................................. Upload: 1.74 Mbit/s
– taym sami
Nov 14 at 12:40
I don't have a way to test with my system, because I am very upload limited due to my adsl modem.
– Doug Smythies
Nov 14 at 16:24
@DougSmythies I think the problem will appear for you even if you have a low speed.
– taym sami
Nov 15 at 8:32