cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
549
Views
0
Helpful
9
Replies

VLAN

anitachoi3
Level 1
Level 1

Hi,

I would like to config cisco switch 3750 with VLAN. any sample config link?

I attached the vlan design.

rdgs

3 Accepted Solutions

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Anita,

the steps are the following:

a) L2 broadcast domain creation

! vlan 1 exists by default

conf t

vlan 2

vlan 3

b) associate L2 ports to Vlans

conf t

int f0/10

switchport

desc here you connect a PC/server in Vlan2

switchport access vlan 2

switchport mode access

ports are in vlan1 by default so you need to change config on ports that are to be placed in Vlan2 and Vlan3.

if you need trunk ports

int f0/20

switchport

switchport trunk protocol dot1q

switchport mode trunk

switchport trunk allowed vlan 1-3

c) providing L3 services

create a logical L3 interface called SVI = switched Virtual interface

int vlan 1

ip address x.x.x.x mask

no shut

do the same with vlan2 and vlan3 using the correct subnets remember the no shut.

the SVI are up if at least one l2 port for each Vlan is in STP forwarding state including trunk ports

Hope to help

Giuseppe

View solution in original post

Anita

For this port

int gi1/0/1

no switchport

ip address 192.168.1.1 255.255.255.0

This will make the port a routed port connected to the 192.168.1.0/24 network.

Jon

View solution in original post

Anita

Looks fine except for the connection to 192.168.1.0/24 network. You can either

1) Use a vlan to connect so your config would be

int gi 1/0/1

switchport access vlan 1

interface Vlan1

ip address 192.168.1.1 255.255.255.0

OR

2) Just use a routed port

int gi1/0/1

no switchport

ip address 192.168.1.1 255.255.255.0

Note with this option you don't need vlan 1 interface so

int vlan 1

shut

It all depends on what is on the 192.168.1.0/24 network. If you have pc's that are connected into the 3750 switch and are on the 192.168.1.0/24 network then use option 1).

Note - it may be better not to use vlan 1 at all so in actual fact option 1 would look like

int gi 1/0/1

switchport access vlan 5

interface Vlan5

ip address 192.168.1.1 255.255.255.0

If you do use vlan 5 make sure you create it at layer 2 ie.

3750(config)# vlan 5

If there are no clients/PC etc. on 192.168.1.0/24 network then you could use option 2.

Jon

View solution in original post

9 Replies 9

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Anita,

the steps are the following:

a) L2 broadcast domain creation

! vlan 1 exists by default

conf t

vlan 2

vlan 3

b) associate L2 ports to Vlans

conf t

int f0/10

switchport

desc here you connect a PC/server in Vlan2

switchport access vlan 2

switchport mode access

ports are in vlan1 by default so you need to change config on ports that are to be placed in Vlan2 and Vlan3.

if you need trunk ports

int f0/20

switchport

switchport trunk protocol dot1q

switchport mode trunk

switchport trunk allowed vlan 1-3

c) providing L3 services

create a logical L3 interface called SVI = switched Virtual interface

int vlan 1

ip address x.x.x.x mask

no shut

do the same with vlan2 and vlan3 using the correct subnets remember the no shut.

the SVI are up if at least one l2 port for each Vlan is in STP forwarding state including trunk ports

Hope to help

Giuseppe

hi

Thanks, how to config the 192.168.1.1 to one of c3750 port?

rdgs

hi,

I would like 3750 act as router because there is no router on the LAN

rdgs

Anita

For this port

int gi1/0/1

no switchport

ip address 192.168.1.1 255.255.255.0

This will make the port a routed port connected to the 192.168.1.0/24 network.

Jon

Hi Jon,

do I need to config

"switchport trunk allowed vlan 10,20 " similar conf to assosicate all VLAN to 192.168.1.1 gi 1/0/1? It seems that the vlan cannot go to 192.168.1.0 segment

rdgs

Anita

No you don't want to use the switchport trunk allowed vlan 10,20 command. The port is a routed port so it isn't a switchport at all.

What is on 192.168.1.0/24 network. In other words what are you trying to get to and from.

If you have clients on the 192.168.1.0/24 network then you just set their default-gateway to be 192.168.1.1 and they will then be able to get to the vlans.

Anything on the vlans will also be able to get to anything on 192.168.1.0/24 network.

However if there are other networks/routers connected to the 192.168.1.0/24 network then we will need to update the routing tables.

Jon

Hi Jon,

my config is below. any missing? All VLAN PCs will point to 172.16.x.1 as the default gateway.

rdgs

!Switch

interface FastEthernet 1/0/2

switchport access vlan 2

switchport mode access

interface FastEthernet 1/0/3

switchport access vlan 3

switchport mode access

interface FastEthernet 1/0/4

switchport access vlan 4

switchport mode access

! connect to 192.168.1.0 segment

int gi 1/0/1

no switchport

interface Vlan1

ip address 192.168.1.1 255.255.255.0

interface Vlan2

ip address 172.16.1.1 255.255.255.0

interface Vlan3

ip address 172.16.2.1 255.255.255.0

interface Vlan4

ip address 172.16.3.1 255.255.255.0

!

Anita

Looks fine except for the connection to 192.168.1.0/24 network. You can either

1) Use a vlan to connect so your config would be

int gi 1/0/1

switchport access vlan 1

interface Vlan1

ip address 192.168.1.1 255.255.255.0

OR

2) Just use a routed port

int gi1/0/1

no switchport

ip address 192.168.1.1 255.255.255.0

Note with this option you don't need vlan 1 interface so

int vlan 1

shut

It all depends on what is on the 192.168.1.0/24 network. If you have pc's that are connected into the 3750 switch and are on the 192.168.1.0/24 network then use option 1).

Note - it may be better not to use vlan 1 at all so in actual fact option 1 would look like

int gi 1/0/1

switchport access vlan 5

interface Vlan5

ip address 192.168.1.1 255.255.255.0

If you do use vlan 5 make sure you create it at layer 2 ie.

3750(config)# vlan 5

If there are no clients/PC etc. on 192.168.1.0/24 network then you could use option 2.

Jon

Hi Jon,

my config is below. any missing? All VLAN PCs will point to 172.16.x.1 as the default gateway. I also enable the DHCP service

any advice?

rdgs

!Switch

interface FastEthernet 1/0/2

switchport access vlan 2

switchport mode access

interface FastEthernet 1/0/3

switchport access vlan 3

switchport mode access

interface FastEthernet 1/0/4

switchport access vlan 4

switchport mode access

! connect to 192.168.1.0 segment

int gi 1/0/1

no switchport

interface Vlan1

ip address 192.168.1.1 255.255.255.0

interface Vlan2

ip address 172.16.1.1 255.255.255.0

ip helper address 192.168.1.254

interface Vlan3

ip address 172.16.2.1 255.255.255.0

ip helper address 192.168.1.254

interface Vlan4

ip address 172.16.3.1 255.255.255.0

ip helper address 192.168.1.254

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: