Archive for the ‘Networking’ Category

Windows TCP max limit for concurrent TCP socket connections

While trying to diagnose a network/application  issues with my companies application and the client’s network we got on the topic of possible running out of out TCP sockets on either the client workstation or the server.  While I didnt have any concrete facts as to whether this was a possible issue I turned to my trusty friend, google.com.  Very quickly I can across an article the goes into great detail about this exact topic and I felt that it was to good to not let everyone else know about it also.

To keep the TCP/IP stack from taking all resources on the computer, there are different parameters that control how many connections it can handle. If running applications that are constantly opening and closing connections (P2P), or are providing a service which many tries to connect to at the same time (Web-server like IIS), then one can improve the performance of these applications by changing the restriction limits.

The author also goes in to great detail about how to configure Windows networking for maximum performance.

This is definitely worth the 10 minutes to read.

How to: Configure Mediatomb/DLNA on Fedora 12 to work with a Samsung TV

I just purchased a Samsung LN46B650 TV and decide to play with the DLNA capiblities of the TV.  The TV come with a CD containing a Windows DLNA server but because I am a geek, I dont have a Windows machine in my house.  I though that since DLNA is a standard that it would be easy to use any DLNA server to host content for my TV.  Well I was partly right.  After reading several forum post I have successfully got everything working on my Fedora 12 netbook.  I will most likely be doing this on a Ubuntu machine at some point at which time I will update this post.

Step 1:
Assuming that you have a working Fedora 12 system that is connected to the same network as your TV make sure that you have port 50500 open or just disable your firewall (your choice).  You can manage this by going to System > Administration > Firewall

Step 2:
Open a terminal and do a yum install mediatomb.

Step 3:
Login as root and using your favorite text editor, open the /etc/mediatomb.conf file and modify the following parameter:

Enter the correct network interface for mediatomb to communicate to. In my case I am using the wireless connection of wlan0

## Network interface on which the server will run, you need to edit this!
MT_INTERFACE="wlan0"

There are other options that you can configure in this file but the network interface is the only on the I had to modify.

Step 4:
As root open a terminal and run mediatomb. This will start the software and configure the sqlite database and setup the default config.xml file that we are going to need to modify. Once the software is running go ahead and hit ctrl-c to exit from the software because we need to modify that config.xml file

Step 5:
With out this step your TV will be able to browse the content but not be able to do anything with it.
Also as root, edit the file /root/.mediatomb/config.xml
Look for the section:

<!–
<custom-http-headers>
<add header=”X-User-Agent: redsonic” />
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
–>

and change to to this

<custom-http-headers>
<add header=”X-User-Agent: redsonic”/>
<add header=”transferMode.dlna.org: Streaming”/>
<add header=”contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000?/>
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>

Now save the file.

Step 6:
In the terminal windows as root type mediatomb to start the application.

Now you should be able to connect to the Mediatomb webpage and start adding content to share via DLNA. Typically this is on port 49152 or 49153. You will be able to get this infomation from the lastline of output given when you run mediatomb from the command line.

Step 7:
To play videos you may have to re-tag the MIME information to video/mpeg. You can do this in the web interface. Once you have added a video to the database click on the notepad/edit button and change the mimetype to video/mpeg. There is also an option in the config.xml file where you may be able to do this globally for all media. I have not tried this yet and will update this post once I have.

Step 8:
Instead of having to start mediatomb manually each time you reboot there is also a daemon that you can start via /etc/init.d/mediatomb. If you plan on using this in daemon mode you will need to configure it by doing this:
Start the daemon so that it will install the default config files and sqlite database

root#  /etc/init.d/mediatomb start

Then go to /etc/mediatomb/config.xml and make the changes that you made above. Once you have made these changes restart the mediatomb daemon

root# /etc/init.d/mediatomb restart

Now you can go to the web interface and start adding content.

Please let me know if you have any other experiences connecting to your Samsung TV with mediatomb or any other DLNA server. Also please leave a comment if you have found this guide useful or if you see any correction that I need to make.

Also to give credit where it is due here is where I got some of the information above Cnet Forum Post

How to: Update Linksys WRT150N to DD-WRT

I purchased a Linksys WRT150N in hopes that it would be the end all wireless router for years to come.  I was replacing my old D-Link router that was reliable but didn’t have support for WPA.  Plus I tried to add new homemade antennas to it which was a big mistake, actually it solidified my needed a new router.  After some research I decided on a cheap WRT150N from Tigerdirect. I got it home, hooked it up and it did not have the connection speed or signal strength that I expected, in fact I almost returned it but managed to get it working.

Fast forward a year later and I am still not happy with this device.  So I did about 10 minutes of research and decide to flash the firmware with DD-WRT.  I figured worst case scenario is that I have to get a new wifi router, this time one that works.  Here is the steps that I took to update this firmware.  If you are planing on doing this read all of the documentation twice.  Do every thing that I have listed but dont let this be the last place that you search how to information and most importantly if you brick your route don’t blame me.

Offical Docs:Read these!

Also make sure that you have all of the websites saved, not bookmarked, just in case you brick your router and need to know how to try and unbrick it.

Steps I took:

  1. Restore your current router to defaults.  This option is located in the webGUI under administration
  2. In the webGUI under administration choose the option to update firmware.
  3. Now browse to the location where you save the the dd-wrt v2.4 mini file.  Yes you have to flash to the mini first
  4. Once the flashing begins DON’T TOUCH IT, don’t even breath for 5 minutes.  Even if it says that it done, wait 5 minutes!
  5. Now click the continue button.  Login with uid: root pwd:admin
  6. Go to the administration menu and click restore to defaults.
  7. Once that finished you will be prompted for the new admin user id and password, go ahead and set that
  8. Now navigate the the administration panel and upload the dd-wrt-v.2,4_generic.bin firmware
  9. After the count down go to the webGUI and restore back to defaults again
  10. Once again you are prompted for the new admin userid and password
  11. You are all set.

I have had great luck in the past few days.  I have had no drops and about 15-20% signal increase which allows me to browse the Internet and watch videos with out the constant buffering.

Good Luck!