Topología de la red
Utilice conmutadores de capa 3 como enrutadores
Configuración del interruptor
<H3C>dis stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI LEARNING NONE
0 GigabitEthernet1/0/2 DESI LEARNING NONE
Actualmente hay dos interfaces habilitadas
[H3C]int GigabitEthernet1/0/1
[H3C-GigabitEthernet1/0/1]port link-mode route
[H3C-GigabitEthernet1/0/1]ip add 1.1.1.1 24
[H3C-GigabitEthernet1/0/1]ping 1.1.1.2
Ping 1.1.1.2 (1.1.1.2): 56 data bytes, press CTRL_C to break
56 bytes from 1.1.1.2: icmp_seq=0 ttl=64 time=1.335 ms
56 bytes from 1.1.1.2: icmp_seq=1 ttl=64 time=0.815 ms
56 bytes from 1.1.1.2: icmp_seq=2 ttl=64 time=0.942 ms
56 bytes from 1.1.1.2: icmp_seq=3 ttl=64 time=0.717 ms
56 bytes from 1.1.1.2: icmp_seq=4 ttl=64 time=0.820 ms
Configure el puerto en modo de enrutamiento, configure la dirección IP, pruebe la computadora conectada directamente, OK.
El segundo puerto está configurado de manera similar.
[H3C]int GigabitEthernet1/0/2
[H3C-GigabitEthernet1/0/2]port link-mode route
[H3C-GigabitEthernet1/0/2]ip address 2.2.2.1 24
[H3C-GigabitEthernet1/0/2]ping 2.2.2.2
Ping 2.2.2.2 (2.2.2.2): 56 data bytes, press CTRL_C to break
56 bytes from 2.2.2.2: icmp_seq=0 ttl=64 time=1.190 ms
56 bytes from 2.2.2.2: icmp_seq=1 ttl=64 time=1.010 ms
56 bytes from 2.2.2.2: icmp_seq=2 ttl=64 time=1.036 ms
56 bytes from 2.2.2.2: icmp_seq=3 ttl=64 time=1.091 ms
56 bytes from 2.2.2.2: icmp_seq=4 ttl=64 time=1.058 ms
Pruebas entre PC
PC1 : 1.1.1.2 255.255.255.0 gateway 1.1.1.1
VPCS_2> ping 2.2.2.2
84 bytes from 2.2.2.2 icmp_seq=1 ttl=63 time=1.220 ms
84 bytes from 2.2.2.2 icmp_seq=2 ttl=63 time=1.115 ms
84 bytes from 2.2.2.2 icmp_seq=3 ttl=63 time=1.402 ms
84 bytes from 2.2.2.2 icmp_seq=4 ttl=63 time=1.284 ms
84 bytes from 2.2.2.2 icmp_seq=5 ttl=63 time=1.564 ms
No es necesario configurar protocolos de enrutamiento en el conmutador de capa 3, el enrutamiento se completa automáticamente. La prueba es normal.