cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18685
Views
10
Helpful
3
Replies

How to route between 2 vlans through a router and between different location?

shalmanov
Level 1
Level 1

I've got 2 vlans (100 and 101) that come to a port of switch. Vlan100 has to ping vlan101 through router and also next site with different network.

See the attached file for more info. Please give a good example to do it. Thank you.

2 Accepted Solutions

Accepted Solutions

shivjain
Cisco Employee
Cisco Employee

hi

on R1 you have to craete two sub interfaces for vlan 100 and 101.

on R2 also you have to craete two sub interfaces for vlan 100 and 101.

Between Gi2/1 on R1 and R2 you have to enable the routing either static or dynamic.

Config on R1 will look like as below:-

int gi0/1.100

ip address 10.30.148.x

int gi0/1.101

ip address 10.30.149.x

int gi2/1

ip address 1.1.1.1 255.255.255.252 (Assuming)

ip route 10.30.150.0 255.255.255.128 1.1.1.2

ip route 10.30.150.128 255.255.255.128 1.1.1.2

Config on R2 will look like as below:-

int gi0/1.100

ip address 10.30.150.x

int gi0/1.101

ip address 10.30.150.x

int gi2/1

ip address 1.1.1.2 255.255.255.252 (Assuming)

ip route 10.30.148.0 255.255.255.0 1.1.1.1

ip route 10.30.149.128 255.255.255.0 1.1.1.1

regards

shivlu jain

www.mplsvpn.info

View solution in original post

Hi

Please check the below config of switches:-

1. int fa0/0

description port connected to host pc

switchport mode access

switchport access vlan 100

no shut

2. int fa0/48

description port connected to router

switchport mode trunk

switchport trunk encapsulation do1q

switchport trunk allowed vlan 100,101

no shut

Please close the thread if it solves your problem.

regards

shivlu jain

View solution in original post

3 Replies 3

shivjain
Cisco Employee
Cisco Employee

hi

on R1 you have to craete two sub interfaces for vlan 100 and 101.

on R2 also you have to craete two sub interfaces for vlan 100 and 101.

Between Gi2/1 on R1 and R2 you have to enable the routing either static or dynamic.

Config on R1 will look like as below:-

int gi0/1.100

ip address 10.30.148.x

int gi0/1.101

ip address 10.30.149.x

int gi2/1

ip address 1.1.1.1 255.255.255.252 (Assuming)

ip route 10.30.150.0 255.255.255.128 1.1.1.2

ip route 10.30.150.128 255.255.255.128 1.1.1.2

Config on R2 will look like as below:-

int gi0/1.100

ip address 10.30.150.x

int gi0/1.101

ip address 10.30.150.x

int gi2/1

ip address 1.1.1.2 255.255.255.252 (Assuming)

ip route 10.30.148.0 255.255.255.0 1.1.1.1

ip route 10.30.149.128 255.255.255.0 1.1.1.1

regards

shivlu jain

www.mplsvpn.info

Hi

thnks for replying,

it will be great if you give a example for config of switches.

regards aga

Hi

Please check the below config of switches:-

1. int fa0/0

description port connected to host pc

switchport mode access

switchport access vlan 100

no shut

2. int fa0/48

description port connected to router

switchport mode trunk

switchport trunk encapsulation do1q

switchport trunk allowed vlan 100,101

no shut

Please close the thread if it solves your problem.

regards

shivlu jain

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: