17. Virtual Interface and routing of three-layer Technology
Route classification:
V directly connected routing: routers are connected to each other and configured with the same network segment address to communicate.
V static routing: manually configure route entries to enable different network segments to communicate.
V default route: manually configure a route that matches all route entries in a single direction, there can be only one default route on a router, and the default route is a static route.
V dynamic routing: dynamically obtain routing entries to enable different network segments to communicate.
Route identification: C for directly connected, S for static route, and S* for default route.
CISCO Cisco routing commands:
Command
Description
(config) # ip route destination IP mask next hop address
Create a static route entry
(config) # ip route 0.0.0.0 0.0.0.0 next hop address
Create a default route entry
# show ip route
View route entries
Note: the next hop address is the routing peer interface address.
Huawei H3C routing commands:
Command
Description
[huawei] ip route-static destination IP mask next hop address
Create a static route entry
[huawei] ip route-static 0.0.0.0 0.0.0.0 next hop address
Create a default route entry
[huawei] display ip routing-table
View route entries
Layer 3 switches have the functions of switches and routers, and have the advantages of routing once and forwarding multiple times.
Three-layer switching architecture: traditional old-fashioned MSL multilayer switching architecture, fast forwarding architecture based on CEF.
CEF has two information tables: the forwarding information base FIB (routing table) and the adjacency table (MAC table).
Layer 3 switching implements a flexible virtual interface mechanism, and all interfaces on layer 3 switches are layer 2 interfaces by default.
Virtual interface: as the name implies, it is a logical interface, a virtual interface.
CISCO Cisco layer 3 switching commands:
Command
Description
(config) # ip routing
Enable routing function
(config) # no ip routing
Turn off the routing function
(config) # interface vlan 10 (API name)
Enter the virtual interface
(config-if) # no switchport
Promote a physical interface to a layer 3 interface
# clear port-security dynamic
Clear the MAC address of the interface
Huawei H3C layer 3 switching command:
Command
Description
[huawei] interface vlanif 10
Enter the virtual interface