networking-forum.com
Community BlogCommunity Wiki * Register  * Search  * Login
View unanswered postsView active topics

All times are UTC - 6 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Jan 25, 2012 11:36 am 
Offline
Member
Member

Joined: Fri Dec 17, 2010 3:56 am
Posts: 156
Hi guy

i have this network(in packet tracer simulation)
Image

i make ping(send ICMP massage) from PC(192.168.2.2) to PC(192.168.1.2),
the IP header of massage carry:-
Source IP:192.168.2.2
Destination IP:192.168.1.2

but the massage NOT carry IP address of Fast Ethernet 0/0(Defult gateway of PC(192.168.2.2) )
Why the massage not carry IP address of Fast Ethernet 0/0?
Image


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 11:49 am 
Offline
CCIE #38070
CCIE #38070
User avatar

Joined: Wed Jun 18, 2008 7:49 am
Posts: 12425
Location: London, UK
Certs: CCIE ,CC-NP/IP, JNCIP-SP, JNCIS-ENT, BC-/SPNE/NP
Because the destination address is 192.168.1.2, not 2.2

However if you check the L2 header, you'll notice the frame that comes from PC1 has a destination MAC of the default gateway, but a destination IP of 192.168.1.2

_________________
www.mellowd.co.uk/ccie/


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 12:06 pm 
Offline
Member
Member

Joined: Fri Dec 17, 2010 3:56 am
Posts: 156
mellowd wrote:
Because the destination address is 192.168.1.2, not 2.2

i forgot,
i want to say
why massage of ICMP not carry, IP of fast Ethernet 0/1 192.168.2.1 (the gateway of 192.168.2.2)
mellowd wrote:
However if you check the L2 header, you'll notice the frame that comes from PC1 has a destination MAC of the default gateway, but a destination IP of 192.168.1.2

i notice that.
but if massage no have IP address of gateway
is that mean if i have the mac address of gateway there is no need for IP address?


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 12:19 pm 
Offline
CCIE #38070
CCIE #38070
User avatar

Joined: Wed Jun 18, 2008 7:49 am
Posts: 12425
Location: London, UK
Certs: CCIE ,CC-NP/IP, JNCIP-SP, JNCIS-ENT, BC-/SPNE/NP
No, think about how IP routing works for a second.

I need to send to 10.1.1.1 - My IP is 192.168.1.1 and my gateway is 192.168.1.254

When I need to send to 10.1.1.1, I notice that it's not in my local subnet. So I need to send the packet to my default gateway. MY gateway is in my subnet so I send an ARP request for 192.168.1.254 to respond with it's MAC address. The router respons with it's MAC address. I then send the frame to my router but with the destination IP of still 10.1.1.1. That packet is encapsulated in an L2 frame that has my routers MAC address in it. This means the router will receive that frame as it's listening to that MAC address. It then strips off the L2 header and sees that the packet needs to get to 10.1.1.1 - It looks in it's route table and sends it off to whever it needs to go. This continues at every single hop until it gets to a router that has an interface in the 10.1.1.1 range. It'll then send it off to the PC.

Source and destination IP will not change end to end, unless of course it's being NAT'd somewhere along the path

_________________
www.mellowd.co.uk/ccie/


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 12:36 pm 
Offline
Member
Member

Joined: Fri Dec 17, 2010 3:56 am
Posts: 156
thank you very much mellowd for this explain.
Now i understand the mechanism .


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: FaceBook [Linkcheck] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group