Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Big Problem with multicasting.

Big Problem with multicasting.

Scheduled Pinned Locked Moved C#
csharpsysadminhelp
8 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HAHAHA_NEXT
    wrote on last edited by
    #1

    I had a huge problem with multicast adresses. I need to send a multicast packet to my local area network,with all its IPs so other computer will been able to estabilish a TCP/IP connection. My computer has 3 local area connections(1 for internet, 1 for internal network, and 1 for god know what...), and when i send packets it *Randomly* chooses a local area connection and send data to it. Is there a way i can choose the local area connection (in CSharp) or can i send my packets to All the connections at once.

    L 1 Reply Last reply
    0
    • H HAHAHA_NEXT

      I had a huge problem with multicast adresses. I need to send a multicast packet to my local area network,with all its IPs so other computer will been able to estabilish a TCP/IP connection. My computer has 3 local area connections(1 for internet, 1 for internal network, and 1 for god know what...), and when i send packets it *Randomly* chooses a local area connection and send data to it. Is there a way i can choose the local area connection (in CSharp) or can i send my packets to All the connections at once.

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Sounds like a routing problem rather. netsh | ipconfig leppie::AllocCPArticle("Zee blog");
      Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.

      H 1 Reply Last reply
      0
      • L leppie

        Sounds like a routing problem rather. netsh | ipconfig leppie::AllocCPArticle("Zee blog");
        Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.

        H Offline
        H Offline
        HAHAHA_NEXT
        wrote on last edited by
        #3

        It can't be a routing problem since there is no routers at all. It is simply the stupic computer choose randomly to what connection (or nick card) it sends its data. Ex: I have 2 nick cards. With 2 assigned adresses: 192.168.0.1 and 169.254.111.190 The i send my multicast packet, but i never know which one it will uses. Since my internal network passes throught 192.168.0.1, it it uses the other nick card, i had just send my message god know where. Thus i need a way to either send the message to both of them or to choose which one. (Windows is simple for people who use it for internet word and emails, but it is a constant headache for experts:mad:)

        H L 2 Replies Last reply
        0
        • H HAHAHA_NEXT

          It can't be a routing problem since there is no routers at all. It is simply the stupic computer choose randomly to what connection (or nick card) it sends its data. Ex: I have 2 nick cards. With 2 assigned adresses: 192.168.0.1 and 169.254.111.190 The i send my multicast packet, but i never know which one it will uses. Since my internal network passes throught 192.168.0.1, it it uses the other nick card, i had just send my message god know where. Thus i need a way to either send the message to both of them or to choose which one. (Windows is simple for people who use it for internet word and emails, but it is a constant headache for experts:mad:)

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          "routing" has to do with a route table, not necessarily a router (which is really just a hardware device with a programmable route table and is dedicated to routing packets). TCP is configured to route packets through a particular network interface card (NIC) depending on the destination address. Any computer with a TCP stack uses a route table.

          -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

          1 Reply Last reply
          0
          • H HAHAHA_NEXT

            It can't be a routing problem since there is no routers at all. It is simply the stupic computer choose randomly to what connection (or nick card) it sends its data. Ex: I have 2 nick cards. With 2 assigned adresses: 192.168.0.1 and 169.254.111.190 The i send my multicast packet, but i never know which one it will uses. Since my internal network passes throught 192.168.0.1, it it uses the other nick card, i had just send my message god know where. Thus i need a way to either send the message to both of them or to choose which one. (Windows is simple for people who use it for internet word and emails, but it is a constant headache for experts:mad:)

            L Offline
            L Offline
            leppie
            wrote on last edited by
            #5

            try this:

            D:\Documents and Settings\lepp>netstat -r

            Route Table

            Interface List
            0x1 ........................... MS TCP Loopback interface
            0x2 ...00 50 56 c0 00 08 ...... VMware Virtual Ethernet Adapter for VMnet8
            0x3 ...00 50 56 c0 00 01 ...... VMware Virtual Ethernet Adapter for VMnet1
            0x10005 ...00 05 1c 05 9c 67 ...... Realtek RTL8139/810X Family PCI Fast Ethernet NIC

            ===========================================================================
            Active Routes:
            Network Destination Netmask Gateway Interface Metric
            0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.2 20
            62.47.38.202 255.255.255.255 192.168.0.1 192.168.0.2 20
            127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
            192.168.0.0 255.255.255.0 192.168.0.2 192.168.0.2 20
            192.168.0.2 255.255.255.255 127.0.0.1 127.0.0.1 20
            192.168.0.255 255.255.255.255 192.168.0.2 192.168.0.2 20
            192.168.213.0 255.255.255.0 192.168.213.1 192.168.213.1 20
            192.168.213.1 255.255.255.255 127.0.0.1 127.0.0.1 20
            192.168.213.255 255.255.255.255 192.168.213.1 192.168.213.1 20
            192.168.225.0 255.255.255.0 192.168.225.1 192.168.225.1 20
            192.168.225.1 255.255.255.255 127.0.0.1 127.0.0.1 20
            192.168.225.255 255.255.255.255 192.168.225.1 192.168.225.1 20
            217.84.117.73 255.255.255.255 192.168.0.1 192.168.0.2 20
            ** 224.0.0.0 240.0.0.0 192.168.0.2 192.168.0.2 20
            224.0.0.0 240.0.0.0 192.168.213.1 192.168.213.1 20
            224.0.0.0 240.0.0.0 192.168.225.1 192.168.225.1 20**
            255.255.255.255 255.255.255.255 192.168.0.2 192.168.0.2 1
            255.255.255.255 255.255.255.255 192.168.213.1 192.168.213.1 1
            255.255.255.255 255.255.255.255 192.168.225.1 192.168.225.1 1
            Default Gateway: 192.168.0.1

            Persistent Routes:
            None

            You can clearly see that each route is properly mapped. Use route to modify. leppie::

            H 1 Reply Last reply
            0
            • L leppie

              try this:

              D:\Documents and Settings\lepp>netstat -r

              Route Table

              Interface List
              0x1 ........................... MS TCP Loopback interface
              0x2 ...00 50 56 c0 00 08 ...... VMware Virtual Ethernet Adapter for VMnet8
              0x3 ...00 50 56 c0 00 01 ...... VMware Virtual Ethernet Adapter for VMnet1
              0x10005 ...00 05 1c 05 9c 67 ...... Realtek RTL8139/810X Family PCI Fast Ethernet NIC

              ===========================================================================
              Active Routes:
              Network Destination Netmask Gateway Interface Metric
              0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.2 20
              62.47.38.202 255.255.255.255 192.168.0.1 192.168.0.2 20
              127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
              192.168.0.0 255.255.255.0 192.168.0.2 192.168.0.2 20
              192.168.0.2 255.255.255.255 127.0.0.1 127.0.0.1 20
              192.168.0.255 255.255.255.255 192.168.0.2 192.168.0.2 20
              192.168.213.0 255.255.255.0 192.168.213.1 192.168.213.1 20
              192.168.213.1 255.255.255.255 127.0.0.1 127.0.0.1 20
              192.168.213.255 255.255.255.255 192.168.213.1 192.168.213.1 20
              192.168.225.0 255.255.255.0 192.168.225.1 192.168.225.1 20
              192.168.225.1 255.255.255.255 127.0.0.1 127.0.0.1 20
              192.168.225.255 255.255.255.255 192.168.225.1 192.168.225.1 20
              217.84.117.73 255.255.255.255 192.168.0.1 192.168.0.2 20
              ** 224.0.0.0 240.0.0.0 192.168.0.2 192.168.0.2 20
              224.0.0.0 240.0.0.0 192.168.213.1 192.168.213.1 20
              224.0.0.0 240.0.0.0 192.168.225.1 192.168.225.1 20**
              255.255.255.255 255.255.255.255 192.168.0.2 192.168.0.2 1
              255.255.255.255 255.255.255.255 192.168.213.1 192.168.213.1 1
              255.255.255.255 255.255.255.255 192.168.225.1 192.168.225.1 1
              Default Gateway: 192.168.0.1

              Persistent Routes:
              None

              You can clearly see that each route is properly mapped. Use route to modify. leppie::

              H Offline
              H Offline
              HAHAHA_NEXT
              wrote on last edited by
              #6

              But this doesn solve my problem: Here is the my route table (The good info only). 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 169.254.111.190 169.254.111.190 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 Currently it uses 169.254.111.190 to send my multicast packets to. Now if i disable the 169.254.111.190 my routing table would be: 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 and it will send the ulticast packets to 65.92.106.255 IF i disable this lat one i will get: 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 and my data would be send to 192.168.100.1 Now if i connect the other 2 i will get 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 169.254.111.190 169.254.111.190 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 and the data would be sent to 192.168.100.1 Thus you se, depending on some strange criteria, i never know where my data would be send to ? It can be any of these 3. 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 169.254.111.190 169.254.111.190 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 I can do like send the data to the first one, but it will create several problems like with Unreal Tournement when you try to play on LAN and can not login. Thus does anybody know how can i change it using CSharp. (Without disabling all the stuff, to which i will probably not have access anyway in the real world).

              A 1 Reply Last reply
              0
              • H HAHAHA_NEXT

                But this doesn solve my problem: Here is the my route table (The good info only). 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 169.254.111.190 169.254.111.190 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 Currently it uses 169.254.111.190 to send my multicast packets to. Now if i disable the 169.254.111.190 my routing table would be: 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 and it will send the ulticast packets to 65.92.106.255 IF i disable this lat one i will get: 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 and my data would be send to 192.168.100.1 Now if i connect the other 2 i will get 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 169.254.111.190 169.254.111.190 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 and the data would be sent to 192.168.100.1 Thus you se, depending on some strange criteria, i never know where my data would be send to ? It can be any of these 3. 224.0.0.0 224.0.0.0 65.92.106.225 65.92.106.225 1 224.0.0.0 224.0.0.0 169.254.111.190 169.254.111.190 1 224.0.0.0 224.0.0.0 192.168.100.1 192.168.100.1 1 I can do like send the data to the first one, but it will create several problems like with Unreal Tournement when you try to play on LAN and can not login. Thus does anybody know how can i change it using CSharp. (Without disabling all the stuff, to which i will probably not have access anyway in the real world).

                A Offline
                A Offline
                Alois Kraus
                wrote on last edited by
                #7

                Your net mask seems to be very odd. are you sure you want 224.0.0.0 as net mask for all your connections. Keep also in mind that the network metric is 1 for all your connections. This number is used to decide which connection to choose if several routes are possible the route with the least metric number will be used.

                H 1 Reply Last reply
                0
                • A Alois Kraus

                  Your net mask seems to be very odd. are you sure you want 224.0.0.0 as net mask for all your connections. Keep also in mind that the network metric is 1 for all your connections. This number is used to decide which connection to choose if several routes are possible the route with the least metric number will be used.

                  H Offline
                  H Offline
                  HAHAHA_NEXT
                  wrote on last edited by
                  #8

                  I only put 224.0.0.0 because it is the only one i care about( multicast mask). The full thing would be too big to display. I am aware of metrics, but i don't want to modify them since the application i am making is a game and you dont wont a game scrapping all your network info :).

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups