cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2129
Views
0
Helpful
8
Replies

Trunk to Trunk VLAN

Chieu Dinh
Level 1
Level 1

Hi

I have switch A interface 1/0/1 trunk (VLAN 1) is connecting to  switch B (VLAN2) interface 1/0/1 trunk. How do I route the packet from VLAN1 in switch A to VLAN 2 in switch B?

Switch A:

interface GigabitEthernet1/0/1

switchport trunk encapsulation dot1q

switchport mode trunk

.............

interface Vlan1
  ip address 192.168.1.5 255.255.255.0

Switch B:

interface GigabitEthernet3/0/1
switchport trunk encapsulation dot1q
switchport mode trunk

interface Vlan2

ip address 192.168.1.7 255.255.255.0

Thank you

1 Accepted Solution

Accepted Solutions

Primary issue is resolved. Your vpn related issue can be resolved if your start new thread in VPN.

check your routes

if its same router on which vpn is configured it should ping router.

if its not same router you have to configured route for 192.168.15.x network.

*** DO RATE ALL HELPFUL POSTS ***

Jawad

Jawad

View solution in original post

8 Replies 8

Is this your topology ?

############# trunk int 1/0/1 ------------------------------- int 1/0/1 trunk #############

      SW_A                                                                                        SW_B

SW_A = vlan 1 192.168.1.5

SW_B = vlan 2  192.168.1.7

What is your native vlan? You need to have the same native vlan on SW_A and SW_B

If you don't have the same native vlan will not work.

SW_A

Switch(config)#interface vlan 99

Switch(config-if)#ip address 192.168.99.1 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk native vlan 99

SW_B

Switch(config)#interface vlan 99

Switch(config-if)#ip address 192.168.99.2 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk native vlan 99

If you want to route packets between vlans you have to implemente inter-vlan routing in a switch (L3) or router interface.

Reggards


Thank you for response.

I think my question is how do I route my packets between VLANs. and how do implement inter-vlan routing?

For the configuration above, I can set all in one native VLAN 1 which can work as it is. But I would like to route the packet between VLAN.

Is there something I have to set in VTP mode?

Thanks

For Inter-vlan routing you need have a Layer 3 Switch or Router, and use it like a Default Gateway for the Host.

If you have a Layer 3 Switch ( example WS-C3750X-24T-S) you could be try the following:

Switch(config)#ip routing

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#vlan 3

Switch(config-vlan)#exit

Switch(config)#interface vlan 2

Switch(config-if)#ip address 192.168.2.1 255.255.255.0

Switch(config-if)#description DEFAULT-GATEWAY FOR VLAN 2

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface vlan 3

Switch(config-if)#ip address 192.168.3.1 255.255.255.0

Switch(config-if)#description DEFAULT-GATEWAY FOR VLAN 3

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface fa0/0

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 2

Switch(config-if)#switchport nonegotiate

Switch(config-if)#exit

Switch(config)#interface fa0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 3

Switch(config-if)#switchport nonegotiate

Switch(config-if)#exit

Then connect a Host -> Fa0/0 and Fa0/1

For Host Fa0/0 configure the following addressing:

192.168.2.10

255.255.255.0

192.168.2.1    <- This is the interface vlan on the router, and is the default gateway for the host (vlan 2)

For Host Fa0/1 configure the following addressing:

192.168.3.10

255.255.255.0

192.168.3.1    <- This is the interface vlan on the router, and is the default gateway for the host (vlan 3)

Try executing ping between host, and this will be successful !

You can try this : "show ip route" to verify routing on the switch.

http://www.cisco.com/en/US/tech/tk389/tk815/technologies_configuration_example09186a008019e74e.shtml

Reggards.

shamkuris
Level 1
Level 1

Hi Chieu Dinh,

For inter Vlan communication you need to have a L3 device such as router or a L3 swicth.

VLANs and trunks operate at layer 2. And at layer 2 you can not go between VLANs. To go between VLANs you need layer 3 such as a layer 3 switch or router.

HTH

Rick

HTH

Rick

interface GigabitEthernet1/0/1

switchport trunk encapsulation dot1q

switchport mode trunk

switchport trunk allowed vlan 1,2

Create Vlan 2 alos here

int vlan 2

no shut

.............

interface Vlan1
  ip address 192.168.1.5 255.255.255.0

now u can assing this vlan to any port it will work

Switch B:

interface GigabitEthernet3/0/1
switchport trunk encapsulation dot1q
switchport mode trunk

switchprot trunk allowed vlan 1,2

int vlan 1

no shut

interface Vlan2

ip address 192.168.1.7 255.255.255.0

assign any interface to vlan 1 here it will work

Remember vlan IP is used for managebility only.  both vlans in each switch should be UP.

Jawad

Jawad

I have this setup

interface GigabitEthernet1/0/1

switchport trunk encapsulation dot1q

switchport mode trunk

switchport trunk allowed vlan 1,2

Create Vlan 2 alos here

int vlan 2

no shut

.............

interface Vlan1
ip address 192.168.1.5 255.255.255.0

now u can assing this vlan to any port it will work

Switch B:

interface GigabitEthernet3/0/1
switchport trunk encapsulation dot1q
switchport mode trunk

switchprot trunk allowed vlan 1,2

int vlan 1

no shut

interface Vlan2

ip address 192.168.1.7 255.255.255.0

It worked for the internal network. But when I connect my VPN into the network, I can't ping the router. The VPN is in the 192.168.15.0/24 network.

my VPN client can  ping any servers or client in the 192.168.1.0/24 network except the router 192.168.1.5

Any ideass?

Thanks

Primary issue is resolved. Your vpn related issue can be resolved if your start new thread in VPN.

check your routes

if its same router on which vpn is configured it should ping router.

if its not same router you have to configured route for 192.168.15.x network.

*** DO RATE ALL HELPFUL POSTS ***

Jawad

Jawad
Review Cisco Networking for a $25 gift card