Configuración de un switch capa 3 e ipv4
El script
asignar una ip automaticamente
enable
config terminal
vlan 10
vlan 20
vlan 30
exit
!#### vlan 10
int vlan 10
ip address 192.168.10.254 255.255.255.0
no shutdown
!#### vlan 20
int vlan 20
ip address 172.16.103.254 255.255.252.0
no shutdown
!#### vlan 30
int vlan 30
ip address 192.168.100.62 255.255.255.192
no shutdown
exit
!### fin de script
l
!### se verifica la creacion de las vlans
sho ip int br
!###
config t
int f0/1
switchport access vlan 30
int fa0/2
switchport access vlan 20
int f0/3
switchport access vlan 10
exit
ip dhcp pool 30
network 192.168.100.0 255.255.255.192
!### default gateway
default-router 192.168.100.62
dns-server 8.8.8.8
exit
ip dhcp pool 20
network 172.16.100.0 255.255.252.0
default-router 172.16.103.254
dns-server 8.8.8.8
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.254
dns-server 8.8.8.8
ip routing
ipv4