One-arm routing and VLAN

One: Single-arm routing

1. Logical sub-interface:

The physical interface of a router can be divided into multiple logical interfaces, and these divided logical interfaces are vividly called sub-interfaces. It is worth noting that these logical sub-interfaces cannot be individually opened or closed, that is, when the physical interface is opened or closed, all the sub-interfaces of the interface are also opened or closed.

2. Command:

[AR1]interface GigabitEthernet0/0/0.17 //Enter the sub-interface

[AR1-GigabitEthernet0/0/0.1]ip address 1.1.1.1 24 //Configure the interface address and subnet mask

[AR1-GigabitEthernet0/0/0.1]dotlq termination vid 17 //Specify that the Ethernet sub-interface belongs to VLAN1. This command is applied to the Ethernet sub-interface. Only after this command is configured, the Ethernet sub-interface will embed the VLAN tag in the Ethernet frame header according to the configured VLAN ID number, and the switch interface connected to the network port can correctly process the received frame

[AR1-GigabitEthernet0/0/0.1] arp broad enable //Enable arp protocol broadcast

[AR1-GigabitEthernet0/0/0.1]quit

2. VLANIF:

1. vlanif interface:

When the switch needs to communicate with devices at the network layer, a logical VLAN-based interface, that is, a VLANIF interface, can be created on the switch. A VLANIF interface is a logical interface. A logical interface refers to an interface that does not exist physically and needs to be established through configuration.

2. Configuration

A VLANIF interface is a network layer interface. Before creating a VLANIF interface, you must create a corresponding VLAN before you can configure an IP address. With the help of VLANIF interface, the switch can communicate with other network layer devices

[SW3] interface vlanif 4//Create VLANIF4 interface [SW3-Vlanif4] ip address 192.168.4.1 24//Configure the IP address, this IP address is the gateway address of PC3 [SW3-Vlanif4] quit

 

Guess you like

Origin blog.csdn.net/m0_49019274/article/details/114755823