FAQ  •  Search  •  Profile  •  Log in to check your private messages  •  Log in
 Orbitals,Xbox IP changing, bluescreens explained. View next topic
View previous topic
Post new topicReply to topic
Author Message
TheDaddy



Joined: 30 Jul 2006
Posts: 0

PostPosted: Fri May 28, 2004 9:11 am Reply with quoteBack to top

Hey everyone,

I've got 5 minutes spare, so I thought I'd go into some detail about the orbitals, and explain the thing where ure Xbox IP changes when Kai is running, and tell people who get the bluescreen how to prevent it until we fix the "Choose LAN" thing in kaiConfig.

Orbitals
--------

Most tunelling services have a server. It's like a list server, showing who is online, what they're playing, and most importantly what their IP address is.

Kai takes this concept a step further. Take for example the fact that I live in the UK.. my connection to XBC's server is transatlantic - so it feels a bit slot (this obviously doesnt affect *gaming*) - but getting lists of games etc. is slow. An orbital is basically a server like these - with a couple of differences Very Happy.. See, we can have as many servers as we want - we have 2 or 3 in the USA, 2 in the UK, and a number in europe. Eventually we will add Asian and Australian nodes to the network. These orb-servers are all linked to each other, so when I log in and attach to one of the UK orbs, all the other orbs know and tell their users - so jmel, when attached to a USA orb, knows that i'm online.

Seems simple I know Very Happy - but anything "distributed" like that is basically an absolute asshole to debug. Lets just think what happens when you join an arena..

1.) Your orbital gets your "I need to go into Arena/Xbox message"
2.) It checks locally to see if there's a reason why you wouldnt be allowed to (banned, group membership required, whatever).
3.) If its ok, it sets you as in there, and tell all *its* other people in areba/xbox that you're there.
4.) It sends a list of people it knows about in arena/xbox down to you.
5.) It then tells *all* the other orbs that you've gone to arena/xbox.
6.) Each other orb tells locally attached clients that you're in arena/xbox.
7.) Each other orb tells your orb who *it* has thats in arena/xbox - and your orb forwards it back down to you.

All that happens in under a second, and the orbs are all over the world. Thats just one function of an orb - there are hundreds - like chatting Very Happy

We chose to use this distributed architecture for the orbs mainly for speed - but also because it gives us some protection against server failures. I know Tod sometimes find it difficult over at XBC - because if his server goes down or cant be reached for some routing issue, about 2 million screaming people come hunting him down. We didn't fancy that Smile .. Hence , with the orb, you automatically attach to which ever one is closest to you - but if thats down, you'll just attach to the next nearest.

The orbs arent dependant on any central server - and they're all run by members of Kai's community.

I'll talk more about orbs another time - once the damn things are able to count people in arenas properly Razz ..

DHCP / My Xbox IP Changes When Kai is Running!!
-----------------------------------------------------------

GOOD!! It's meant to do that. That allows you to use homebrew things like emu's, games, and many other wonderful things. Lets find out why we need to give it an IP Very Happy

Ok.. lets say my xbox gets it IP addy from my router... its gonna end up with something like 192.168.0.3 ... no problem there, but the problem comes in when you start tunelling to other people.. I mean, it's very, very likely that someone else in my arena is gonna have an xbox which is also on 192.168.0.3 - hence you get that little balloon thing saying "IP Conflict". Until yesterday's update, Kai was borked in that respect - y'all were getting IP conflicts all the time - you wont get them now.

So, Kai gives your Xbox an IP - but how do we know they will all be different? Well, actually, Kai gives *all* your consoles IP addresses, not just homebrew xbox. They are like this:

GCN = 10.254.X.Y
PS2 = 10.253.X.Y
XBOX = 10.252.X.Y (all subnet 255.255.0.0)

The X and Y are made from the last 2 digits of your Mac address (each console in the world has a unique MAC address).

Any network ppl will immediately say "thats not perfect - its possible for X and Y to be the same!!!" ... True, but it's a 1 in 256^2 ( 1 in 65535 ) chance - and i'll take those odds Razz.

