cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1001
Views
5
Helpful
18
Replies

few questions to confirm my concept

sarahr202
Level 5
Level 5

Hi every body.

I have few questions to think about during my flight toorrow.

We have one multilayer switch sw1, and layer 2 switch sw2 and host1. sw2 has vlan2 and host, h1 exists in vlan 2.

The goal is to explore different ways to configure sw1 as default gateway for h1.

The topology is:

Sw1 f0/1--------(f0/2)SW2F0/3------h1

Assume sw2 f0/3 is already placed in vlan 2. vlan2 is using 198.198.198.0/24

With the above assumption im mind, I explore different ways i can configure sw1 as default gateway for h1.

Option 1

Sw1:

int f0/1

no switchport

ip address 198.198.198.1/24

I also put the sw2 f0/2 in vlan 2

Can i do this ?

Option 2:

sw1:

int vlan 2

ip address 198.198.198.1/24

no shutdown.

Then i configure the f0/1 on sw1 and f0/2 on sw2 as trunk.

Is it correct?

Option 3

Int vlan 2'

ip address 198.198.198.1/24

I configure the f0/2 as an access port and put it in vlan 2 on sw1 . Next i configure the f0/2 on sw2 as an access port and put it in vlan 2.

Is it correct?

==========================

Thanks and i assure these are my last questions for next 6 months.

Thanks and have a good day.

18 Replies 18

Sarah

"You mean trunk between sw1 and sw3 will be used, because the direct link between two is a trunk. But then you said hsrp hello flow only in same vlan. The trunk between sw1 and sw3 does not belong to any vlan."

You are correct in that a trunk doesn't belong to any one vlan but as long as vlan 2 is allowed on that trunk then there is a direct L2 path between the vlan 2 SVI's on SW1 & SW3.

Edit - what i meant about HSRP is that the HSRP packets are not routed so they remain within the vlan they were generated in. Each vlan would have it's own HSRP packets, assuming you are running HSRP for that vlan.

Jon

Thanks Jon.

Just convinced the person-in charge to let me use internet for 30 more minutes.

In the scenario you suggested, i.e

Sw1 connected to sw3 by trunk

sw3 is connected to sw2 by routed port.

sw1 connected to sw2 by routed port.

Hsrp hello will flow from sw1-sw2-sw3. The direct trunk between sw3 and sw1 is not used.

Why? as the trunk also carries vlan2, so sw1 can send hsrp hello to sw3 vua that trunk.

What i understand is this if svi is used for hsrp, then hsrp hello will travel down the link between sw1 and sw3.

But the physical port is being used as routed port and hsrp is configured then sw1 will send hsrp hello to sw2, sw2 then to sw3.

But the quesion is why is it so?

Thanks Jon for your patience. I will pick up this conversation after 6 months.

You have a goood day Jon.

Sarah

"Why? as the trunk also carries vlan2, so sw1 can send hsrp hello to sw3 vua that trunk."

Lets look at it from the perspective of SW1.

SW1 connects to SW2 and on SW2 that port is in vlan 2.

SW2 connects to SW3 and on SW2 that port is in vlan 2.

So if SW1 sends a packet out of the routed port it will arrive on SW2 in vlan 2. SW2 will then send that packet out to SW3 because that port is also in vlan 2. So you can see there is a direct L2 path between the SW1 routed port and the SW3 routed port.

Now lets looks at it again from SW1 the other way.

SW1 port is a routed port, it is not part of a vlan. So for it to send a packet in vlan 2 and go via the L2 trunk between SW1 & SW3 the packet would have to be routed onto vlan 2 within SW1 ie. there is no direct L2 path between the routed port on SW1 and the routed port on SW3 via the trunk link.

And if the packet has to be routed then HSRP packets wouldn't work that way. Note that in the first example going via SW2 the packet is not routed, it is simply switched through vlan 2 fron SW1 -> SW2 -> SW3.

Key thing to understand is that routed ports on a switch cannot be part of a vlan. So to get to vlan 2 on the same switch the packet would have to be routed.

It can be a tricky concept to understand.

Jon

Thanks Jon For bearing with me.

See you guys in 6 months

Have a nice day!

Review Cisco Networking products for a $25 gift card