cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1840
Views
5
Helpful
9
Replies

2 Vlans on 2 switches and 1 router - help

garbis1000
Level 1
Level 1

Hi there. 

im trying to configure 2 vlans with the same name, one on each switch so they can "ping". but this doesn't work. I have tried with dot1q and trunk but I can't find any solution. Maybe it's because I'm new to this. If you could help me I would be very grateful. I leave the file and an image. the vlans are for the cameras.

proyect.png

 

 

1 Accepted Solution

Accepted Solutions

First, I would avoid using the VLAN1 default for any other purpose..

Try below config :

SwitchIE

create vlan 10 (this can be voice vlan)

config t
!
vlan 10
!
no interface Vlan1
!
interface Vlan10
ip address 192.168.1.62 255.255.255.192
no shutdown
!
ip default-gateway 192.168.1.2

use below example connecting to router port and other ports

interface FastEthernet0/X
switchport mode access
switchport access vlan 10
no shutdown
!


SwitchIE

create vlan 20

config t
!
vlan 20
!
no interface Vlan1
!
interface Vlan20
ip address 192.168.1.126 255.255.255.192
no shutdown
!
ip default-gateway 192.168.1.66

use the below example connecting to the router port and other ports

interface FastEthernet0/X
switchport mode access
switchport access vlan 20
no shutdown

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

9 Replies 9

balaji.bandi
Hall of Fame
Hall of Fame

Couple of questions to clarity here :

1. Router outside to ISP having same subnet as Lan ?

2. what is the Lan subnet mask ? and what gateway ?

 

Since the router in the between, you can not extend the Layer 2 VLAN via Router (unless you configure BVI Interface.)

Instead i would suggest to connect link between switches configure as Trunk in the interface config, that may  fix your issue, to have communication between

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello, thanks for answering
No the router in the "isp" cluster is only there as a connection. It is to explain in an exhibition how the internet that reaches the company works. and regarding the configuration of the mask and all that is the following.

Router to SwitchIE: 192.168.1.2 255.255.255.192

Router to SwitchOA: 192.168.1.66 255.255.255.192

Ok so, when you refer to connecting the switches, do you mean without disconnecting them from the router?

If the switch acting as Layer 2, and router is configured as mentioned IP address and ip routing enabled both the side communication should work as expected.

One thing not clear in this diagram what is the IP address between Router to IP in the RED link ?

can you attached show run  information from router and both the switches to understand what configured.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

If you see some interfaces with "voice vlan" it is because I programmed the phones with dhcp so that it automatically assigned the IPs and I excluded the rest of the IPs that I placed statically in the rest of the devices.

 
 

 

 

Router Principal.png

Router..png

  

SwitchOA.png

SwitchIE.png

 

i can only look if you can post a show run (in a text file) I am not able to read the images correctly

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Router

Spoiler

no service timestamps debug datetime msec

no service password-encryption

!

hostname RouterSP

!

!

!

!

ip dhcp excluded-address 192.168.1.0

ip dhcp excluded-address 192.168.1.1

ip dhcp excluded-address 192.168.1.2

ip dhcp excluded-address 192.168.1.3

ip dhcp excluded-address 192.168.1.64

ip dhcp excluded-address 192.168.1.65

ip dhcp excluded-address 192.168.1.66

ip dhcp excluded-address 192.168.1.67

ip dhcp excluded-address 192.168.1.4

ip dhcp excluded-address 192.168.1.5

ip dhcp excluded-address 192.168.1.7

ip dhcp excluded-address 192.168.1.8

ip dhcp excluded-address 192.168.1.9

ip dhcp excluded-address 192.168.1.10

ip dhcp excluded-address 192.168.1.11

ip dhcp excluded-address 192.168.1.12

ip dhcp excluded-address 192.168.1.6

ip dhcp excluded-address 192.168.1.13

ip dhcp excluded-address 192.168.1.68

ip dhcp excluded-address 192.168.1.69

ip dhcp excluded-address 192.168.1.70

ip dhcp excluded-address 192.168.1.71

ip dhcp excluded-address 192.168.1.72

ip dhcp excluded-address 192.168.1.73

ip dhcp excluded-address 192.168.1.74

ip dhcp excluded-address 192.168.1.75

ip dhcp excluded-address 192.168.1.76

ip dhcp excluded-address 192.168.1.77

ip dhcp excluded-address 192.168.1.78

ip dhcp excluded-address 192.168.1.79

!

ip dhcp pool voice

network 192.168.1.0 255.255.255.192

default-router 192.168.1.2

option 150 ip 192.168.1.2

ip dhcp pool service

network 192.168.1.64 255.255.255.192

default-router 192.168.1.66

option 150 ip 192.168.1.66

!

!

!

ip cef

no ipv6 cef

!

!

!

!

license udi pid CISCO2811/K9 sn FTX1017262S-

!

!

!

!

!

!

!

!

!

!

!

spanning-tree mode pvst

!

!

!

!

!

!

interface FastEthernet0/0

ip address 192.168.1.2 255.255.255.192

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 192.168.1.66 255.255.255.192

duplex auto

speed auto

!

interface GigabitEthernet0/3/0

ip address 10.0.0.2 255.255.255.252

!

interface Vlan1

no ip address

shutdown

!

ip classless

ip route 0.0.0.0 0.0.0.0 10.0.0.1

!

ip flow-export version 9

!

!

!

!

!

!

!

telephony-service

max-ephones 10

max-dn 10

ip source-address 192.168.1.66 port 2000

auto assign 1 to 10

!

ephone-dn 1

number 7820

!

ephone-dn 2

number 7821

!

ephone-dn 3

number 7822

!

ephone-dn 4

number 7823

!

ephone-dn 5

number 7824

!

ephone-dn 6

number 7825

!

ephone-dn 7

number 7826

!

ephone-dn 8

number 7827

!

ephone 1

device-security-mode none

mac-address 00D0.FF18.3BA4

type 7960

button 1:1

!

ephone 2

device-security-mode none

mac-address 0003.E4D4.4482

type 7960

button 1:2

!

ephone 3

device-security-mode none

mac-address 0007.EC7B.C773

type 7960

button 1:3

!

ephone 4

device-security-mode none

mac-address 00E0.F7B9.5B54

type 7960

button 1:4

!

ephone 5

device-security-mode none

mac-address 00E0.F901.E92B

type 7960

button 1:5

!

ephone 6

device-security-mode none

mac-address 0002.172A.8A9B

type 7960

button 1:6

!

ephone 7

device-security-mode none

mac-address 0060.5C67.2C67

type 7960

button 1:7

!

ephone 8

device-security-mode none

mac-address 0001.4230.B84E

type 7960

button 1:8

!

ephone 9

device-security-mode none

mac-address 0004.9A90.0377

!

line con 0

!

line aux 0

!

line vty 0 4

login

!

!

!

end

SwitchOA

Spoiler

hostname SwitchOA

!

!

!

!

!

!

spanning-tree mode pvst

spanning-tree extend system-id

!

interface FastEthernet0/1

switchport mode access

!

interface FastEthernet0/2

switchport mode access

!

interface FastEthernet0/3

switchport mode access

!

interface FastEthernet0/4

switchport mode access

!

interface FastEthernet0/5

switchport mode access

!

interface FastEthernet0/6

switchport mode access

!

interface FastEthernet0/7

switchport mode access

!

interface FastEthernet0/8

switchport mode access

!

interface FastEthernet0/9

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/10

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/11

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/12

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/13

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/14

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/15

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/16

switchport mode access

!

interface FastEthernet0/17

switchport mode access

!

interface FastEthernet0/18

switchport mode access

!

interface FastEthernet0/19

switchport mode access

!

interface FastEthernet0/20

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/21

switchport mode access

!

interface FastEthernet0/22

switchport mode access

!

interface FastEthernet0/23

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/24

switchport mode access

switchport voice vlan 1

!

interface Vlan1

ip address 192.168.1.126 255.255.255.192

!

!

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

!

!

end

SwitchIE

Spoiler

hostname SwitchIE

!

!

!

!

!

!

spanning-tree mode pvst

spanning-tree extend system-id

!

interface FastEthernet0/1

switchport mode access

!

interface FastEthernet0/2

switchport mode access

!

interface FastEthernet0/3

switchport mode access

!

interface FastEthernet0/4

switchport mode access

!

interface FastEthernet0/5

switchport mode access

!

interface FastEthernet0/6

switchport mode access

!

interface FastEthernet0/7

switchport mode access

!

interface FastEthernet0/8

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/9

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/10

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/11

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/12

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/13

switchport mode access

!

interface FastEthernet0/14

switchport mode access

!

interface FastEthernet0/15

switchport mode access

!

interface FastEthernet0/16

switchport mode access

!

interface FastEthernet0/17

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/18

switchport mode access

!

interface FastEthernet0/19

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/20

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/21

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/22

switchport mode access

switchport voice vlan 1

!

interface FastEthernet0/23

switchport mode access

!

interface FastEthernet0/24

switchport mode access

!

interface Vlan1

ip address 192.168.1.62 255.255.255.192

!

!

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

!

!

end

 

First, I would avoid using the VLAN1 default for any other purpose..

Try below config :

SwitchIE

create vlan 10 (this can be voice vlan)

config t
!
vlan 10
!
no interface Vlan1
!
interface Vlan10
ip address 192.168.1.62 255.255.255.192
no shutdown
!
ip default-gateway 192.168.1.2

use below example connecting to router port and other ports

interface FastEthernet0/X
switchport mode access
switchport access vlan 10
no shutdown
!


SwitchIE

create vlan 20

config t
!
vlan 20
!
no interface Vlan1
!
interface Vlan20
ip address 192.168.1.126 255.255.255.192
no shutdown
!
ip default-gateway 192.168.1.66

use the below example connecting to the router port and other ports

interface FastEthernet0/X
switchport mode access
switchport access vlan 20
no shutdown

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello,

I have opened your file, and I have full connectivity. From which source IP to which destination IP can you not ping ?

Source IP: 192.168.1.5

Destination IP: 192.168.1.67

Success or Failure: S/F

Hey. 

Yes, you can ping any host. The problem is why I started the post because I want to create a vlan for the cameras and the server "vlan 10".

I can create a vlan on each switch with the same name but this does not guarantee that the SwitchIE cameras can ping the SwitchOA cameras. Actually that is my question.

What commands should I use?

Review Cisco Networking for a $25 gift card