So, What is UPnP?  Good ques­tion.  The rea­son you’re prob­a­bly here is that you have a game on your XBox that says it needs UPnP.  What­ever the rea­son why you’re ask­ing, this is a brief overview of what it is.

UPnP, accord­ing to the standard’s web­site: “The UPnP archi­tec­ture is a dis­trib­uted, open net­work­ing archi­tec­ture that lever­ages TCP/IP and the Web to enable seam­less prox­im­ity net­work­ing in addi­tion to con­trol and data trans­fer among net­worked devices in the home, office, and every­where in between.”

What that means is that it makes net­work con­fig­u­ra­tion a lot eas­ier for the home user.  The ques­tion is then:  Why isn’t every­one using it?

The answer is secu­rity.  UPnP inter­acts with a fire­wall and opens (and later closes) holes to make com­mu­ni­ca­tion eas­ier between devices.  While this is a great ben­e­fit to peo­ple want­ing things to just work, you lose some of the secu­rity of only allow­ing cer­tain net­work traf­fic in and out of your network.

Bot­tom line:  Cor­po­ra­tions don’t use UPnP, gen­er­ally, home users do.  If you are con­cerned about secu­rity, I would sug­gest learn­ing how to port for­ward, yourself.

Why use UPnP?

In order for a devices to com­mu­ni­cate over net­works, they have to get sev­eral dif­fer­ent pieces of infor­ma­tion from the router or server (or they need to be man­u­ally con­fig­ured… gross).  These pieces are:

  • An IP address
  • A name
  • DNS set­tings
  • Net­work infor­ma­tion (sub­net mask, etc)
Not only does a device need this, but it needs this infor­ma­tion from every­one else before they communicate!
UPnP sim­pli­fies this process by doing all of this auto­mat­i­cally.  So, rather than hav­ing to tell all the other com­put­ers all the infor­ma­tion about the other com­put­ers, UPnP just does it auto­mat­i­cally.  In Win­dows 7, there is a fea­ture called “Net­work Dis­cov­ery,” which is under the “advanced shar­ing set­tings” avail­able from the Net­work  and Shar­ing Cen­ter.  Once this is enabled, Win­dows 7 PCs can locate each other quickly and eas­ily, with almost no configuration.
Also, with UPnP, your XBox will com­mu­ni­cate with less prob­lems over the inter­net.  For that mat­ter, Skype, Steam, and other peer-to-peer appli­ca­tions will work better.

You said that UPnP messes with the router/firewall

I did.  And it does.  I’ll explain.

The TCP/IP suite uses ports, along with IP addresses, to com­mu­ni­cate.  Let’s say 192.168.100 wants to talk to 192.168.1.101.  First!  192.168.1.101 must be lis­ten­ing on a spe­cific port (we’ll say port 80).  Sec­ond!  192.168.1.100 will open up one of its ports (this will be a ran­dom num­ber below 64,000 and above 1024).

Dia­gram:

Simple TCP communication 300x122 What is UPnP?

 

 

 

That’s all well and dandy, but… we have hack­ers.  Hack­ers will exploit machines by attack­ing them on these ports that they lis­ten on (such as port 80).  PCs actu­ally lis­ten on sev­eral ports by default, and so this can be a huge prob­lem once we con­nect a com­puter to the internet.

If you hook up a PC with no fire­wall pro­tec­tion to the inter­net, it will be port scanned and exploited.  That is why routers and Oper­at­ing Sys­tems pro­vide fire­wall ser­vices.  It basi­cally will ONLY allow traf­fic on spe­cific autho­rized ports, not 1–64,o00.

Addi­tion­ally, your router also NAT’s your traf­fic (Port address Trans­la­tion, to be spe­cific), so, it makes it slightly more dif­fi­cult for traf­fic to come to your com­puter because your fire­wall is help­ing your com­puter share ONE IP address.  Wikipedia has fur­ther expla­na­tion on NAT/PAT.

So, what does UPnP do to your firewall/router?

UPnP will dynam­i­cally open up ports on your fire­wall when appli­ca­tions need them.  In other words, rather than hav­ing to allow cer­tain ports through your fire­wall when­ever your appli­ca­tion requests access, it will give this access auto­mat­i­cally.  This works amaz­ingly for appli­ca­tions that are net­work inten­sive, such as mul­ti­player games, or peer-to-peer appli­ca­tions (such as Steam, or Bit­Tor­rent).  All of these pro­grams lis­ten on spe­cific ports to com­mu­ni­cate, and they will not com­mu­ni­cate prop­erly unless the ports are “opened” or for­warded prop­erly on your fire­wall.   UPnP negates the need to man­u­ally port for­ward!  Let me say that again with a car­riage return as buffer for emphasis.

UPnP negates the need to man­u­ally port forward!

Excit­ing, right?

Okay, I’m con­verted, how do I enable UPnP?

You have to make sure your OS (or XBox) has it enabled.  In Win­dows 7, go to Net­work and Shar­ing Center–Advanced Shar­ing Settings–and Enable Net­work Dis­cov­ery.  In XP, it is a win­dows com­po­nent (acces­si­ble through add-remove programs—windows com­po­nent), and you have to install the UPnP net­work ser­vice. Fol­low Microsoft’s tuto­r­ial to see how to do this.

 

Addi­tion­ally, you have to enable UPnP on your router.  Hope­fully our router sup­ports it.  If it doesn’t, you might look at installing an open source firmware replace­ment (such as DD-WRT or Tomato) to do this.

In DD-WRT, it’s under NAT/QoS and UPnP:  See the picture:

Enable UPnP 300x219 What is UPnP?

