choose a getaway

Issues related to configuring your network
Post Reply
mickey0
Posts: 60
Joined: 2015/06/16 22:44:38

choose a getaway

Post by mickey0 » 2021/02/05 16:33:58

Hello,

in the house where I am I have a router and a BThhome hub. I always connected to the first one, through wireless and getting an IP (through dhcp). The second one, for some reason, didn't have the signal. But I had the great idea of resetting it and now it works (I get the signal). And I tried it putting the key.

So now my PC always connect to this Bthome and to surfing it asks me to login online. And this seems ok. The thing is that I don't want to use it for surfing on the internet. So I tried to change the route table (because by default the system now connects to BTHome):

Code: Select all

sudo ip route del default via 192.168.1.254       <----------(Bthomeipaddress)
sudo ip route add default via 192.168.1.1         <-----------(my router)
sudo sytemctl restart network
And actually the table change but I can't surf.

This is the table right now that I can surf:

Code: Select all

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlp2s0
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp2s0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
(when I am connected to BThome I can see that the getaway is 192.168.1.254)

Of course I also tried 'sudo systemctl restart NetworkManager' and actually the connected fall and I have to re-connect to internet but I connect to BThome.

So, if you ask yourself how I can now to connect to the router, the reply is simple: I reset the BThome and in that gap of time the system can connect easily to 192.168.1.1

Any help, please? At least I am learning something about routing table.

Kind regards.

mickey0
Posts: 60
Joined: 2015/06/16 22:44:38

Re: choose a getaway

Post by mickey0 » 2021/02/07 15:16:30

Hello,

I sorted it out putting 192.168.1.1 in the file /etc/networks and comment 0.0.0.0; but why there was 0.0.0.0? What is its purpose?

Code: Select all

#default 0.0.0.0
default 192.168.1.1
loopback 127.0.0.0
link-local 169.254.0.0
Kind regards.

User avatar
jlehtone
Posts: 3335
Joined: 2007/12/11 08:17:33
Location: Finland

Re: choose a getaway

Post by jlehtone » 2021/02/07 15:35:41

AFAIK, CentOS does not use /etc/networks. The network config is elsewhere, in different syntax.

mickey0
Posts: 60
Joined: 2015/06/16 22:44:38

Re: choose a getaway

Post by mickey0 » 2021/02/08 15:52:33

Apparently CentOS uses the config files in /etc/sysconfig/network-scripts/
but I can't find any config file related to my router either BTHomeHub.

Anyway I definitely solved it. Maybe some script uses /etc/networks

Any explanation perhaps?

Post Reply

Return to “CentOS 7 - Networking Support”