Defauft gateway permanent change in centos 7
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
i have 2 nic attached to my VM(centos 7) 1st is NAT, and 2nd is Host only adapter.
the hostonly adapter has become the default gateway, and is restricting my internet access, i want to make my NAT (1st enp0s3) to become the default gateway.
i have tried this, but still upon reboot the host only becomes the default gateway.
# route del default gw 192.168.43.1
# route add default gw 10.0.2.2 metric 100
# route add default gw 192.168.43.1 metric 101
current scenario.
[root@node1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.43.1 0.0.0.0 UG 100 0 0 enp0s8
0.0.0.0 10.0.2.2 0.0.0.0 UG 101 0 0 enp0s3
10.0.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
192.168.43.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s8
linux centos
add a comment |Â
up vote
1
down vote
favorite
i have 2 nic attached to my VM(centos 7) 1st is NAT, and 2nd is Host only adapter.
the hostonly adapter has become the default gateway, and is restricting my internet access, i want to make my NAT (1st enp0s3) to become the default gateway.
i have tried this, but still upon reboot the host only becomes the default gateway.
# route del default gw 192.168.43.1
# route add default gw 10.0.2.2 metric 100
# route add default gw 192.168.43.1 metric 101
current scenario.
[root@node1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.43.1 0.0.0.0 UG 100 0 0 enp0s8
0.0.0.0 10.0.2.2 0.0.0.0 UG 101 0 0 enp0s3
10.0.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
192.168.43.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s8
linux centos
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
i have 2 nic attached to my VM(centos 7) 1st is NAT, and 2nd is Host only adapter.
the hostonly adapter has become the default gateway, and is restricting my internet access, i want to make my NAT (1st enp0s3) to become the default gateway.
i have tried this, but still upon reboot the host only becomes the default gateway.
# route del default gw 192.168.43.1
# route add default gw 10.0.2.2 metric 100
# route add default gw 192.168.43.1 metric 101
current scenario.
[root@node1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.43.1 0.0.0.0 UG 100 0 0 enp0s8
0.0.0.0 10.0.2.2 0.0.0.0 UG 101 0 0 enp0s3
10.0.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
192.168.43.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s8
linux centos
i have 2 nic attached to my VM(centos 7) 1st is NAT, and 2nd is Host only adapter.
the hostonly adapter has become the default gateway, and is restricting my internet access, i want to make my NAT (1st enp0s3) to become the default gateway.
i have tried this, but still upon reboot the host only becomes the default gateway.
# route del default gw 192.168.43.1
# route add default gw 10.0.2.2 metric 100
# route add default gw 192.168.43.1 metric 101
current scenario.
[root@node1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.43.1 0.0.0.0 UG 100 0 0 enp0s8
0.0.0.0 10.0.2.2 0.0.0.0 UG 101 0 0 enp0s3
10.0.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
192.168.43.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s8
linux centos
asked Dec 25 '17 at 9:56
Mohd
146114
146114
add a comment |Â
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%2f412924%2fdefauft-gateway-permanent-change-in-centos-7%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