Switch,Router - route table ,arp table , net table

There are different tables in it on switches and routers,

Layer 2 switches have

aston hit

mactable, arptable, QoSpriority queue table, port statusstate table

MACThe table is the mapping relationship between the switch and the address portof the end network card connected to the network cablepcmac

Generally, mactable , and ports and macbindings are adopted. Other times, they are not recorded by default.
asdasd

The arptable of the switch is used to record the address table of different devices vlanunder the switch ipand address table macof the devices ipconnectedmac

AASDA

Among them vlan2, the macaddress is the default address of the switch, and all switches use this address at the vlanbeginning
but can be changed
ah really plan

QoSQuality of service priority table

The priority can be set MIME, if not set, the default priority will be used
asdasd

port statusThe status table is the status of each port, not introduced

Note:

Each portis essentially a network card

The switch is a layer 2 device, and porteach of must be connected to a device, and each portis not configured ip, only the physical connection of the device is recorded.mac

However, some current switches will have vlana configuration. vlan( Virtual LAN ) is a virtual configuration that simulates
Layer 3. On the basis of Layer 2, multiple subnets are divided again, and each vlancan be configured with IPan address.

If ipthere is mac, it can be used as a complete network device

All functions of the switch are for better realization of 收束functions , and to macachieve mutual search through

This is why the main table of the switch is the mactable , and this is why the switch can be used without configuration (the default record macaddress).
The additional arptable essentially just for convenience vlan.

arpThe table is the easiest way to quickly address in the same subnet, and it is also the most basic table for the conversion between Layer 2 and Layer 3.
Generally , the arptables of all hosts in a subnet are the same (in some cases, it is a security consideration)

In summary, it can be seen that macthe most essential role is to landistinguish the internal equipment


The default gateway specifies:

A host can have multiple gateways. The default gateway means that if a host cannot find an available gateway, it will send the data packet to the default designated gateway, and this gateway will process the data packet.

The device that acts as a gateway must be a device that can implement the routing function (start the routing protocol).

Devices with routing capabilities include routers , servers with routing protocols enabled (essentially equivalent to a router), and proxy servers (also equivalent to a router).

The address of the gateway is the IPaddress of the device with routing function IP, but the last digit is not necessarily of xxx.xxx.xxx.1this type. It can be specified at will, but you are just used to this type.

equipment designation

  1. In the switch, the default gateway will be set vlanunder , and the default gateway will be set for allvlan under thepc
  2. Of course, one of the Layer 3 routers can also be used portas the gateway of the access subnet ( vlansimilar to , but this is professional and more powerful)
  3. Or do not configure at all, select a server (host) in the domain and configure it as a device with a routing protocol, set it as the default gateway, and the device will perform routing and forwarding (eg: topology of one-arm routing)

A router is a layer 3 device, it does not need as many interfaces as a switch, it is essentially just addressing as fast as possible, so the main table isrouting table

And each layer 3 portrouter can be regarded as a lan(local area network) in essence, because porteach has macand ipaddress,

To sum up, it can be seen that ipthe most essential role is to make wanor distinguish equipment in a larger area


Layer 3 routers have

Sarah

Routingrouting table, arptable, NATtable, QoStable, porttable

Routing tableor routing information base( RIB)

in the routing table
Lists routes to a specific network destination (essentially information about the network topology around it)
and in some cases also includes metrics (distance or weight) associated with those routes

The construction of routing tables is the main goal of routing protocols .

A static route is an entry created in the routing table by non-automatic means and is fixed rather than the result of some network topology "discovery" process (dynamic routing).

ah real
Onlyrouting table the static route ( type:C) is added here, and it can be known that the subnet segment ( the network part derived from the subnet mask and port configuration ) connected under the
corresponding portport (usually the default gateway will be setip under this port) is not specified . , indicating that after manual configuration, there is still no connection (not found)ipportIP
next hopip

arp tableLogs all interface configured, connected, and vlanof ipand macinformation

Assam hits Satan

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325859219&siteId=291194637