Tag Archives: ping

Solve the problem of from 192.168.1.10: ICMP when the virtual machine can ping the gateway_ The problem of SEQ = 1 redirect network (New NextHop: 192.168.1.1)

Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>

The way to solve the problem is as follows

1. Check the router

2. To check the server, first Ping the next router (intended to test the connection problem with the router), the results are as follows:

From 192.168.1.10: icmp_ seq=1 Redirect Network(New nexthop: 192.168.1.1)

From 192.168.1.10: icmp_ seq=2 Redirect Network(New nexthop: 192.168.1.1)

From 192.168.1.10: icmp_ seq=3 Redirect Network(New nexthop: 192.168.1.1)

At that time, the first reaction was that there would not be any ARP virus on 192.168.1.10, but the next machine was hard to find, so we had to remove the network from this machine, but there was still a problem

3. The problem of ARP is located

Modifying kernel parameters

net.ipv4.conf.eth0.accept_ redirects=0

net.ipv4.conf.all.accept_ redirects=0

net.ipv4.conf.default.accept_ redirects=0

After modification, run the following command to make the parameter effective
/SBIN/sysctl – P

Confirm that these values are all 0, and continue to check ARP – A

It’s as slow as an ox, but I found a problem

(192.168.1.1) at 5c:dd:70:46:5c:3e [ether] PERM on eth0

The original one is perm, which obviously does the binding of IP and MAC, and it’s 192.168.1.1 (Gateway). This MAC address seems to be the same as the original router’s MAC address, but we changed the new router’s MAC address. The problem is that it’s different

one

two

three

four

[ root@tss ~]

#ls/etc/ethers

/etc/ethers

[ root@t ***

v

~]

#cat/etc/ethers

192.168.1.15C:DD:70:46:5C:3E

So that’s the problem

4. Dealing with problems

Collect the MAC of the current router

vim /etc/ethers

192.168.1.1 new Mac

arp -f

arp -a

ping 192.168.1.1

Under Linux, Ping: SendTo: network is unreachable appears

A super detailed tutorial: springboot integrates mybatis plus>>>

Problem: Ping external network appears:

     sendto: Network is unreachable

View:

    #route

Route command: you can use the route command to view the routing table when the packet is not delivered effectively

[root@tiny4412:/]#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

Found that there is no gateway configured due to the gateway

Solution:

   

[root@tiny4412:/]#route add default gw 192.168.1.1
[root@tiny4412:/]#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

Test:

[root@tiny4412:/]#ping 119.75.217.56
PING 119.75.217.56 (119.75.217.56): 56 data bytes
64 bytes from 119.75.217.56: seq=0 ttl=50 time=20.468 ms
64 bytes from 119.75.217.56: seq=1 ttl=50 time=19.113 ms
64 bytes from 119.75.217.56: seq=2 ttl=50 time=18.814 ms
64 bytes from 119.75.217.56: seq=3 ttl=50 time=18.906 ms
64 bytes from 119.75.217.56: seq=4 ttl=50 time=18.859 ms
64 bytes from 119.75.217.56: seq=5 ttl=50 time=18.704 ms
64 bytes from 119.75.217.56: seq=6 ttl=50 time=19.050 ms
64 bytes from 119.75.217.56: seq=7 ttl=50 time=20.514 ms
64 bytes from 119.75.217.56: seq=8 ttl=50 time=21.355 ms
^C
--- 119.75.217.56 ping statistics ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 18.704/19.531/21.355 ms