RIP, EIGRP, OSPF, IS-IS, BGP, MPLS, VTP, STP.
purni
New Member
Posts:
15
Joined:
Wed Apr 20, 2011 10:05 pm
Certs:
preparing for ccna

Packet flow between same and different subnets--- PLZZZ help

Sun Jul 31, 2011 9:14 pm

I have assesmnet in the Network fundemanetals could you please help me in clarify some doubts .As of know i mentioned few doubts .

In the figure as shown PC1 has to communicate with PC2.
What i know is

1.Pc1 has its own routing table as its works on tcp/Ip suite.hence it has to reach the PC hence it first makes AND operation between ipaddress and its subnetmask of source .similarly performs same operation between ip address and subnetmask of destination if both are same the destination is on the same subnet ,if different destination is on the same subnet.

Lets consider both are different.hence it should pass through th default gateway i.e R1

1.How the Pc1 comes to know that It should send packet to Switch.
2.what is the process in the switch happens to pass packet to router.
3. what will be the source ip dest ip,source mac and destination mac when it is out of the pc i.e just enterd out of pc .


Thanks in advance for answering my questions and clearing my further doubts

Warm Regards,
purni.
Attachments
quest1.JPG
quest1.JPG (23.95 KiB) Viewed 2850 times

User avatar
davidrothera
Ultimate Member
Posts:
992
Joined:
Thu Jan 13, 2011 5:10 pm
Certs:
CCIE R&S #38338, CCNP, CCIP

Re: Packet flow between same and different subnets--- PLZZZ

Mon Aug 01, 2011 2:23 pm

This isn't the kind of site where we will do your homework for you but I would recommend re-reading into the OSI model and which layer different devices run at.

Aside from that, read into ARP and how it works.
---
David
CCIE R&S #38338, CCIP, CCNP

http://networkbroadcast.co.uk - My Blog
http://twitter.com/davidrothera

User avatar
mellowd
CCIE #38070
Posts:
13814
Joined:
Wed Jun 18, 2008 7:49 am
Certs:
CCIE (RS,SP), JNCIE-SP, BC-/SPNE/NP

Re: Packet flow between same and different subnets--- PLZZZ

Mon Aug 01, 2011 2:41 pm

You're asking us to clarify your doubts, but what are your doubts? All you've given us is a bunch of questions.

Tell us what you think, and we'll tell you where you've gone wrong.

User avatar
Kaiga
Senior Member
Posts:
341
Joined:
Thu Oct 21, 2010 9:08 am
Certs:
CCNA, CCENT, A+, Net+

Re: Packet flow between same and different subnets--- PLZZZ

Mon Aug 01, 2011 5:51 pm

For #1: ??? Don't Understand your question there.
For #2: Learn what a switch does based on it's knowledge of mac-addresses, whether it will flood, foward, or filter a frame.
For #3: Learn how a packet traverses a network. What happens to the IP address and MAC address in the headers of a packet when it leaves from one point to the other?
http://3rdlayer.wordpress.com/
See most people talk about the OSI model as having 7 layers but they don't mention layer 8 where a lot of the problems actually occur.

User avatar
eaadams
Post Whore
Posts:
2619
Joined:
Fri Mar 11, 2005 10:26 pm

Re: Packet flow between same and different subnets--- PLZZZ

Tue Aug 02, 2011 6:31 am

As it seems that you are a Cisco Networking Academy student I suggest that you lab this up in Packet Tracer and then observe the frame/packet flow and changes in the Simulation Mode. This is explained in the curriculum.

And why do the switches have an IP address?

Aubrey
The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. Alvin Toffler, "Future Shock" 1970

chrismarget
Senior Member
Posts:
387
Joined:
Wed Jan 26, 2011 3:38 pm

Re: Packet flow between same and different subnets--- PLZZZ

Tue Aug 02, 2011 8:03 am

As you can see from some of the responses, we're pretty knee-jerk about not *doing* people's homework around here. But your query is a better one that many.

I'd like to clear things up for you a bit.

it has to reach the PC hence it first makes AND operation between ipaddress and its subnetmask of source .similarly performs same operation between ip address and subnetmask of destination if both are same the destination is on the same subnet ,if different destination is on the same subnet.
Close. PC1 doesn't know the subnet mask of PC2. Think about it. What is the subnet mask used by the servers at http://www.google.com? We have no way of knowing. The operation here is about answering the question "is the destination on this subnet with me?" The answer comes from comparing (MyIP && MyMask) with (RemoteIP && MyMask). If these are the same, then destination is "on net" with me.

#1 switches are also known as "transparent bridges". Note the emphasis.

#2 and #3 are well covered in whatever text you're working from.

For #2, you'll be interested in encapsulation, ARP, and routing table lookups on the PC. Not necessarily in that order.

For #3, consider the scopes at which the various address types are relevant. For your purposes, L3 addresses are consistent end-to-end (don't get re-written), and Ethernet frames headers are discarded at every L3 hop.

purni
New Member
Posts:
15
Joined:
Wed Apr 20, 2011 10:05 pm
Certs:
preparing for ccna

Re: Packet flow between same and different subnets--- PLZZZ

Tue Aug 02, 2011 9:14 am

This is not a homw work actually one of my interviewques which i couldn't asnswerd properly foe some questions.
It seems like you people thinking that i brought this question to you without trying this on my own. no thats not ok let me explain what i know.


Thanks to all for reacting to my post and answering.

@chrismarget--thank you so much for clearing a part of my doubt.

Suppose destination pc2 is not on the same subnet as the source is .
so now it has to send to the default gateway.we will configure the default gateway already at configuring time rit???
if yes
so the pc1 has to send the packet to the switch with the source ip=pc1 and destination ip=pc2 source mac=pc1 what will be the destination mac address when packet is comming to swicth??? what i heard is it is the royuters mac address.
my ans :as it is on another subnet pc1 sends arp broadcast request i need to send to destination ip(routers ip-default gateway) need mac address .so router give backs reply that i am destination ip with so and so mac address hence Packet reaches to the router
is that above is rit??
before that
when packet comes to switch it has the destination ip aadress hence it sends the broadcast if it is the first time it is sending then router replies back that i am with so and so ip address in the same way it find the mac address once it found the position of default gate way .

is it rit??


Sorry guys if i confusd you along with me.

Regards,
purni

User avatar
eaadams
Post Whore
Posts:
2619
Joined:
Fri Mar 11, 2005 10:26 pm

Re: Packet flow between same and different subnets--- PLZZZ

Tue Aug 02, 2011 10:03 am

First you said -
purni wrote:I have assesmnet in the Network fundemanetals could you please help me in clarify some doubts .
But you now you say -
purni wrote:This is not a homw work actually one of my interviewques which i couldn't asnswerd properly foe some questions
which is it?

Anyway, Layer 2 switches as shown in your topology do not make any forwarding decsions based on IP addresses. Switch forwarding decisions are based on the destination MAC address of the incoming frame and what the switch MAC Address Table contains.

Aubrey
The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. Alvin Toffler, "Future Shock" 1970

hotsauce
Member
Posts:
191
Joined:
Wed Jan 27, 2010 8:16 pm
Certs:
CCNA

Re: Packet flow between same and different subnets--- PLZZZ

Tue Aug 02, 2011 10:11 am

purni wrote:when packet comes to switch it has the destination ip aadress hence it sends the broadcast if it is the first time it is sending then router replies back that i am with so and so ip address in the same way it find the mac address once it found the position of default gate way .


Switches only look at layer 2 of the OSI model. That means it wouldn't look at the destination IP address but destination mac address. It will also look at the source mac address coming in on the port/interface, and this is how it learns about which mac address(es) is/are connected on that port. Going back to the destination mac address, if it doesn't have it in it's mac-address table, it will flood the frame out to all other interfaces except the one it came in from.

