Seguridad y Redes

Tips, Video Tutoriales, Wifislax, VMware, Linux, GNS3, Eve-NG, CCNA, Cisco Routers, Switches

Configuración de SVIs en un Switch de Capa 3

By 21:47 , , , , , , ,

Las VLAN dividen dominios de transmisión en un entorno LAN. Siempre que los host de una VLAN necesitan comunicarse con algun otro host en otra VLAN, debe enrutarse el tráfico entre ellos. Esto se denomina ruteo interVLAN. En los switches Catalyst, se logra al crear interfaces de Capa 3 (Switch Virtual Interface - SVI).

Host1
IP: 10.1.1.5
Default Gateway: 10.1.1.1
Subnet: 255.255.255.0 

Host2
IP: 10.1.2.2
Default Gateway: 10.1.2.1
Subnet: 255.255.255.0

Topologia en GNS3 utilizando la imagen vIOS-L2 y Core Linux.

Configuracion en Core Linux 1.
labs login: delfi
Password:
                                   /\_/\
                                  ( o.o )
                                   > ^ <
                              delfirosales.com
delfi@labs:~$ 
delfi@labs:~$ sudo su
root@labs:/home/delfi# ifconfig eth0 10.1.1.5 netmask 255.255.255.0 up
root@labs:/home/delfi# route add default gw 10.1.1.1
Core Linux 2.
delfi@labs:~$ 
delfi@labs:~$ sudo su
root@labs:/home/delfi# ifconfig eth0 10.1.2.2 netmask 255.255.255.0 up
root@labs:/home/delfi# route add default gw 10.1.2.1
root@labs:/home/delfi# 
Habilitar ruteo en el Switch
vIOS-L2#configure terminal
vIOS-L2(config)#ip routing 
Configuracion y creacion de VLANs
vIOS-L2(config)#interface gigabitEthernet0/1
vIOS-L2(config-if)#switchport access vlan 2
% Access VLAN does not exist. Creating vlan 2
vIOS-L2(config-if)#switchport mode access 
vIOS-L2(config-if)#exit

vIOS-L2(config)#interface gigabitEthernet0/2
vIOS-L2(config-if)#switchport access vlan 3
% Access VLAN does not exist. Creating vlan 3
vIOS-L2(config-if)#switchport mode access 
vIOS-L2(config-if)#exit
Verificacion de las VLANs creadas anterior.
vIOS-L2#show vlan   

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/0, Gi0/3
2    VLAN0002                         active    Gi0/1
3    VLAN0003                         active    Gi0/2
100  VLAN100                          active    
200  VLAN0200                         active    
300  VLAN0300                         active    
1002 fddi-default                     act/unsup 
1003 trcrf-default                    act/unsup 
1004 fddinet-default                  act/unsup 
1005 trbrf-default                    act/unsup 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0   
2    enet  100002     1500  -      -      -        -    -        0      0   
3    enet  100003     1500  -      -      -        -    -        0      0   
100  enet  100100     1500  -      -      -        -    -        0      0   
200  enet  100200     1500  -      -      -        -    -        0      0   
300  enet  100300     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        0      0   
          
VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1003 trcrf 101003     4472  1005   3276   -        -    srb      0      0   
1004 fdnet 101004     1500  -      -      -        ieee -        0      0   
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0   


VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7       7       off

Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------


Creacion de la SVI 2.
vIOS-L2(config)#interface vlan 2
vIOS-L2(config-if)#ip address 10.1.1.1 255.255.255.0
vIOS-L2(config-if)#no shutdown 
vIOS-L2(config-if)#exit
Creacion de la SVI 3.
vIOS-L2(config)#interface vlan 3
vIOS-L2(config-if)#ip address 10.1.2.1 255.255.255.0
vIOS-L2(config-if)#no shutdown 
vIOS-L2(config-if)#end
vIOS-L2#
Si ingresamos el siguiente comando podremos observar que las interfaces se encuentran arriba.
vIOS-L2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     unassigned      YES unset  up                    up      
GigabitEthernet0/1     unassigned      YES unset  up                    up      
GigabitEthernet0/2     unassigned      YES unset  up                    up      
GigabitEthernet0/3     unassigned      YES unset  up                    up      
Vlan2                  10.1.1.1        YES manual up                    up      
Vlan3                  10.1.2.1        YES manual up                    up      
vIOS-L2#
Tambien podremos observar la tabla de ruteo con el comando show ip route.
vIOS-L2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Vlan2
L        10.1.1.1/32 is directly connected, Vlan2
C        10.1.2.0/24 is directly connected, Vlan3
L        10.1.2.1/32 is directly connected, Vlan3
vIOS-L2#

vIOS-L2#show interfaces vlan 2
Vlan2 is up, line protocol is up 
  Hardware is Ethernet SVI, address is 0000.ab5a.8002 (bia 0000.ab5a.8002)
  Internet address is 10.1.1.1/24
  MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive not supported 
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:10, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     652 packets input, 98538 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles 
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     17 packets output, 1054 bytes, 0 underruns
     0 output errors, 0 interface resets
     0 unknown protocol drops
     0 output buffer failures, 0 output buffers swapped out
vIOS-L2#
Verificacion de Core Linux 1 a Core Linux 2.


Otros comandos de verificacion.
vIOS-L2#show interfaces vlan 3
vIOS-L2#show interface gigabitEthernet0/0
vIOS-L2#show interfaces gigabitEthernet0/0 switchport
vIOS-L2#show vlan brief
Descargar Core Linux: LinuxCore-6.4.1.img

You Might Also Like

0 comentarios