Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Switch VLANs/Routing

I'm interested in best practice design for the following:

lan1 --- switch1 --(g1/0/28)-- GigaMAN Link --(g1/0/28)-- switch2 --- lan2

lan1 and lan2 are different subnets. I would like to know the best way to configure the ports/VLANS/etc so that traffic can be routed between them. both switch1 and switch2 support routing.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Switch VLANs/Routing

Treat the sw1 and sw2 just like a router. Make the link between them a L3 interface and then you can use routing to get the lan 1 talking to lan 2. For example:

sw1:

conf t

int g 1/0/1 >> to a PC in lan 1

switchport

interface g 1/0/28

no switchport

ip address 10.1.1.1 255.255.255.252

interface vlan 1

ip address 1.1.1.1 255.255.255.0

ip route 2.1.1.0 0.0.0.255 10.1.1.2

sw2:

conf t

interface gig 1/0/1 >> to PC in Lan2

switchport

inter gig 1/0/28

ip address 10.1.1.2 255.255.255.252

inter vlan 1

ip address 2.1.1.1 255.255.255.0

ip route 1.1.1.0 0.0.0.255 10.1.1.1

1 REPLY

Re: Switch VLANs/Routing

Treat the sw1 and sw2 just like a router. Make the link between them a L3 interface and then you can use routing to get the lan 1 talking to lan 2. For example:

sw1:

conf t

int g 1/0/1 >> to a PC in lan 1

switchport

interface g 1/0/28

no switchport

ip address 10.1.1.1 255.255.255.252

interface vlan 1

ip address 1.1.1.1 255.255.255.0

ip route 2.1.1.0 0.0.0.255 10.1.1.2

sw2:

conf t

interface gig 1/0/1 >> to PC in Lan2

switchport

inter gig 1/0/28

ip address 10.1.1.2 255.255.255.252

inter vlan 1

ip address 2.1.1.1 255.255.255.0

ip route 1.1.1.0 0.0.0.255 10.1.1.1

108
Views
0
Helpful
1
Replies
CreatePlease to create content