Route data between two interfaces
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I try to route packets between two interfaces of a virtual Ubuntu 16.04 machine hosted in OpenStack. Following what I found on Internet, here is what I did:
# Enable ip forwarding:
sysctl -w net.ipv4.ip_forward=1
echo 'net.ipv4.ip_forward = 1' >> net.ipv4.ip_forward = 1
sysctl -p /etc/sysctl.conf
# Update IP tables:
iptables -A FORWARD -i ens3 -o ens4 -j ACCEPT
iptables -A FORWARD -i ens4 -o ens3 -j ACCEPT
Now, here is my Linux router interfaces and routing table:
ens3: 192.168.217.6/24
ens4: 10.0.0.13/24
ip route
default via 10.0.0.1 dev ens4
10.0.0.0/26 dev ens4 proto kernel scope link src 10.0.0.13
169.254.169.254 via 10.0.0.1 dev ens4
192.168.217.0/24 dev ens3 proto kernel scope link src 192.168.217.6
I have a machine on LAN 10.0.0.0/24, and one on LAN 192.168.217.0/24. Both have my Linux router as their default gateway, but they can't ping each other. However, machine on LAN 10.0.0.0/24 has Internet access:
traceroute 1.1.1.1
10.0.0.1
...
1.1.1.1
ip route
default via 10.0.0.13 dev eth0
10.0.0.0/24 dev eth0 10.0.0.14
This is strange, as the traceoute do not use 10.0.0.13, which is the default gateway of my host.
What am I doing wrong ? Thank you.
routing
add a comment |Â
up vote
0
down vote
favorite
I try to route packets between two interfaces of a virtual Ubuntu 16.04 machine hosted in OpenStack. Following what I found on Internet, here is what I did:
# Enable ip forwarding:
sysctl -w net.ipv4.ip_forward=1
echo 'net.ipv4.ip_forward = 1' >> net.ipv4.ip_forward = 1
sysctl -p /etc/sysctl.conf
# Update IP tables:
iptables -A FORWARD -i ens3 -o ens4 -j ACCEPT
iptables -A FORWARD -i ens4 -o ens3 -j ACCEPT
Now, here is my Linux router interfaces and routing table:
ens3: 192.168.217.6/24
ens4: 10.0.0.13/24
ip route
default via 10.0.0.1 dev ens4
10.0.0.0/26 dev ens4 proto kernel scope link src 10.0.0.13
169.254.169.254 via 10.0.0.1 dev ens4
192.168.217.0/24 dev ens3 proto kernel scope link src 192.168.217.6
I have a machine on LAN 10.0.0.0/24, and one on LAN 192.168.217.0/24. Both have my Linux router as their default gateway, but they can't ping each other. However, machine on LAN 10.0.0.0/24 has Internet access:
traceroute 1.1.1.1
10.0.0.1
...
1.1.1.1
ip route
default via 10.0.0.13 dev eth0
10.0.0.0/24 dev eth0 10.0.0.14
This is strange, as the traceoute do not use 10.0.0.13, which is the default gateway of my host.
What am I doing wrong ? Thank you.
routing
Add theip route
output of the "machine on LAN 10.0.0.0/24" to the question.
â wurtel
Jun 22 at 10:05
@wurtel Updated.
â Nakrule
Jun 22 at 10:35
You have a few mistakes in the first part ("# Enable ip forwarding"), so please make sure you have this really set withsysctl -a|grep net.ipv4.ip_forward
â pawel7318
Jun 22 at 11:57
@pawel7318cat /proc/sys/net/ipv4/ip_forwarding
return 1.
â Nakrule
Jun 22 at 12:16
If on 10.0.0.14 you have 10.0.0.13 as default gateway, but 10.0.0.13 has 10.0.0.1 as default gateway, then 10.0.0.13 will send an ICMP REDIRECT back to 10.0.0.14 so that 10.0.0.13 doesn't have to waste time retransmitting a packet on the same network where it came from. That explains the traceroute not showing 10.0.0.13. However it doesn't explain why you can't ping between the networks.
â wurtel
Jun 22 at 13:05
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I try to route packets between two interfaces of a virtual Ubuntu 16.04 machine hosted in OpenStack. Following what I found on Internet, here is what I did:
# Enable ip forwarding:
sysctl -w net.ipv4.ip_forward=1
echo 'net.ipv4.ip_forward = 1' >> net.ipv4.ip_forward = 1
sysctl -p /etc/sysctl.conf
# Update IP tables:
iptables -A FORWARD -i ens3 -o ens4 -j ACCEPT
iptables -A FORWARD -i ens4 -o ens3 -j ACCEPT
Now, here is my Linux router interfaces and routing table:
ens3: 192.168.217.6/24
ens4: 10.0.0.13/24
ip route
default via 10.0.0.1 dev ens4
10.0.0.0/26 dev ens4 proto kernel scope link src 10.0.0.13
169.254.169.254 via 10.0.0.1 dev ens4
192.168.217.0/24 dev ens3 proto kernel scope link src 192.168.217.6
I have a machine on LAN 10.0.0.0/24, and one on LAN 192.168.217.0/24. Both have my Linux router as their default gateway, but they can't ping each other. However, machine on LAN 10.0.0.0/24 has Internet access:
traceroute 1.1.1.1
10.0.0.1
...
1.1.1.1
ip route
default via 10.0.0.13 dev eth0
10.0.0.0/24 dev eth0 10.0.0.14
This is strange, as the traceoute do not use 10.0.0.13, which is the default gateway of my host.
What am I doing wrong ? Thank you.
routing
I try to route packets between two interfaces of a virtual Ubuntu 16.04 machine hosted in OpenStack. Following what I found on Internet, here is what I did:
# Enable ip forwarding:
sysctl -w net.ipv4.ip_forward=1
echo 'net.ipv4.ip_forward = 1' >> net.ipv4.ip_forward = 1
sysctl -p /etc/sysctl.conf
# Update IP tables:
iptables -A FORWARD -i ens3 -o ens4 -j ACCEPT
iptables -A FORWARD -i ens4 -o ens3 -j ACCEPT
Now, here is my Linux router interfaces and routing table:
ens3: 192.168.217.6/24
ens4: 10.0.0.13/24
ip route
default via 10.0.0.1 dev ens4
10.0.0.0/26 dev ens4 proto kernel scope link src 10.0.0.13
169.254.169.254 via 10.0.0.1 dev ens4
192.168.217.0/24 dev ens3 proto kernel scope link src 192.168.217.6
I have a machine on LAN 10.0.0.0/24, and one on LAN 192.168.217.0/24. Both have my Linux router as their default gateway, but they can't ping each other. However, machine on LAN 10.0.0.0/24 has Internet access:
traceroute 1.1.1.1
10.0.0.1
...
1.1.1.1
ip route
default via 10.0.0.13 dev eth0
10.0.0.0/24 dev eth0 10.0.0.14
This is strange, as the traceoute do not use 10.0.0.13, which is the default gateway of my host.
What am I doing wrong ? Thank you.
routing
edited Jun 22 at 10:34
asked Jun 22 at 7:55
Nakrule
1465
1465
Add theip route
output of the "machine on LAN 10.0.0.0/24" to the question.
â wurtel
Jun 22 at 10:05
@wurtel Updated.
â Nakrule
Jun 22 at 10:35
You have a few mistakes in the first part ("# Enable ip forwarding"), so please make sure you have this really set withsysctl -a|grep net.ipv4.ip_forward
â pawel7318
Jun 22 at 11:57
@pawel7318cat /proc/sys/net/ipv4/ip_forwarding
return 1.
â Nakrule
Jun 22 at 12:16
If on 10.0.0.14 you have 10.0.0.13 as default gateway, but 10.0.0.13 has 10.0.0.1 as default gateway, then 10.0.0.13 will send an ICMP REDIRECT back to 10.0.0.14 so that 10.0.0.13 doesn't have to waste time retransmitting a packet on the same network where it came from. That explains the traceroute not showing 10.0.0.13. However it doesn't explain why you can't ping between the networks.
â wurtel
Jun 22 at 13:05
add a comment |Â
Add theip route
output of the "machine on LAN 10.0.0.0/24" to the question.
â wurtel
Jun 22 at 10:05
@wurtel Updated.
â Nakrule
Jun 22 at 10:35
You have a few mistakes in the first part ("# Enable ip forwarding"), so please make sure you have this really set withsysctl -a|grep net.ipv4.ip_forward
â pawel7318
Jun 22 at 11:57
@pawel7318cat /proc/sys/net/ipv4/ip_forwarding
return 1.
â Nakrule
Jun 22 at 12:16
If on 10.0.0.14 you have 10.0.0.13 as default gateway, but 10.0.0.13 has 10.0.0.1 as default gateway, then 10.0.0.13 will send an ICMP REDIRECT back to 10.0.0.14 so that 10.0.0.13 doesn't have to waste time retransmitting a packet on the same network where it came from. That explains the traceroute not showing 10.0.0.13. However it doesn't explain why you can't ping between the networks.
â wurtel
Jun 22 at 13:05
Add the
ip route
output of the "machine on LAN 10.0.0.0/24" to the question.â wurtel
Jun 22 at 10:05
Add the
ip route
output of the "machine on LAN 10.0.0.0/24" to the question.â wurtel
Jun 22 at 10:05
@wurtel Updated.
â Nakrule
Jun 22 at 10:35
@wurtel Updated.
â Nakrule
Jun 22 at 10:35
You have a few mistakes in the first part ("# Enable ip forwarding"), so please make sure you have this really set with
sysctl -a|grep net.ipv4.ip_forward
â pawel7318
Jun 22 at 11:57
You have a few mistakes in the first part ("# Enable ip forwarding"), so please make sure you have this really set with
sysctl -a|grep net.ipv4.ip_forward
â pawel7318
Jun 22 at 11:57
@pawel7318
cat /proc/sys/net/ipv4/ip_forwarding
return 1.â Nakrule
Jun 22 at 12:16
@pawel7318
cat /proc/sys/net/ipv4/ip_forwarding
return 1.â Nakrule
Jun 22 at 12:16
If on 10.0.0.14 you have 10.0.0.13 as default gateway, but 10.0.0.13 has 10.0.0.1 as default gateway, then 10.0.0.13 will send an ICMP REDIRECT back to 10.0.0.14 so that 10.0.0.13 doesn't have to waste time retransmitting a packet on the same network where it came from. That explains the traceroute not showing 10.0.0.13. However it doesn't explain why you can't ping between the networks.
â wurtel
Jun 22 at 13:05
If on 10.0.0.14 you have 10.0.0.13 as default gateway, but 10.0.0.13 has 10.0.0.1 as default gateway, then 10.0.0.13 will send an ICMP REDIRECT back to 10.0.0.14 so that 10.0.0.13 doesn't have to waste time retransmitting a packet on the same network where it came from. That explains the traceroute not showing 10.0.0.13. However it doesn't explain why you can't ping between the networks.
â wurtel
Jun 22 at 13:05
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451243%2froute-data-between-two-interfaces%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Add the
ip route
output of the "machine on LAN 10.0.0.0/24" to the question.â wurtel
Jun 22 at 10:05
@wurtel Updated.
â Nakrule
Jun 22 at 10:35
You have a few mistakes in the first part ("# Enable ip forwarding"), so please make sure you have this really set with
sysctl -a|grep net.ipv4.ip_forward
â pawel7318
Jun 22 at 11:57
@pawel7318
cat /proc/sys/net/ipv4/ip_forwarding
return 1.â Nakrule
Jun 22 at 12:16
If on 10.0.0.14 you have 10.0.0.13 as default gateway, but 10.0.0.13 has 10.0.0.1 as default gateway, then 10.0.0.13 will send an ICMP REDIRECT back to 10.0.0.14 so that 10.0.0.13 doesn't have to waste time retransmitting a packet on the same network where it came from. That explains the traceroute not showing 10.0.0.13. However it doesn't explain why you can't ping between the networks.
â wurtel
Jun 22 at 13:05