Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

VLAN Configuration on Cisco Switch

I have a CIsco switch configured with 2 VLAN, 192.168.1.0 & 192.168.2.0

How can I configure the switch such that these two VLAN can access access a internet router connected to this switch as well ? Any configuration example for reference ?

Thx
Avatar of Gammelgaard
Gammelgaard
Flag of Denmark image

The two VLANs need the router as default gateway - your router should be part of both VLANs, with ip addresses. Then, on your router you have to make NAT statements for both VLANs
Avatar of Predrag Jovic
Classical example with L2 switch and router would be router on a stick.
How To Configure Router On A Stick - 802.1q Trunk To Cisco Router
With L3 switch you can have one VLAN that will forward traffic to router, so VLANs are not extending to router.
Avatar of AXISHK
AXISHK

ASKER

"Ip nat inside" on two VLAN sub-interface, so the "ip nat outside" will be on the interface connecting to WAN, correct ?

Any example on using L3 switch in this case ?

Thx
ASKER CERTIFIED SOLUTION
Avatar of Predrag Jovic
Predrag Jovic
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK

ASKER

"access-list 1 permit 192.168.0.0 0.0.1.255"

Does it permit IP address from 192.168.0.0 - 192.168.1.255 ?  Correct ?

Thx
Correct.
That's the range I used in example.
For your example - 192.168.1.0 and 192.168.2.0 you need two statements.
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 permit 192.168.2.0 0.0.0.255
Avatar of AXISHK

ASKER

Thx
You're welcome.