I'm setting Wake-On-Lan of my CentOS server so that it can be wake up through Internet. I set a static ip address on my server, preserve the ip address on the router and create a static ARP entry of the ip and MAC address of my server.
The problem is, if no active request from my server to outer net, after a few minutes, I will not be able to reach my server in the local network through SSH, ping, etc. And the server can be reached right after I delete the static ARP entry on the router.
If I keep 'ping' some website on my server(say, google.com), the server can always be reached whether I bind the static ARP entry or not. I delete the static ARP entry on the router, and I can find my server's ip and MAC on the router's active ARP client page if my server is 'ping' some website. If I let my server stay idle and don't do anything, after a few minutes, my server's entry will disappear from the router's active ARP client page. In the meantime, I can still reach my server if I don't active the ARP binding entry on the router.
Where am I doing wrong? I checked the ARP binding entry a thousand times and I'm pretty sure I didn't fill the wrong ip address and MAC address.
I'm using CentOS 7, the network setup file are as follows:
TYPE=Ethernet BOOTPROTO=static # ====== static ip setup ======= IPADDR=192.168.10.100 NETMASK=255.255.255.0 GATEWAY=192.168.10.1 DNS1=192.168.10.1 NM_CONTROLLED=no # ============================== DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=enp0 UUID=869753b9-240b-445b-5412-98d88dff542a DEVICE=enp0 ONBOOT=yes
ethtool enp1s0 shows the following:
[root@192 network-scripts]# ethtool enp1s0 Settings for enp1s0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Link partner advertised pause frame use: Symmetric Receive-only Link partner advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 0 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000033 (51) drv probe ifdown ifup Link detected: yes