Encapsulating a data
chinaman
Inactive Imported Users Posts: 167
in CCNA & CCENT
I am reading again my Cisco press Intro book.
I would like to ask you regarding encapsulating the data.
Please correct me if I am wrong.
PC1 want to send a packet to PC2, but pc2 is on another network.
PC1 is conencted to R1 and R1 is connected to R2 using a point to point WAN conntection means either HDLC or PPP.
PC1 send packet to R1 but before that PC1 needs to encapsulate to enthernet or L2 BDU which adds DL Header and trailer. so the use of Protocol type in the frame is to identify what type of protocol if it's IP,IPX or Appletalk DDR.
When R1 rec. the ethernet frame it strips the DL H/T and create a new DL H/T due to that R1 connected to a Point to Point to R2 which use HDLC.
Base on the book, ARP is use to map the LLC to MAC address because router use a routing table to route a packet, router is only concerned with the network address like 192.10.1.0.
L3PDU use by router to route the packet and L2PDU is you to forward the packet by encapsulating to the correct Protocol Type ( HDLC, FR , ATM)
I just want to know what is left when stripping the DL H/T when R1 rec. the packet? and also if R1 forward the packet to R2 what will be the source of the packet ? is is the PC or the router1 mac address? but still the destination is the PC2 mac address.
Am I correct?
Thanks
I would like to ask you regarding encapsulating the data.
Please correct me if I am wrong.
PC1 want to send a packet to PC2, but pc2 is on another network.
PC1 is conencted to R1 and R1 is connected to R2 using a point to point WAN conntection means either HDLC or PPP.
PC1 send packet to R1 but before that PC1 needs to encapsulate to enthernet or L2 BDU which adds DL Header and trailer. so the use of Protocol type in the frame is to identify what type of protocol if it's IP,IPX or Appletalk DDR.
When R1 rec. the ethernet frame it strips the DL H/T and create a new DL H/T due to that R1 connected to a Point to Point to R2 which use HDLC.
Base on the book, ARP is use to map the LLC to MAC address because router use a routing table to route a packet, router is only concerned with the network address like 192.10.1.0.
L3PDU use by router to route the packet and L2PDU is you to forward the packet by encapsulating to the correct Protocol Type ( HDLC, FR , ATM)
I just want to know what is left when stripping the DL H/T when R1 rec. the packet? and also if R1 forward the packet to R2 what will be the source of the packet ? is is the PC or the router1 mac address? but still the destination is the PC2 mac address.
Am I correct?
Thanks
Comments
-
SV Member Posts: 166Please corect me if I am wrong. This is how I understand.
Lets say
* PC1's IP address is 192.168.0.5
* PC2's IP address is 192.168.2.5
* R1's Ethernet port's address is 192.168.0.1
* R2's Ethernet port's address is 192.168.2.1
* R1's Ethernet port's MAC address is AAAA(for example)
* R2's Ethernet port's MAC address is AABB(for example)
* PC2's MAC address is AACC(for example)
The packet R1 receives will have source IP address of PC1, destination IP address of PC2, and Destination MAC address of R1.
When R1 unpackes the packet, it will unpack items including the Network details. Once it realizes that the destination IP belongs to PC2, R1 will encapsulate data till NW layer with a new DL layer which will have the destination MAC of R2. But the source IP will still remain of PC1.
The same will be done by R2 and will replace the DL information with destination MAC of PC2 and source MAC of R2
When PC2 receives the packet, the destination IP will be of PC2, Destination MAC of PC2 , source IP of PC1 and source MAC of R2
Hope it helps !!Life is a journey... -
chinaman Inactive Imported Users Posts: 167You mean when R1 recieve the packet from PC1 with the source address of PC1 and the destination address of PC2.
But it's mac address will be the MAC address of Router1.
After recieving the packet to Router1 it will strips the ethernet DL H/T and create a new DL H/T to forward the packet to Router2 let say HDLC.
But when Router1 send the packet with the new data link H/T to R2
the source and destination address will remain or the 802.2.
Is that what you mean?
But the MAC address or 802.3 will be change when router1 send to router 2.
Thanks -
thedons Member Posts: 12 ■□□□□□□□□□MAC Addresses are only used on LANs. WAN connections use different layer 2 addressing schemes where necessary.
When sending from PC1 to PC2 the source and destination IP addresses will stay the same, they are used to mark the start and end of the journey the packet will take.
The layer 2 addresses (with 802.3 this is MAC addresses) are used to mark the start and end points of the current hop.
PC1 -> R1
R1 -> R2
R2 -> PC2
The WAN link will use a different layer 2 protocol: HDLC, and not 802.3 (Ethernet) and so the header and trailer used will be HDLC and not ethernet. HDLC is used on point to point connections and does not need source and destination addresses. HDLC L2 header carries information regarding the link instead of MAC address information.
Hope this clears things up. -
chinaman Inactive Imported Users Posts: 167Okay, you have a point, can you explain me this how data travels for example:
PC1 to R1
HDLC
R2 {{{FRAME RELAY}}}}R3
PC2
Now PC1 want to send to PC2 but before that it will pass first to each routers.
Now I want to know first PC1 to router 1
I know that going to R1, PC one needs to encapsulate to a packet with its source and destination address.
But it MAC address is R1 address, If it doesn't know the MAC of R1 it will issue an ARP request to learn the MAC of R1.
Now can you tell me what is the
source address
Destination address
MAC source address
MAC destination address.
as it travels to it's destination to PC2.
Please explain to me briefly what will be the source and destination address both in ethernet and WAN protocols.
PC1 to......PC2.
Let say R1 check the Protocol type and found out that it is an IP Packet.
THANKS, THIS IS A BIG HELP FOR ME. -
thedons Member Posts: 12 ■□□□□□□□□□chinaman wrote:Okay, you have a point, can you explain me this how data travels for example:
PC1 to R1
HDLC
R2 {{{FRAME RELAY}}}}R3
PC2
Now PC1 want to send to PC2 but before that it will pass first to each routers.
Now I want to know first PC1 to router 1
I know that going to R1, PC one needs to encapsulate to a packet with its source and destination address.
But it MAC address is R1 address, If it doesn't know the MAC of R1 it will issue an ARP request to learn the MAC of R1.
Now can you tell me what is the
source address
Destination address
MAC source address
MAC destination address.
as it travels to it's destination to PC2.
Please explain to me briefly what will be the source and destination address both in ethernet and WAN protocols.
PC1 to......PC2.
Let say R1 check the Protocol type and found out that it is an IP Packet.
THANKS, THIS IS A BIG HELP FOR ME.
OK.
Layer3
PC1 IP: 192.168.1.2
R1 ETH IP: 192.168.1.1
PC2 IP: 192.168.2.2
R3 ETH IP: 192.168.2.1
Layer2
PC1 MAC: AABB:CCDD:EEFF
R1 ETH MAC: AABB:CCEE:FFGG
R1 SER0: HDLC
R2 SER0: HDLC
R2 SER1: FR DLCI: 1024
R3 SER0: FR DLCI: 56
R3 ETH MAC: BBCC:DDFF:DD33
PC2 MAC: 1100:33CC:AA33
PC1 -> PC2
SRC IP: 192.168.1.2
DST IP: 192.168.2.2
These do not change through the whole journey.
PC1 -> R1
PC1 SRC MAC: AABB:CCDD:EEFF
R1 DST MAC: AABB:CCEE:FFGG
DST MAC is discovered using ARP
R1 uses the DST IP address to determine which interface to send the packet. Routing table says destination network 192.168.2.0 reachable through SERIAL 0
R1 -> R2
HDLC: Datalink headers are HDLC headers and contain connection information. Because R1 -> R2 is a point-to-point the source and destination are known without needing to be identified.
R2 uses the DST IP address to determine which interface to send the packet. Routing table says destination network 192.168.2.0 reachable through SERIAL 1
R2 -> R3
DST DLCI: 1024
Packet is sent into FR Cloud. FR routes the packet through the cloud along a pre-determined path. DLCI 1024 is mapped to DLCI 56 and the packet is routed to R3. Frame Relay is covered in Cisco 4 of the academy programme.
R3 uses the DST IP address to determine which interface to send the packet. Routing table says destination network 192.168.2.0 reachable through ETH port.
R3 -> PC2
R3 SRC MAC: BBCC:DDFF:DD33
PC2 DST MAC: 1100:33CC:AA33
DST MAC is discovered using ARP.
Ethernet works the same way regardless of the device. So routers access Ethernet networks in the same way that PCs do. What happens between routers is dependent on the type of network that the packet is travelling through. Each network has it's own protocols and packet structures at layer 2. A packet travelling through the internet will pass through many different types of network and it's layer 2 headers will change with each hop.
Another point to note is that ARP is an IP protocol. IPX networks use different methods to achieve the same ends. -
chinaman Inactive Imported Users Posts: 167Thanks, this one really helps.
One question, correct me if I'm wrong:
When R2 rec. the packet from R1 what will be the source and destination MAC address?
Is it the MAC of R1 which will be the source MAC address.
R2 will be the Destination MAC address.
BUT the source and destination still be the IP address of PC1 and PC2. -
thedons Member Posts: 12 ■□□□□□□□□□When R2 receives the packet from R1 it won't have a source and destination MAC address.
MAC addresses only apply to ethernet 802.3 networks and are not used by other L2 protocols such as HDLC and FR.
So the L2 headers will have HDLC information in, not ethernet information.
The packet will acquire MAC addresses again as the packet passes through the R3 ethernet interface on it's journey to PC2. -
chinaman Inactive Imported Users Posts: 167OIC, the source and mac address are only applicable to an ethernet network not in WAN connection but as it travels to WAN it will carry only the source and destination address with the necessary encapsulated WAN DL Protocols.
-
chinaman Inactive Imported Users Posts: 167I know switching is base on MAC address or Layer2 protocols.
As frame travels to switch, the source and destination MAC is carry out by the frame.
I am asking this ? because I rem. on my intro exam I have 4 questions and it is asking for the source and destination MAC address.
PC1
Switch1900 series
R1
HDLC
R2
>Switch1900
Server2000
Thanks my friend -
thedons Member Posts: 12 ■□□□□□□□□□You are correct. Switches use MAC addresses to make (semi-)intelligent decisions about which interface a packet should be forwarded to.
These addresses stop at the router. In your diagram, the switch on one side of the WAN would have no interaction with the switch on the other side of the WAN and the addresses stored in one would bear no relation to the addresses stored in the other.
Anyway, you are welcome. Any time. -
chinaman Inactive Imported Users Posts: 167Base on my scenario, for example PC1 wants to access the server but pc1 does not know how to go there "No idea about the IP, MAC address"
So pc1 issue an ARP request to the switch, on this switch 3 host is connected but they do know how to go to the server. Is this host will response to the request of PC1.
or the router or the switch? -
thedons Member Posts: 12 ■□□□□□□□□□In your scenario...
PC1 must at least know what PC2's IP Address is. PC1 will probably get PC2's IP Address via DNS or WINS.
PC1 will compare PC2's IP address with its own and will note that PC2's IP address is on a different network. PC1 will then send an ARP request for it's default gateway. The switch will forward the ARP Broadcast out of every port and the router R1 will respond with it's MAC address.
PC1 will then forward the packet to the router using the following settings:
Source IP Address: PC1
Destination IP Address: PC2
Source MAC Address: PC1
Destination MAC Address: R1