New answers tagged

0

sudo ip route del 122.252.228.38/32 # or any valid selector sudo ip addr flush dev DEVICE # then flush the cache and the route will be gone


0

ping 8.8.8.8 There are two ways for an IP address to be "externally managed": This gets an IP address through DHCP, and the same DHCP package also contains the default route, which must be set automatically. Or, it is a point-to-point connection, which when made via ppp etc. It will also give you an IP from another endpoint, which you can then use for the ...


3

Some modem cards are doing Proxy ARP. That means you can tell the default route is through the card without gateway and your system will start issuing an ARP request for any IP (eg ARP for 8.8.8.8 following a ping 8.8.8.8), since the card looks like ethernet, as if the whole Internet was on the LAN. If the card is doing proxy ARP, this will work. Example ...


1

try IP=$(ip a s dev eth0 | awk '$1=="inet" { split($2,I,"/") ;print I[1] }') ip route add default via $IP dev eth0 you might replace eth0 with a variable. I fail to se the point if eth0 (or whatever modem interface) is DHCP managed, most likely proper routing will be provided.


Top 50 recent answers are included