switport access or routed link

I have a Cisco router and a 3750X layer 3 switch. Should I connect them as a routed link or an switchport access vlan1 from the router (see below)
Scenario 1:
Router-----------
interface gig0/0
ip address 10.10.10.1 255.255.255.0
sw--------------
interface gig1/0/1
switchport access vlan 1
switchport mode access
!
interface vlan1
ip address 10.10.10.2 255,255,255,0
!
interface vlan2
ip address 10.10.20.2 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 10.10.10.1

Scenario 2:
Router-----------
interface gig0/0
ip address 10.10.100.1 255.255.255.252
sw--------------
interface gig1/0/1
ip address 10.10.100.2 255.255.255.252
!
inteface vlan1
ip address 10.10.10.2 255.255.255.0
!
interface vlan2
ip address 10.10.20.2 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 10.10.100.1
LVL 1
leblancAccountingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Don JohnstonInstructorCommented:
Both of the options you present are (functionally) the same.

So it doesn't matter which one you use.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LeoCommented:
Agree with Don, from both of the configs you will achieve the same result, doesn't matter which one you use....
0
leblancAccountingAuthor Commented:
ok. So in scenario 1, when I ping a device on vlan 2 from the router, Where will the routing occur? The link between the router and the switch only vlan1 subnet traffic. Thx
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Don JohnstonInstructorCommented:
Because the only device that has interfaces on VLAN 1 and VLAN 2, the switch will perform interVLAN routing.
0
leblancAccountingAuthor Commented:
That's right. The switch will do intervlan. So you do not need to have a static route from the router because it is directly connected to vlan1. Correct? The reason I ask is because I build a lab on scenarion 1 and I could not ping vlan2 subnet. Thx
0
LeoCommented:
To help clarify you more....
The pc for example in vlan 10 want to talk to server in another vlan say vlan 20 which will be in different subnet will not find server in same subnet and will throw the request to its gateway. Now the request is with 3750 switch and 3750 switch will check its routing table and will see that the server vlan which is vlan 20 is directly connected so it will route the packet to that vlan.

3750 will send an arp request for the server in vlan 20 to which your pc from vlan 10 want to talk to and once the mac address is learned it will reach the server and same way the reply will come back.

You do not need any subinterfaces because 3750 is itself a layer 3 switch will will handle routing between the vlans.
0
LeoCommented:
Try enabling ip routing on the 3750 and add each vlan to a router protocol such as eigrp in the 3750 switch configuration.
0
leblancAccountingAuthor Commented:
Yes there is no need for subinterfaces. I want to stay away from router-0on-a-stick type of configuration. ip routing is enabled on the switch.
0
Craig BeckCommented:
There's no need to send all the traffic to be routed between VLANs to the router so interVLAN will be done at the 3750X.  Any traffic not routed at the 3750X will be sent to the router.  Therefore I'd probably use a routed link between the 3750 and the router.  It'd also help to make routing simpler.

Technically though either approach would work - the Layer2 approach would work as long as you have dynamic or static routing configured between the router and 3750X to allow clients using one gateway to route via the other if they need to.
0
leblancAccountingAuthor Commented:
So I need to configure a dynamic routing protocol like EIGRP between the router and the 3750X with either scenario. Corrrect?

"Any traffic not routed at the 3750X will be sent to the router.  Therefore I'd probably use a routed link between the 3750 and the router."
So if I have a subnet that is not defined in the SVI of the 3750X, it will be sent through the default route to the router. So it does not matter if it is layer 2 or routed link between the router and the switch. Correct?
0
Craig BeckCommented:
So I need to configure a dynamic routing protocol like EIGRP between the router and the 3750X with either scenario. Corrrect?
In either scenario you will probably want a routing protocol, but you don't have to use dynamic protocols; you could use static routes.  If you use a L3 link you'll need to point the 3750's default route via the router and you'll also want to point the router towards the 3750 to reach the subnets it owns.  I'd probably just configure EIGRP stub on the 3750 for this, or use a couple of static routes at the router and a default static route at the 3750.

So if I have a subnet that is not defined in the SVI of the 3750X, it will be sent through the default route to the router. So it does not matter if it is layer 2 or routed link between the router and the switch. Correct?
Kind of, but it's not that simple, hence needing routes between the 3750 and router.

Clients need a default route unless you configure specific static routes on them.  You're intending to have two routers on the same L2 segment (the 3750 will be a router as well as the actual router) so you'll have to use one router as the default gateway, then tell that router to tell clients that want to get to routes via the other router how to get there.  This can get messy and can also introduce problems with traffic flow.  Therefore a routed link is probably the better option.  That way everyone uses one default gateway (the 3750) and it decides where traffic goes, meanwhile the router can only ever send or receive traffic via one along the same path.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Network Analysis

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.