I don't know how far you are with your CCNA preparation and what materials you're using but it should be covered in a later part if you haven't reached this part yet.

hotsauce
Member
Posts:
191
Joined:
Wed Jan 27, 2010 8:16 pm
Certs:
CCNA

Re: Packet flow between same and different subnets--- PLZZZ

Tue Aug 02, 2011 10:20 am

This topology is pretty common during interviews for CCNA level topics.

Here are the concepts it tries to asks you:
1) Subnetting - How a PC knows that the remote host is in its subnet or different.
2) How ARP works?
3) How switches work? What a switch does when it doesn't have the destination mac-address in its table and when it does. How it learns the mac-address and populates in its table.
4) What will be the layer 2 and layer 3 addresses along the way before it hits the router and after it hits the router. This will check the concept that mac-address are local to the broadcast domain and doesn't cross layer 3 devices.

chrismarget
Senior Member
Posts:
387
Joined:
Wed Jan 26, 2011 3:38 pm

Re: Packet flow between same and different subnets--- PLZZZ

Tue Aug 02, 2011 10:28 am

purni wrote:Suppose destination pc2 is not on the same subnet as the source is .
so now it has to send to the default gateway.we will configure the default gateway already at configuring time rit???
Yes. Default gateway gets configured on "host" type devices at the time they're deployed.

so the pc1 has to send the packet to the switch with the source ip=pc1 and destination ip=pc2 source mac=pc1 what will be the destination mac address when packet is comming to swicth??? what i heard is it is the royuters mac address.
Yes. PC1 sends the frame to the router. The switch is transparent. Maybe there's no switch. Maybe there's a hub. Maybe there's a complicated topology of many switches. They're transparent to the IP hosts (hosts and routers) on the segment. This is why we usually draw L2 topologies as a single horizontal line. How many switches/hubs/repeaters/bridges are in the topology, and how they're connected is not relevant to Layer 3 discussions of routing.

my ans :as it is on another subnet pc1 sends arp broadcast request i need to send to destination ip(routers ip-default gateway) need mac address .so router give backs reply that i am destination ip with so and so mac address hence Packet reaches to the router
is that above is rit??
Yes. PC1 determines that destination is off-net. PC1 does a routing table lookup and finds the default gateway is the best (only) choice. PC1 needs the router's MAC address. PC1 pulls the MAC from local cache, or obtains it through a query. PC1 encapsulates the IP packet (destined for PC2) in a frame (destined for the gateway).

when packet comes to switch it has the destination ip aadress hence it sends the broadcast if it is the first time it is sending then router replies back that i am with so and so ip address in the same way it find the mac address once it found the position of default gate way .
No. Switch only looks at MAC header, not L2 header. Switch will send the frame to the port where the destination station (router) is attached. If switch doesn't know where router is attached, switch will send the frame to all ports except the port on which the frame arrived.

purni
New Member
Posts:
15
Joined:
Wed Apr 20, 2011 10:05 pm
Certs:
preparing for ccna

Re: Packet flow between same and different subnets--- PLZZZ

Wed Aug 03, 2011 9:09 am

eaadams wrote:First you said -
purni wrote:I have assesmnet in the Network fundemanetals could you please help me in clarify some doubts .
But you now you say -
purni wrote:This is not a homw work actually one of my interviewques which i couldn't asnswerd properly foe some questions
which is it?

Anyway, Layer 2 switches as shown in your topology do not make any forwarding decsions based on IP addresses. Switch forwarding decisions are based on the destination MAC address of the incoming frame and what the switch MAC Address Table contains.

Aubrey




we have three assesments out of three two will consider as a final. so i completed first assesment where i faced more problamatic to answer so preparing more detailed for next two assesments ok . i hope you understood.So what i told i.e. both are right you can consider both and nothing is there to tell lie .I hope i clarified your doubt

ohhh ok so to send the packet they should know destination MAC address ok.

anyway thanks for your immediate response.