So - yeah - Kai will autoconfig your consoles.. it does it to allow them to work with other peoples consoles on the net, without making IP conflicts. So don't worry about it, if you need your old ip address back, just close Kai and reboot your console.

Blue Screens / Horrible Reboots
-------------------------------------

This is an annoying issue with WinPCap .. Basically people who have this will be like "everythings cool when i go into arena and after a bit my PC reboots / BSOD's"

It's to do with how Kai monitors and locks NIC cards using winpcap. We're gonna try to stop it happening, but for now, do this:

1.) Start Kai - DO NOT log in. Leave it on the login screen.
2.) Turn console on - look for games (no, dont host - actually try to join a game - there wont be one there, but dont worry). This will make Kai lock your network adapter.
3.) Log into Kai... it wont bail out now..

More soon Very HappyVery Happy

TD
View user's profileSend private message
xboxgeek
Team XLink Administrator
Team XLink Administrator


Joined: 21 May 2004
Posts: 357

PostPosted: Fri May 28, 2004 9:44 am Reply with quoteBack to top

Good overview TD. It's nice to know how it all fits together Razz

Cheers
View user's profileSend private message
[FUNK]
Team XLink Administrator
Team XLink Administrator


Joined: 21 May 2004
Posts: 3354

PostPosted: Fri May 28, 2004 2:27 pm Reply with quoteBack to top

xboxgeek wrote:
Good overview TD. It's nice to know how it all fits together Razz

Cheers

I agree, nice TD.

_________________
Funk!
View user's profileSend private message
dk.psychosematic
Kai Regular
Kai Regular


Joined: 24 May 2004
Posts: 179
Location: USA - Florida

PostPosted: Fri May 28, 2004 2:37 pm Reply with quoteBack to top

I was wondering how all the "orbs" talked to each other. Thanks TD that was very enlightening!!

-dk.psychosematic
View user's profileSend private messageVisit poster's websiteAIM AddressMSN Messenger
CT
Kai Beginner
Kai Beginner


Joined: 21 May 2004
Posts: 3
Location: Canada

PostPosted: Fri May 28, 2004 3:02 pm Reply with quoteBack to top

I'm still confused about the IP assignment thing. My xbox IP address may be 192.168.0.3 but that's an address that's local to my lan/subnet. The IP address assigned to me by my isp is very different, obviously, as it needs to appear on their subnet.

It seems to me that Kai merely needs to provide a mapping between the internal xbox IP address and the external internet IP addresses of those people who are connected to me. The reason I say this is because the data in this case is being tunneled through my PC and not sent directly on the internet.

Maybe I'm over-simplifying?
View user's profileSend private message
GoatNinja
Kai Regular
Kai Regular


Joined: 21 May 2004
Posts: 119
Location: Canada

PostPosted: Fri May 28, 2004 3:16 pm Reply with quoteBack to top

That took 5 minutes!!! would have taken me literally 5 hours, no wonder it takes me weeks to finish papers at school Laughing
Its amazing you find the time to code and write this for the end users... I hope they pay you well at your 'real job'

