Routing with two different gateways
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have the following problem. I cant ping 8.8.4.4
ping -I ens192 8.8.4.4
PING 8.8.4.4 (8.8.4.4) from 192.168.4.44 ens192: 56(84) bytes of data.
^C
--- 8.8.4.4 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1023ms
ping -I ens192:1 8.8.4.4
ping: invalid source address ens192:1
My network consist of 1 Network interface and on second virtual on top of it. And two gateways for it. Both gateways need to be configuerd.
I checked befor and the google server is reachable with the normal gateway line in Debian. From both Gateways.
So how do i get it to work ?
My interface config file
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens192
allow-hotplug ens192
iface ens192 inet static
address 192.168.4.44
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192 src 192.168.4.44 table rt1
post-up ip route add default via 192.168.4.1 dev ens192 table rt1
post-up ip rule add from 192.168.4.44/32 table rt1
post-up ip rule add to 192.168.4.44/32 table rt1
auto ens192:1
allow-hotplug ens192:1
iface ens192:1 inet static
address 192.168.4.201
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192:1 src 192.168.4.201 table rt2
post-up ip route add default via 192.168.4.3 dev ens192 table rt2
post-up ip rule add from 192.168.4.201/32 table rt2
post-up ip rule add to 192.168.4.201/32 table rt2
networking gateway
New contributor
add a comment |
up vote
0
down vote
favorite
I have the following problem. I cant ping 8.8.4.4
ping -I ens192 8.8.4.4
PING 8.8.4.4 (8.8.4.4) from 192.168.4.44 ens192: 56(84) bytes of data.
^C
--- 8.8.4.4 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1023ms
ping -I ens192:1 8.8.4.4
ping: invalid source address ens192:1
My network consist of 1 Network interface and on second virtual on top of it. And two gateways for it. Both gateways need to be configuerd.
I checked befor and the google server is reachable with the normal gateway line in Debian. From both Gateways.
So how do i get it to work ?
My interface config file
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens192
allow-hotplug ens192
iface ens192 inet static
address 192.168.4.44
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192 src 192.168.4.44 table rt1
post-up ip route add default via 192.168.4.1 dev ens192 table rt1
post-up ip rule add from 192.168.4.44/32 table rt1
post-up ip rule add to 192.168.4.44/32 table rt1
auto ens192:1
allow-hotplug ens192:1
iface ens192:1 inet static
address 192.168.4.201
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192:1 src 192.168.4.201 table rt2
post-up ip route add default via 192.168.4.3 dev ens192 table rt2
post-up ip rule add from 192.168.4.201/32 table rt2
post-up ip rule add to 192.168.4.201/32 table rt2
networking gateway
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have the following problem. I cant ping 8.8.4.4
ping -I ens192 8.8.4.4
PING 8.8.4.4 (8.8.4.4) from 192.168.4.44 ens192: 56(84) bytes of data.
^C
--- 8.8.4.4 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1023ms
ping -I ens192:1 8.8.4.4
ping: invalid source address ens192:1
My network consist of 1 Network interface and on second virtual on top of it. And two gateways for it. Both gateways need to be configuerd.
I checked befor and the google server is reachable with the normal gateway line in Debian. From both Gateways.
So how do i get it to work ?
My interface config file
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens192
allow-hotplug ens192
iface ens192 inet static
address 192.168.4.44
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192 src 192.168.4.44 table rt1
post-up ip route add default via 192.168.4.1 dev ens192 table rt1
post-up ip rule add from 192.168.4.44/32 table rt1
post-up ip rule add to 192.168.4.44/32 table rt1
auto ens192:1
allow-hotplug ens192:1
iface ens192:1 inet static
address 192.168.4.201
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192:1 src 192.168.4.201 table rt2
post-up ip route add default via 192.168.4.3 dev ens192 table rt2
post-up ip rule add from 192.168.4.201/32 table rt2
post-up ip rule add to 192.168.4.201/32 table rt2
networking gateway
New contributor
I have the following problem. I cant ping 8.8.4.4
ping -I ens192 8.8.4.4
PING 8.8.4.4 (8.8.4.4) from 192.168.4.44 ens192: 56(84) bytes of data.
^C
--- 8.8.4.4 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1023ms
ping -I ens192:1 8.8.4.4
ping: invalid source address ens192:1
My network consist of 1 Network interface and on second virtual on top of it. And two gateways for it. Both gateways need to be configuerd.
I checked befor and the google server is reachable with the normal gateway line in Debian. From both Gateways.
So how do i get it to work ?
My interface config file
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens192
allow-hotplug ens192
iface ens192 inet static
address 192.168.4.44
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192 src 192.168.4.44 table rt1
post-up ip route add default via 192.168.4.1 dev ens192 table rt1
post-up ip rule add from 192.168.4.44/32 table rt1
post-up ip rule add to 192.168.4.44/32 table rt1
auto ens192:1
allow-hotplug ens192:1
iface ens192:1 inet static
address 192.168.4.201
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192:1 src 192.168.4.201 table rt2
post-up ip route add default via 192.168.4.3 dev ens192 table rt2
post-up ip rule add from 192.168.4.201/32 table rt2
post-up ip rule add to 192.168.4.201/32 table rt2
networking gateway
networking gateway
New contributor
New contributor
edited 46 mins ago
Rui F Ribeiro
38k1475123
38k1475123
New contributor
asked 2 hours ago
Freaky
1
1
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
A couple of things:
- Pass the IP address of the interface on
-I
. I.e.-I 192.168.4.201
- The default route on the second interface says
dev ens192
instead ofdev ens192:1
- I guess that you either can't ping 192.168.4.1 and 192.168.4.3 or there is some additional configuration that's not shown here.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
A couple of things:
- Pass the IP address of the interface on
-I
. I.e.-I 192.168.4.201
- The default route on the second interface says
dev ens192
instead ofdev ens192:1
- I guess that you either can't ping 192.168.4.1 and 192.168.4.3 or there is some additional configuration that's not shown here.
add a comment |
up vote
0
down vote
A couple of things:
- Pass the IP address of the interface on
-I
. I.e.-I 192.168.4.201
- The default route on the second interface says
dev ens192
instead ofdev ens192:1
- I guess that you either can't ping 192.168.4.1 and 192.168.4.3 or there is some additional configuration that's not shown here.
add a comment |
up vote
0
down vote
up vote
0
down vote
A couple of things:
- Pass the IP address of the interface on
-I
. I.e.-I 192.168.4.201
- The default route on the second interface says
dev ens192
instead ofdev ens192:1
- I guess that you either can't ping 192.168.4.1 and 192.168.4.3 or there is some additional configuration that's not shown here.
A couple of things:
- Pass the IP address of the interface on
-I
. I.e.-I 192.168.4.201
- The default route on the second interface says
dev ens192
instead ofdev ens192:1
- I guess that you either can't ping 192.168.4.1 and 192.168.4.3 or there is some additional configuration that's not shown here.
answered 1 hour ago
V13
2,593613
2,593613
add a comment |
add a comment |
Freaky is a new contributor. Be nice, and check out our Code of Conduct.
Freaky is a new contributor. Be nice, and check out our Code of Conduct.
Freaky is a new contributor. Be nice, and check out our Code of Conduct.
Freaky 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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481021%2frouting-with-two-different-gateways%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