purni
New Member
Posts:
15
Joined:
Wed Apr 20, 2011 10:05 pm
Certs:
preparing for ccna

Re: Packet flow between same and different subnets--- PLZZZ

Wed Aug 03, 2011 9:14 am

hotsauce wrote:
purni wrote:when packet comes to switch it has the destination ip aadress hence it sends the broadcast if it is the first time it is sending then router replies back that i am with so and so ip address in the same way it find the mac address once it found the position of default gate way .


Switches only look at layer 2 of the OSI model. That means it wouldn't look at the destination IP address but destination mac address. It will also look at the source mac address coming in on the port/interface, and this is how it learns about which mac address(es) is/are connected on that port. Going back to the destination mac address, if it doesn't have it in it's mac-address table, it will flood the frame out to all other interfaces except the one it came in from.

I don't know how far you are with your CCNA preparation and what materials you're using but it should be covered in a later part if you haven't reached this part yet.




thank you so much
i am going through todd lam book self prepaing that is the reason why getting all these probms

purni
New Member
Posts:
15
Joined:
Wed Apr 20, 2011 10:05 pm
Certs:
preparing for ccna

Re: Packet flow between same and different subnets--- PLZZZ

Wed Aug 03, 2011 9:20 am

hotsauce wrote:This topology is pretty common during interviews for CCNA level topics.

Here are the concepts it tries to asks you:
1) Subnetting - How a PC knows that the remote host is in its subnet or different.
2) How ARP works?
3) How switches work? What a switch does when it doesn't have the destination mac-address in its table and when it does. How it learns the mac-address and populates in its table.
4) What will be the layer 2 and layer 3 addresses along the way before it hits the router and after it hits the router. This will check the concept that mac-address are local to the broadcast domain and doesn't cross layer 3 devices.


Thank you i will go through these.

purni
New Member
Posts:
15
Joined:
Wed Apr 20, 2011 10:05 pm
Certs:
preparing for ccna

Re: Packet flow between same and different subnets--- PLZZZ

Wed Aug 03, 2011 9:29 am

chrismarget wrote:
purni wrote:Suppose destination pc2 is not on the same subnet as the source is .
so now it has to send to the default gateway.we will configure the default gateway already at configuring time rit???
Yes. Default gateway gets configured on "host" type devices at the time they're deployed.

so the pc1 has to send the packet to the switch with the source ip=pc1 and destination ip=pc2 source mac=pc1 what will be the destination mac address when packet is comming to swicth??? what i heard is it is the royuters mac address.
Yes. PC1 sends the frame to the router. The switch is transparent. Maybe there's no switch. Maybe there's a hub. Maybe there's a complicated topology of many switches. They're transparent to the IP hosts (hosts and routers) on the segment. This is why we usually draw L2 topologies as a single horizontal line. How many switches/hubs/repeaters/bridges are in the topology, and how they're connected is not relevant to Layer 3 discussions of routing.

my ans :as it is on another subnet pc1 sends arp broadcast request i need to send to destination ip(routers ip-default gateway) need mac address .so router give backs reply that i am destination ip with so and so mac address hence Packet reaches to the router
is that above is rit??
Yes. PC1 determines that destination is off-net. PC1 does a routing table lookup and finds the default gateway is the best (only) choice. PC1 needs the router's MAC address. PC1 pulls the MAC from local cache, or obtains it through a query. PC1 encapsulates the IP packet (destined for PC2) in a frame (destined for the gateway).

when packet comes to switch it has the destination ip aadress hence it sends the broadcast if it is the first time it is sending then router replies back that i am with so and so ip address in the same way it find the mac address once it found the position of default gate way .
No. Switch only looks at MAC header, not L2 header. Switch will send the frame to the port where the destination station (router) is attached. If switch doesn't know where router is attached, switch will send the frame to all ports except the port on which the frame arrived.





Thank you very much you cleared lot of doubts of me.

It was nice explaination even these are sill doubts .appreciate your patience for clarifying .

'

Return to Cisco Routing and Switching

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 38 guests