I'm a little confused about the ip assingning by kai. I have my xbox with a static ip and was wondering if this would cause problems....I am getting a second "unsuccesfully configured" xbox in my performance tab along with one that is (i only have 1 box).
I've also noticed in the firewall rules of my router's firmware that kai used to forward the ports 34518 for xlink data and 34519 for xlink control (this may have been done by a previous version of xlink. This has nothing to do with the ip issue but since i was getting problems on and off, i forwarded the port 30000 in the firmware manually and in kai config and i was able to play. However i was getting more lag than usual with this setup and noticed in my firmwares log that I was getting this message "Land Attack UDP Port(3074) Detect -> Packet Dropped" several times.
I was wondering if this 'packet dropping', port setup and/or ip configurations had anything to do with it. Would opening a range of ports in 'port triggering' help?

Thanks!
View user's profileSend private messageMSN Messenger
DIE-HARD
Team XLink Administrator
Team XLink Administrator


Joined: 25 Apr 2004
Posts: 2024
Location: USA - Utah

PostPosted: Fri May 28, 2004 3:20 pm Reply with quoteBack to top

OK so your xbox is 192.168.0.3, now say someone in the same arena as you has an pc with an ip of 192.168.0.3

Now kai tunnels the the traffic yes, so kai sends out a broadcast to his network saying it is from 192.168.0.3 on his network. Well his pc with that IP goes hey i didnt send that, and pops up an ip address conflict.

That make sence?

Kinda simplifyed but it should give you the idea.

Anyway this should not be an issue now.

_________________
XLink Kai.
GLOBAL NETWORK GAMING
DIE-HARD @ teamxlink.co.uk
View user's profileSend private messageVisit poster's websiteMSN Messenger
Devedander
Kai Regular
Kai Regular


Joined: 21 May 2004
Posts: 172
Location: USA - California

PostPosted: Fri May 28, 2004 9:00 pm Reply with quoteBack to top

I have to disagree with the no IP address conflict. It falls under the birthday paradox. Your fundamental flaw in figuring the likelihood of a collision of IPs is that you based it on 2 people in a room. With 2 people only the chance is 256 (number of possible combinations in a 2 digit hex number) squared (for 2 people). This is a long shot.

But add more people, and the chances do not go to 256^3 or to the fourth, chances increase of a conflict... and exponentially so.

The birthday paradox states that in a room of 20 people, with random birthdays the chances of 2 being exactly the same is about 50%. That is 365 keys possible to a solution that will be reached almost half the time. This means if a room contains 20 people, you have over a 50 percent chances (less keys than days in a year) that you will have a conflict of IPs if you base your IP on 256 keys.

For further info on the birthday paradox, please look here or search google http://science.howstuffworks.com/question261.htm
View user's profileSend private message
dasnk
Kai Beginner
Kai Beginner


Joined: 26 May 2004
Posts: 13
Location: United Kingdom

PostPosted: Fri May 28, 2004 9:54 pm Reply with quoteBack to top

Devedander wrote:
This means if a room contains 20 people, you have over a 50 percent chances


So, If a room contains 40 people there is over 100 percent chances? .. It is certain to happen?
View user's profileSend private message
Devedander
Kai Regular
Kai Regular


Joined: 21 May 2004
Posts: 172
Location: USA - California

PostPosted: Fri May 28, 2004 10:07 pm Reply with quoteBack to top

That's not quite how probablility works.

For instance you flip a coin, it has a 50 percent chances of being heads. But when you flip it twice it does not have a 100 percent chance of being heads one of thsoe times. It just has a 50% chance twice.

With 40 people I am not sure how big the chance is exactly, it is higher than 50% for sure though.

What I am saying is that this method of picking IPs (and IPs conflicts on any network are a BIG problem) is not good for anything over a small handful of people.

My good calculator has dead batts, but I think the formula for the probability of a collision would be:

Where x = number of keys total

1-(((x-1)/x)*((x-2)/x)*((x-3)/x)... ((x-(x-1))/x)) = chance of a collision.

Figure that out for any set of variables and you should get the odds you will get a collision. I just wrote that formula up though so it might be wrong, I don't have any where to reference it from but the forumla for proability is is pretty straight fowad and easy to find (I think there should have been an n! factorial in there but I just used x-# for x-n, you get the idea.)

EDIT: I think this is a little more clear and will fit into calculators better:

For x =number of keys total
n from 1 to x

1-((x-n!)/x)

I think that is it.
View user's profileSend private message
SPideRCyDE
Kai Beginner
Kai Beginner


Joined: 22 May 2004
Posts: 5
Location: USA - Florida

PostPosted: Mon May 31, 2004 2:08 am Reply with quoteBack to top

"Seems simple I know - but anything "distributed" like that is basically an absolute asshole to debug."

LOL!
View user's profileSend private message
[MF]ETR
Kai Regular
Kai Regular


Joined: 21 May 2004
Posts: 81

PostPosted: Mon May 31, 2004 6:46 am Reply with quoteBack to top

Devedander wrote:
I have to disagree with the no IP address conflict.

[...]

Nice theory you got worked out there Wink but the problem is that ips like 192.168.0.3 and 192.168.0.1 are very commonly used... that's why it's a problem. Smile

_________________
I am fictional :: War§ow!
View user's profileSend private message
TheDaddy



Joined: 30 Jul 2006
Posts: 0

PostPosted: Mon May 31, 2004 6:49 am Reply with quoteBack to top

Noooooooo.. read it all again..

The guy was *right* with saying Birthday Algo.... he just didnt realise that i was talking about 256^2 not 256... just a terminology issue... Kai is safe as far as IP's go... well.. safe enough Wink

TD
View user's profileSend private message
[MF]ETR
Kai Regular
Kai Regular


Joined: 21 May 2004
Posts: 81

PostPosted: Mon May 31, 2004 7:04 am Reply with quoteBack to top

hm right... tbh I didn't read his theory completely Rolling Eyes
still haven't, but I will someday Razz

_________________
I am fictional :: War§ow!
View user's profileSend private message
superblue
Kai Beginner
Kai Beginner


Joined: 21 May 2004
Posts: 5
Location: USA - Ohio

PostPosted: Mon May 31, 2004 9:46 pm Reply with quoteBack to top

Quote:
Blue Screens / Horrible Reboots
-------------------------------------

This is an annoying issue with WinPCap .. Basically people who have this will be like "everythings cool when i go into arena and after a bit my PC reboots / BSOD's"


Oh thank god, I'm not insane after all!! This hadn't been happening to me until the latest update though, I though something was messed up with my computer (its 2 floors away from the xbox so I never actually saw what happens, it just rebooted!)
View user's profileSend private messageVisit poster's websiteAIM Address
Scope
Kai Beginner
Kai Beginner


Joined: 25 May 2004
Posts: 6
Location: United Kingdom

PostPosted: Tue Jun 01, 2004 8:40 am Reply with quoteBack to top

TD: Im afriad IP Conflict still happens.. I got them all weekend, even as late as last night (monday).
View user's profileSend private message
TheDaddy



Joined: 30 Jul 2006
Posts: 0

PostPosted: Tue Jun 01, 2004 8:53 am Reply with quoteBack to top

Another update rolled last night - which fixed it - but bear in mind that until everyone has it, IP conflicts will still occur.

TD
View user's profileSend private message
[MF]chilin_dude
Kai Admirer
Kai Admirer


Joined: 21 May 2004
Posts: 335
Location: United Kingdom

PostPosted: Thu Jun 03, 2004 4:13 pm Reply with quoteBack to top

Quote:
Blue Screens / Horrible Reboots
-------------------------------------

This is an annoying issue with WinPCap .. Basically people who have this will be like "everythings cool when i go into arena and after a bit my PC reboots / BSOD's"

It's to do with how Kai monitors and locks NIC cards using winpcap. We're gonna try to stop it happening, but for now, do this:

1.) Start Kai - DO NOT log in. Leave it on the login screen.
2.) Turn console on - look for games (no, dont host - actually try to join a game - there wont be one there, but dont worry). This will make Kai lock your network adapter.
3.) Log into Kai... it wont bail out now..

This could be my problem? Is there going to be any auto update that will fix this please?
View user's profileSend private messageMSN Messenger
TheDaddy



Joined: 30 Jul 2006
Posts: 0

PostPosted: Thu Jun 03, 2004 4:23 pm Reply with quoteBack to top

Not unless WinPCap release a fix for it from there end.

Although, as long as you follow those 3 steps above when starting Kai, everything should be fine.

TD
View user's profileSend private message
[MF]chilin_dude
Kai Admirer
Kai Admirer


Joined: 21 May 2004
Posts: 335
Location: United Kingdom

PostPosted: Thu Jun 03, 2004 6:16 pm Reply with quoteBack to top

Damn!!!
I can't follow these three steps as when I plug my ethernet in and the internet is connected then the net locks up Rolling Eyes
Thanks for all the hard work though
View user's profileSend private messageMSN Messenger
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group :: Theme by Daz :: All times are GMT