Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A weird thing is happening here.

I am using TPLINK WDR3600 as server, which is connected through Ethernet with a modem in bridge mode.

I use 2 PCs and a cell phone on my LAN.

Something is happening and the default gateway (192.168.1.1, which is TPLINK's address) is lost and then the connection is lost from one PC. Then, after a while (or maybe not), the connection from the other PC is lost, but I can still connect to the Internet through the cell phone!

I did:

route add default gw 192.168.1.1 wlan0

to the PC which had the problem. When I do that, the connection comes back immediately. And also the connection comes back to the other PC!

But after some time, the 192.168.1.1 is lost again! and, along with it, the connection.

The route -n (without the 192.168.1.1):

Kernel IP routing table
Destination    Gateway        Genmask          Flags  Metric  Ref    Use  Iface
192.168.1.0    0.0.0.0        255.255.255.0    U      9       0        0  wlan0
192.168.1.151  127.0.0.1      255.255.255.255  UGH    304     0        0  lo

route -n (after adding it):

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     0       0        0  wlan0
192.168.1.0    0.0.0.0        255.255.255.0    U      9       0        0  wlan0
192.168.1.151  127.0.0.1      255.255.255.255  UGH    304     0        0  lo

Also, adding the route gateway doesn't make it permanent as I saw. Maybe that is the problem and it is lost again during time? How can I do it permanently?

I am using Linux Sabayon.

My /etc/conf.d/net in desktop:

    ...
    ###### Connection Configuration ######
#----------------------------------
nis_domain_eth1="localdomain"
dns_domain_eth1="localdomain"
dhcp_eth1="nosendhost"

    dns_search_eth2="193.92...."
    auto_eth2="true"
    config_eth2="192.168.1.2/24"
    dns_servers_eth2="194.219...."
    routes_eth2="default via 194.168.1.1"
    enable_ipv6_eth2="false"
    ...
----------------------------------
mac_0....C="0......F"
dns_servers_0x...C="192.168...."
enable_ipv6_0x...C="true"
auto_0x4....="true"
config_0x...C="
dhcp
dhcp6
"
#----------------------------------
nis_domain_wlan0="localdomain"
dns_domain_wlan0="localdomain"
dhcp_wlan0="nosendhost"
#----------------------------------
nis_domain_eth0="localdomain"
dns_domain_eth0="localdomain"
dhcp_eth0="nosendhost"

Why does it have eth2 and not wlan0?

ifconfig -a:

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00....33  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 0.....5  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 469  bytes 61541 (60.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 469  bytes 61541 (60.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.151  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe....df  prefixlen 64  scopeid 0x20<link>
        ether 00....f  txqueuelen 1000  (Ethernet)
        RX packets 2054  bytes 742929 (725.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2759  bytes 524901 (512.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I just saw that in my laptop the /etc/conf.d/net file:

nis_domain_wlan0="localdomain"
dns_domain_wlan0="localdomain"
dhcp_wlan0="nosendhost"
#----------------------------------
nis_domain_eth0="localdomain"
dns_domain_eth0="localdomain"
dhcp_eth0="nosendhost"

contains only this info instead of the net file in my desktop.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Linux Sabayon is based on Linux Gentoo.

Also, adding the route gateway doesn't make it permanent as I saw.

Correct. To make permanent configuration, per the Gentoo networking manual:

In file /etc/conf.d/net

Create a row

routes_wlan0="default via 192.168.1.1"

Restart you network interface. Depending on your configuration it could be:

/etc/init.d/net.wlan0 restart

EDIT

Anyway, in this file which you found replace

routes_eth2="default via 194.168.1.1"

with

routes_wlan0="default via 192.168.1.1"

eth2 and wlan0 are names of your network interfaces. By saying routes_wlan0 you specifying that this configuration is for interface wlan0.

share|improve this answer
    
:I checked net file and it contains routes_eth2="default via 194.168.1.1" !I don't know what it is or what I should do now.Do I have to delete that?(I updated my post to see the net file).Thank you –  George Jan 8 '14 at 22:49
    
:Can I reset somehow this file?And do you thing that is my problem?That the gateway is lost after some time? –  George Jan 8 '14 at 22:50
    
@George, And do you thing that is my problem?, most likely - yes. Could you edit your question and include output of command ifconfig -a. This will help us to do correct thing. –  Nikolay Jan 8 '14 at 23:23
    
:I included ifconfig.Please tell me if I must replace all 'eth2' with 'wlan0' or if we can reset this file.Thanks! –  George Jan 9 '14 at 8:07
    
:I also uploaded all the 'net' file in my desktop and in my laptop.And they are a lot different! –  George Jan 9 '14 at 8:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.