Question

how does two hosts communicate with a new router

How does two hosts connected to a new router communicate. What will be the ip addresses, mac addresses in the packed when it leaves host a and reached router and what will be the ip and mac when the router routes the packed to its exit interface and what will be the ip and mac when it leaves the exit interface.

Thanks in advance.
G.Muniaraj

Discussion is locked
Follow
Reply to: how does two hosts communicate with a new router
PLEASE NOTE: Do not post advertisements, offensive materials, profanity, or personal attacks. Please remember to be considerate of other members. If you are new to the CNET Forums, please read our CNET Forums FAQ. All submitted content is subject to our Terms of Use.
Reporting: how does two hosts communicate with a new router
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Comments
- Collapse -
Answer
Re: communication

How do you mean "hosts"?
And why do you want to know? Most people are happy when it works.

Kees

- Collapse -
how does two hosts communicate with a new router

I am a beginner in networking and preparing for my CCNA certification. Hosts i mean was there are two computers connected through a router inbetween.

- Collapse -
Most routers use a switched hub.

Since you used the singular word "router" and not routers, the connection is thus a LAN and no routing is occurring.
Bob

- Collapse -
Communication between the two hosts

Thanks BOB. My question here is if we have a router in between the two computers in a lan and the router is a new router which doesn't have any routing table entry. If the computer 1 tries to ping computer 2, how would the ping packet be parsed, because in our case the router is new, it doesn't have the data about the two connected computers with it.

- Collapse -
Sorry but is this about basic networking?

I'm not able to shrink a course in networking down to size and fit that here. But a stock router, unless it's one of those new ones with a firewall (which you can turn off!) will allow a ping from one machine to the next.

I wonder if the confusion is how to get the DNS resolution for those servers? That is, ping by address is going to be fine. Ping by name requires the DNS resolution which is not something you asked about. However that is widely discussed and documented.
Bob

- Collapse -
basic networking

yes bob. I am trying to understand that if the router in between two computers is configured with proper ip address and its routing table are empty(being a new router in the network). What will happen in the router when the host a tries to contact host b. Host A know the ip address of HOST b and router is set as default gateway for both host A and host B.

- Collapse -
In that case ...

the router sends the request from A to B. It simply functions as a hub.

And what do you mean with "the router is configured with proper ip address"? I never have to configure a router. It's plug and play.

Kees

- Collapse -
IN that case

Thanks Kees,
Wouldn't the router know the ip address to which the packet needs to be forwarded and its port through which the host b is connected.

My question was:
We have two hosts connected throught a router, say Host A and B and Router R.
Now if Host A is communication to Host B how will the router handle the packets that Host A is sending to Host B.

- Collapse -
Re: router

Yes, the router knows to what port B is connected.

Kees

- Collapse -
commerical router

The problem is he is not being clear because I suspect he does not understand the difference between a router and a switch. Problem is with commercial equipment how it operates depends how you configure it.

So the answer is and you need to look up this stuff.

If they are on the same subnet the machines will not use the default gateway and will arp each others IP to find the mac and send the data directly between each other not actually using the routing processor of the "router". They then only use the mac to communicate so your router is actually a switch.

If the machines are not on the same subnet they will each arp the corresponding gateway addresses. They will send all the default data to the mac address of the router. The router will issue arp on each of its interfaces to find the mac of each PC. The router DOES have routing table entries for each interface because they are CONNECTED interfaces. So when the router gets a packet he knows which interface to send it on and then looks in his ARP table for that interface and sends it to a corresponding mac.

Key here is to understand the difference between the ARP table,Routing table, and the Mac address tables.

- Collapse -
Answer
how does two hosts communicate with a new router

One router will supply DNS and DHCP (IP addresses), the other can be configured to be an access point. To achieve total coverage, run a CAT-5e cable from the main router to the access point (which will be located across the house), and have both use the same SSID.

CNET Forums