10-26-2018 08:25 AM - edited 03-08-2019 04:29 PM
hi,
I need to create 2 vlans 192.168.25.1 and 192.168,26,1
ans assign these vlan to the switch port port 1 and port 3
I'm using CISCO 2960 Catlyst.
Pls. guide the commands thru console .
10-26-2018 08:31 AM - edited 10-26-2018 08:33 AM
Hello
ypu dont say if you need to allow communication between the two subnet so I will assume you do
Config t
ip routing
int vlan 25
IP address 192.168.25.1 255.255.255.0
ip route-cache
exit
int vlan 26
IP address 192.168.26.1 255.255.255.0
ip route-cache
exit
int x/x 1
description access-port 1
switchport host
no shut
switchport access vlan 25
exit
int x/x 3
description access-port 3
switchport host
no shut
switchport access vlan 26
end
wr
10-26-2018 09:09 AM
10-26-2018 08:38 AM
Hello,
below is a sample. IP routing has been enabled, if you use a router linked to the switch to do the routing, you need to configure a trunk link to the router and create subinterfaces (Router-on-a-stick)...
ip routing
!
interface GigabitEthernet1/0/1
switchport mode access
switchport access vlan 2
spanning-tree portfast
!
interface GigabitEthernet1/0/2
switchport mode access
switchport access vlan 3
spanning-tree portfast
!
interface Vlan2
ip address 192.168.25.1 255.255.255.0
!
interface Vlan3
ip address 192.168.26.1 255.255.255.0
10-26-2018 09:23 AM
You can also name the vlan
Example:
vlan 2
name data
vlan 3
name voice
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide