cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
701
Views
0
Helpful
2
Replies

How to ping router in SAME VLAN, when multiple VLAN configured on a switch ?

Gaurav Saini
Level 1
Level 1

Hello All,

As per the attached topology, what should be the configuration at Switch so that I can ping routers in SAME VLAN.

Abc.png

For example :

If I put routers in VLANs in switch according to below, what should be the config at switch.

VLAN 12 : R1 & R2

VLAN 16 : R1 & R6

VLAN 18 : R1 & R8

Note : I'm using Router 3745 as switch SW1 using 16 fast ethernet interface card

I have no idea about the VLAN Configs / switching. (I've started studing routing)

//           (Switch interface fa1/* is connected to corresponding router, like fa1/1 connected to R1 & fa1/2 to R2 and so on....)

===============  SW1  =============

SW1#sh run int fa1/1

Building configuration...

Current configuration : 107 bytes

!

interface FastEthernet1/1

switchport access vlan 12

switchport mode trunk

duplex full

speed 100

end

SW1#sh run int fa1/2

Building configuration...

Current configuration : 107 bytes

!

interface FastEthernet1/2

switchport access vlan 12

switchport mode trunk

duplex full

speed 100

end

SW1#

===============  R1  =============

R1#sh run int fa0/0

Building configuration...

Current configuration : 72 bytes

!

interface FastEthernet0/0

no ip address

speed 100

full-duplex

end

R1#sh run int fa0/0.12

Building configuration...

Current configuration : 95 bytes

!

interface FastEthernet0/0.12

encapsulation dot1Q 12

ip address 1.1.12.1 255.255.255.0

end

R1#

===============  R2  =============

R2#sh run int fa0/0

Building configuration...

Current configuration : 72 bytes

!

interface FastEthernet0/0

no ip address

speed 100

full-duplex

end

R2#sh run int fa0/0.12

Building configuration...

Current configuration : 95 bytes

!

interface FastEthernet0/0.12

encapsulation dot1Q 12

ip address 1.1.12.2 255.255.255.0

end

R2#

=========================

1 Accepted Solution

Accepted Solutions

Seb Rupik
VIP Alumni
VIP Alumni

Hi Gaurav,

Since you are sending and receiving tagged packets on the routers, you must setup your SW1 interfaces as trunk interfaces. Based on the three VLANs you provided, the following config is what you need:

!

int fa1/1

  no switchport mode access

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk allowed vlan 12,16,18

!

int fa1/6

  no switchport mode access

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk allowed vlan 16

!

int fa1/8

  no switchport mode access

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk allowed vlan 18

!

cheers,

Seb.

View solution in original post

2 Replies 2

Seb Rupik
VIP Alumni
VIP Alumni

Hi Gaurav,

Since you are sending and receiving tagged packets on the routers, you must setup your SW1 interfaces as trunk interfaces. Based on the three VLANs you provided, the following config is what you need:

!

int fa1/1

  no switchport mode access

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk allowed vlan 12,16,18

!

int fa1/6

  no switchport mode access

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk allowed vlan 16

!

int fa1/8

  no switchport mode access

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk allowed vlan 18

!

cheers,

Seb.

ThankYou Seb. :)

 

I did study Switching, and I got now what was the problem in config.

Review Cisco Networking for a $25 gift card