0

Assume that all bridge table was empty (or at least don't have source and destination of my connection ) and want to update their bridge table with my sending packet (when I send packet all bridge understand where "Sender Host" are and when "Receiver Host" send ACK signal all bridge find where the "Receiver Host" are ) but what happen if at first my sender Host send UDP (in theory big UPD packet) packet (that don't need ACK signal) then all the bridge in the path must broadcast packet in all port and never understand the exact path.

I don't know in practice it was possible or not but I think in theory it can happen.

Amirreza
  • 684
  • 2
  • 7
  • 12
  • This is a little confusing. What exactly is your question? Whose routing table do you want to update? Please clarify. – wolfgangsz Oct 04 '10 at 09:30
  • @wolfgang all the router in path between 2 hosts. – Amirreza Oct 04 '10 at 09:48
  • In the typical case, the routers in-between your hosts will NOT accept any routing update you are wanting to make to them. Or, at least, they SHOULD not accept routing updates unless they're signed with the right key. – Vatine Oct 04 '10 at 10:17
  • I think the question is "How are routing tables generated when there's only a single packet generated between two hosts" – Ben Quick Oct 04 '10 at 10:56
  • @ben not exactly I mean "How are routing tables generated when there's no acknowledge between two hosts" – Amirreza Oct 04 '10 at 11:58
  • Why does one host have to acknowledge? The router needs to shift the packet to the right network, it doesn't care if the host does anything of value with the traffic surely? – Ben Quick Oct 04 '10 at 12:23
  • @ben at first router don't know how to route packet because both host are new for them so their must update their routing table by path pf packet to receiver and path of ACK from receiver to sender otherwise all router must broadcast packet to all of their port.(I don't know I can tell my point or not) – Amirreza Oct 04 '10 at 13:52
  • You look up the destination address in your routing tables. If you have an entry for the specified network, then you forward the packet to which ever next hop over which ever interface is most suitable. If you don't have a route for the network in question, then you use your default route. A two way conversation isn't required – Ben Quick Oct 04 '10 at 14:50

2 Answers2

2

I'm not sure I really understand what you're asking, but I think you may be confused on how routing works. A routing table isn't built based on a packet passing through a router. A router has to know where to send a packet before the packet arrives, or else the packet will get dropped.

Also, generally routers do not know the full path a packet will travel. All they know about (or care about) is their next hop.

The only tables I can think of that are updated in a manner somewhat similar to what I think you're talking about are ARP tables. Those get updated dynamically when a packet is sent, after making an ARP request.

Can you clarify what question you're asking?

Christopher Cashell
  • 9,128
  • 2
  • 32
  • 44
  • when I want to send packet to "Host A" that was added to network just now (no one know where it's added) I think all router must broadcast the packet to all of their port so "Host A" receive it. or I am wrong and misunderstand something? – Amirreza Oct 04 '10 at 19:37
  • I think you're misunderstanding. First of all, any host added to the network will have to be part of a subnet that is known to the routers or switches (depending on on the network) of the network. When a host tries to talk to that new destination host, it hands its packet to its switch, which will either pass it directly to the destination host (if the host is on the same switch) or to a router which will forward the packet on based on the router's already known routing tables. Also remember, in most cases a host is not connected directly to a router, it's connected to a switch. – Christopher Cashell Oct 04 '10 at 20:06
  • @amirreza you seem to be mixing up routing and switching – Ben Quick Oct 05 '10 at 09:06
  • @ben Yes I think so. – Amirreza Oct 05 '10 at 09:08
  • There's some reading you can do to help your understanding http://wiki.answers.com/Q/What_is_the_difference_between_router_and_switch http://www.cisco.com/cisco/web/solutions/small_business/resource_center/articles/connect_employees_and_offices/what_is_a_network_switch/index.html http://www.webopedia.com/DidYouKnow/Hardware_Software/2006/router_switch_hub.asp http://www.google.co.uk/#sclient=psy&hl=en&q=differences+between+routers+and+switches&aq=f&aqi=g1g-o1&aql=&oq=&gs_rfai=&pbx=1&fp=a882380c91775e70 – Ben Quick Oct 05 '10 at 09:30
1

If we take a hypothetical switch A without a layer 2 forwarding table (mac-address table, bridge table, whatever you want to call it), we can equally well assume that there is no ARP information on the hosts connected to the switch.

So, in order to send the UDP packet, the sending host (A) needs to know the MAC address of the receiving host (B). It will send a broadcast ARP request, asking what MAC address has the given IP.

This will enter host A's MAC address into the forwarding table. After that, host B will see the ARP request and respond. This will enter host B's MAC address into the forwarding table.

If, for some obscure reason, there is ARP resolution in place, but nothing in the switch's forwarding table, the switch will flood the packet(s) with unknown MAC addresses onto all ports (except, normally, the port the packet came from).

Vatine
  • 5,440
  • 25
  • 24
  • can you post some reference for this pleas. – Amirreza Oct 07 '10 at 12:59
  • if I get right you said before Host A send it's packet it must broadcast ARP request? and after that know the exact path to Host B (so middle bridge no need of broadcast the UDP package to all of their port)? at the end you said "for some obscure reason, there is ARP resolution in place, but nothing in the switch's forwarding table, the switch will flood the packet(s)" can you explain what is obscure reason exactly? – Amirreza Oct 07 '10 at 13:07
  • @Amirreza: Normally, the MAC address table is pretty static, once populated and doesn't time out. ARP entries do time out (varying between 5 minutes and a couple of hours, depending on the kit). So having ARP tables populated on the hosts, but no forwarding table on the switch would be pretty unlikely (although possible). – Vatine Oct 08 '10 at 09:13