×

Loading...
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!

Briefly say:...

本文发表在 rolia.net 枫下论坛It's because router maintains a routing table (basically IP address<->MAC address and other informations).

An IP packet always contains the destination and source IP addresses(32bits). When a packet is transfered across the network, only the MAC address in layer 1 frame is changed hop by hop.

In a LAN, usually your computer stores the map between IP address and MAC adress, so you can directly add destination MAC address into ethernet frame, and puts the frame on the bus. If you find the IP address is not in the same sub-net as yours, you send the IP packet to the proxy/router with proxy/router's MAC address to let them forward the IP packet. When proxy/router check the IP address in the IP packet, they also ckeck their routing table to see if they can send the IP packet directly to the destination computer which is connected with the router. Otherwise, they forward the IP packet to the next better router according to the routing table and routing protocols. Then again and again until the packet arrives the destination.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 请问网络高手们,知道TCP IP ROUTING, UDP IP MULTICAST ROUTING的原理,可是UDP IP UNICAST ROUTING 的原理是什么?
    • 1, I don't see anything between routing & trasportion layer. 2, unicast is uni-cast.
      • 比如说,如果CLIENT在ROUTER和FIREWALL后面,IP/UDP包的目的地址是什么?SUBNET IP(192.168.*.*)还是ROUTER的IP?UNI-CAST是从SERVER开始的,ROUTER里怎么会有CLIENT的IP MAP?
        • UPUP
        • NAT
          • 一般作STREAMING的时候是:1 CLIENT发起一个TCP连接,SERVER传给CLIENT一个SDP(rfc2327) 2 SERVER根据SDP里的地址信息发UDP PACKET 3 CLIENT根据SDP里的地址信息接受UDP PACKET
            如果是NAT,SERVER发的UDP PACKET的目标地址应该是ROUTER,ROUTER再MAP成SUBNET里CLIENT的IP。问题是SERVER怎么知道ROUTER的地址?ROUTER怎么知道2里的UDP PACKET是发给自己SUBNET里的这个CLIENT的?就凭TCP CONNECTION里建立的那个MAP?UDP和TCP用的是不同的PORT,ROUTER不管?
            • You have to configure port forwarding on the router. And in the case of RFC2327, even port forwarding would not work, cause the port is usually dynamic. The only solution is
              to use some kind of proxy. I know there's a H.323 proxy (for win32 and unix), but never used it.
              • Thanks Dennis, I am not worry about this, Admin will handle it. what I want to know is, how to fill the destination ip in sdp so that subnet client can get those udp packet?
                • Are you trying to implement a streaming server? You can just fill in the destination with whatever the client told you (ip, udp port).
                  I don't think you need to worry about how the packet will get to the client because it's up to the firewall admin on the client side to determine how to handle that if they want to support it.
                  • yes. but unfortunately, I am the client this time, should I give server local ip(192.168.*.*) or should I talk to admin to assign some static ip map to server?
                    • "SDP is purely a format for session description "(RFC 2327). Which means SDP only describe the dialog schema between client and server and has not thing to do with routing
                      stateful firewalls with NAT will also keep track of the outgoing
                      source port (even if they translate it), so when the connection comes
                      back from the server -- it will know where the connection maps
                      • what I am not sure is "the connection comes back from the server" or "the connection comes from the server". it is a one way udp session, not tcp, is this connection initiated by server or client?
                        • the client initiate the session
                    • Just give the server local ip as if there's no firewall in between. But you'll probably need to talk to your admin so that he knows how to handle that on the firewall.
            • Briefly say:...
              本文发表在 rolia.net 枫下论坛It's because router maintains a routing table (basically IP address<->MAC address and other informations).

              An IP packet always contains the destination and source IP addresses(32bits). When a packet is transfered across the network, only the MAC address in layer 1 frame is changed hop by hop.

              In a LAN, usually your computer stores the map between IP address and MAC adress, so you can directly add destination MAC address into ethernet frame, and puts the frame on the bus. If you find the IP address is not in the same sub-net as yours, you send the IP packet to the proxy/router with proxy/router's MAC address to let them forward the IP packet. When proxy/router check the IP address in the IP packet, they also ckeck their routing table to see if they can send the IP packet directly to the destination computer which is connected with the router. Otherwise, they forward the IP packet to the next better router according to the routing table and routing protocols. Then again and again until the packet arrives the destination.更多精彩文章及讨论,请光临枫下论坛 rolia.net
              • Sorry, the answer may not be what you need, I paste my notes directly, it's too much. I know D class IP address segment is used for multicast and IGMP protocol is used to control multicast, so you can check IGMP
                • I just get confused for streaming. when you watch streaming video by realplayer in your office's subnet(192.168.*.*), that's a uni-cast, but how is the udp connection established? what's the destination ip in sdp?
    • easy if you know the protocol stacks
      look at Protocol stacks, you will find the answer. PopUp operator can be 1 or many up layer instances.