Enable UPnP

 

 

 

 

 

 

 

When will UPnP not do me any good?

If you aren’t using mul­ti­player games or online con­soles, or if you don’t use Steam, Bit­Tor­rent, or any num­ber of peer-to-peer pro­grams, OR… if you want to share files over your home net­work with­out hav­ing to man­u­ally con­fig­ure your devices (although Win­dows does a great job of tak­ing a lot of work out of this, already), then… UPnP won’t do much for you.

Addi­tion­ally, if you have a Dou­ble NAT sit­u­a­tion, e.g. you live in an apart­ment com­plex and your WAN IP is a pri­vate IP (such as you can see from my dd-wrt pic­ture), then your router’s UPnP  will not do you much good.

Sum­mary

UPnP is a stan­dard to take out the work from net­work con­fig­u­ra­tion.  Your devices will detect each other auto­mat­i­cally, and com­mu­ni­cate with devices over the inter­net much smoother.  Although UPnP is poten­tially dan­ger­ous, and not rec­om­mended for cor­po­rate sit­u­a­tions, it is a lot eas­ier than hav­ing to make port for­ward­ing entries for every peer-to-peer pro­gram you will ever use.

So, what’s better?

To answer this ques­tion, it might be good to more about the two spec­i­fi­ca­tions  …  There are a lot of wire­less let­ters run­ning around; lets dig in.

Overview of 802.11 g

802.11 g is more or less stan­dard with most wifi-enabled devices today (see my post on What is Wifi? for an expla­na­tion on wifi).  The Wifi spec­i­fi­ca­tions allow for a the­o­ret­i­cal max­i­mum of 54 mbps.

802.11 g can oper­ate on the 2.4 ghz band, which has fair pen­e­tra­tion, but faces a lot of inter­fer­ence from hun­dreds of devices that also use that band.  Cell phones, radio equip­ment, microwaves, some welders, cord­less phones, and many more devices.  Also, since 802.11 g is extremely com­mon, the band is sat­u­rated (on top of all the other non-wifi) devices with other wire­less access points.

The­o­ret­i­cal out the door, you can expect to reach speeds of 24mbps (TCP con­nec­tions) with 54g accord­ing to Wire­less Wiki.  Why so much less?  Net­work pro­to­col over­head is the main rea­son, among many.  The num­ber decreases even more from each addi­tional user.  Num­ber of users, sig­nal obstruc­tion, sig­nal inter­fer­ence, all con­tribute to the speed of your net­work connection.

Max speed with vary­ing num­ber of users:

1 user: 24 Mbps

3 users: 6.8 Mbps

5 users:  3.12 Mbps

9 users: .0266 Mbps

Overview of 802.11 n

Firstly, wireless-n is a type of radio imple­men­ta­tion.  What this means for you is that com­pa­nies can mar­ket their devices as wireless-n even though there will be wide lev­els of per­for­mance.  Do you research before you pur­chase an n-router!

802.11-n sup­ports the­o­ret­i­cal speeds of 300Mbps accord­ing to Com­puter world.  http://www.computerworld.com/s/article/9019472/FAQ_802.11n_wireless_networking

 

Real­is­ti­cally, you can expect to see (at a max­i­mum) around speeds of 150 Mbps, if you sat­isfy cer­tain con­di­tions.  In order for wire­less n to work at opti­mum speeds, all devices must sup­port the n stan­dard, also, chan­nel bond­ing must be enabled on all wire­less devices to achieve max­i­mum through­put.  Unfor­tu­nately, some coun­tries dis­al­low the use of chan­nel bond­ing, which cuts the the­o­ret­i­cal speed in half.

802.11-n uses mul­ti­ple anten­nas to trans­mit data (a tech­nol­ogy called MIMO).  With the addi­tional help of chan­nel bond­ing, and the usage of both 2.4ghz and 5ghz chan­nels, 802.11-n suf­fers from less inter­fer­ence and enjoys greater trans­mis­sion range.

A caveat to Wire­less N devices is that if you pur­chase a N router with only one transmitter/receiver, than if there is a wire­less device that only sup­ports 802.11b, than every­one on that access point will have to trans­mit at b speeds.  If you have mul­ti­ple radios, than the router will seg­ment the slower traf­fic appropriately.

Wire­less n routers come with vary­ing spec­i­fi­ca­tions.  One impor­tant spec­i­fi­ca­tion is the num­ber of radios.  Accord­ing to SecureEd­geNet­works, the max­i­mum rec­om­mended amount of users on a sin­gle radio wire­less n device is 30.  Routers with mul­ti­ple radios are more expen­sive, so choose care­fully accord­ing to your needs.

Addi­tion­ally, because wire­less N is kind of a loose def­i­n­i­tion, it is doubt­ful you will get close to adver­tised speeds on home wireless-n routers.

Wireless-n, because it is more expen­sive, is thought to always be faster.  How­ever, if you have a data con­nec­tion from your ISP of 6 Mbps, and you have 4 wire­less devices, you will see no ben­e­fit to mov­ing from wire­less g to wire­less n!  If your ISP is sell­ing you 30Mbps, and you have 6 wire­less devices, than if you buy a wireless-n router, you will be lim­ited by your ISP and not your router.

Sum­mary

Wireless-G works for most home cir­cum­stances.  Wireless-N should only be con­sid­ered if the math is done to con­clude that it will actu­ally result in faster speeds.  Ulti­mately, your inter­net speed is deter­mined by your ISP, and a more expen­sive router with N capa­bil­i­ties will only help sit­u­a­tions with sev­eral users and a decent data connection.

 

© 2012 WireMeLess Network Suffusion theme by Sayontan Sinha