Understanding and modification of system routing table

Insert picture description here
There is a routing table today.

The number of hops has been changed before, so that it is convenient to use the internal and external networks at the same time. Then today I will write about what kind of routing the program takes.

Article 1: All routing table information will be cleared when restarting-except for the ones you specify.
When the network card goes offline, the corresponding routing information will be deleted.
When the network card is online, the corresponding routing information will be updated.

For example:
you connect to wifi "family love each other" with network card 1, and the system will write this:

0.0.0.0 0.0.0.0 192.168.0.0 192.168.1.3 60
The gateway is 192.168.0.0, and the number of hops represents the priority.

TIP: This is why deleting the routing information will fail after restarting, because the routing information will be refreshed as long as it is restarted.
Insert picture description hereWhen the network cards with the same rules are determined, the priority is determined by the hop number (I set the same hop number specifically).
I have seen the default hops of 10 40 75.

If you want any device to be the priority Internet device, write down the metric.
If you want the devices to be online at the same time, you must modify the hop count to be consistent.



I think: the
number of hops = DDL. The lower the number of hops, the fewer the number of gateways the network passes through, and the better the network connectivity is.

Second, the IP address of this machine is 127.0.0.1. Insert picture description hereWhen using the Class A network, who is the IP address of 127.
The same, there is this: 224
this is also a hard-coded program, one for each network card.

224.0.0.0 224.0.0.0 IANA organization base address (reserved)

Article 3:
When you connect to other networks, there will be a specific gateway.
For example: This sentence means: When connecting to the multicast address 172.16.255.255, go to the gateway of 172.16.194.2.
Insert picture description here
If there is duplicate information, choose the network address with the lowest metric.

Then there is the network card.
The MAC address of the network card is in this window.
Insert picture description hereAmong them, I have the IP addresses of several virtual machines. That is, the VMware network card is generated by itself. I am too lazy to delete.

Insert picture description here
The two network cards I used, the wireless network card of this machine is the Insert picture description here
external network card is Insert picture description hereBluetooth Internet access and a MAC address.
Insert picture description here

Permanent routing
Insert picture description here
is written (who would normally write the routing table).

If the route is displayed, just write a route and it will be introduced.
Insert picture description hereTell me, you write so detailed, you don’t need Baidu, and the Chinese is really sweet.

The only important one:
Anyway, it is not -p, and it will be gone after restarting (equivalent to a cache)

The router will also maintain a routing table (with a few megabytes of memory, maintaining a routing table is really difficult for you)

When entering a class A network, the address of class C or lower will be deleted-unless the VPN is connected, a class A address is set for him.

There is also: the same number of hops, simultaneous delivery.

Guess you like

Origin blog.csdn.net/weixin_45642669/article/details/114306552