View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 30 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Thu Oct 11, 2007 4:32 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
I just wanted to chime in here about my experience with jumbo frames. My MBE has a built-in Dual Intel® 82541 Gigabit Ethernet. However, I only use one of the ports, eth0. This Intel Ethernet chip supports an MTU up to 9000. On one of my frontends (FE#2 if you look at my hardware in my signature), I have another Intel NIC that also supports a MTU of up to 9000. After setting FE#2 to use a MTU of 9000, all is well. I can watch tv, video, etc, from the MBE no problem. On my FE#1 my NIC is based on a RealTek chip and it only accepts a MTU of up to 7200. Same goes for my desktop computer's NIC. When I set my MBE's MTU to 9000, I have no problems connecting to FE#2 with the Intel NIC. On FE#1 with the MTU set to 7200, I can connect to the MBE, ping the MBE, but I can't watch TV or recordings--I just get a black screen. (I thought that was odd. Maybe someone can explain to me why.) If I reduced my MTU on FE#1 to 4000, I get the same problem. I assumed that it was a MTU problem. Enter the almighty google.com. After some searching, I found this webpage:
http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.cookbook.mtu-discovery.html
where the quote of Koos van den Hout in section 15.6.1 sums up what I think I need to do--alter the MTU transmitted from the MBE on a per route basis. On all affected machines:
Code:
apt-get update && apt-get install iproute iproute-doc

I then need to set specific MTU's based on what frontend is being fed from the MBE. After reading the man pages for ip I came up with this command for the MBE:
Code:
ip route add [LAN side IP address of FE#1] dev eth0 via 0.0.0.0 mtu 4000

I had to repeat the comand on the FE#1, substituting the LAN side IP address.
Code:
ip route add [LAN side IP address of MBE] dev eth0 via 0.0.0.0 mtu 4000

I selected "Watch TV" on FE#1 and bingo-bango, I had live TV.
Here's the output of
Code:
route -n
on the MBE
Code:
mihanson@mythbox:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.11.6    0.0.0.0         255.255.255.255 UH    0      0        0 eth0
192.168.11.8    0.0.0.0         255.255.255.255 UH    0      0        0 eth0
192.168.11.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.11.1    0.0.0.0         UG    0      0        0 eth0

11.6 is my FE#1 and 11.8 is my desktop computer. Note I did not need to add a new route for FE#2 (the one with the Intel NIC) because the MBE, by default, sends with an MTU of 9000 and FE#2 can handle it.

Here's the output of
Code:
route -n
on FE#1
Code:
mythbox-rfe-1:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.11.4    0.0.0.0         255.255.255.255 UH    0      0        0 eth0
192.168.11.7    0.0.0.0         255.255.255.255 UH    0      0        0 eth0
192.168.11.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.11.1    0.0.0.0         UG    0      0        0 eth0

11.4 is my MBE and 11.7 in FE#2. Note that I did not add a route to my desktop because it's MTU matches FE#1 by default.

I repeated the process for my desktop computer and got it working as well.
One issue I noticed is that these new routes do not survive a
Code:
ifdown eth0 ; ifup eth0
. So I made a simple bash script with the commands and placed it in /usr/local/bin. Don't forget to chmod 755 the script.

Code:
mihanson@mythbox:~$ cat /usr/local/bin/iproute
#!/bin/sh

# Change MTU settings for specific routes
# iproute package
#
# Change MTU to 1500 for internet access
ip route change default via 192.168.11.1 mtu 1500

# Add route with MTU of 4000 for mythbox-rfe-1
ip route add 192.168.11.6 dev eth0 via 0.0.0.0 mtu 4000

# Add route with MTU of 4000 for desktop
ip route add 192.168.11.8 dev eth0 via 0.0.0.0 mtu 4000


You need to add this script to each affected machine. Substitute your own parameters for IP, mtu, etc.

Next, edit your /etc/network/interfaces and add the following line to your eth0 stanza:
Code:
up /usr/local/bin/iproute

Here is /etc/network/interfaces on my MBE for reference:
Code:
mihanson@mythbox:~$ cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo eth0
iface lo inet loopback

iface eth0 inet static
        address 192.168.11.4
        netmask 255.255.255.0
        network 192.168.11.0
        broadcast 192.168.11.255
        mtu 9000
        gateway 192.168.11.1
        up /usr/local/bin/iproute


Now the settings will be reloaded each time the interface goes down and then back up, including reboots.

A few thoughts to add. I thought that if 2 machines with differing MTU settings would talk to eachother and come to an agreement on a proper size. That was not the case for my boxen, so I had to go thru the above process. Not all the boxen on my network are KnoppMyth boxen, so that may have something to do with it. I hope someone finds this information useful.

_________________
Mike
My Hardware Profile


Last edited by mihanson on Tue Oct 16, 2007 3:50 pm, edited 2 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 5:50 pm 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
Outstanding information Mike. Extremely well done!

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 6:06 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
mihanson wrote:
I just wanted to chime in here about my experience with jumbo frames. <snip>

- OR -
Make sure all your equipment can handle the same size MTU :lol:

Just kidding (well, sort of). Great information Mike, thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 6:38 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
slowtolearn wrote:
Make sure all your equipment can handle the same size MTU :lol:

Just kidding (well, sort of). Great information Mike, thanks.


I was contemplating buying all new Intel NIC's, but the cost was too great to start over, IMO. I believe the PCI Intel gigabit NIC's run about $30 each at Newegg. Compare that to the $5 RealTek NIC I got at Fry's. ;) Full blown 9000 MTU jumbos are not worth a 600% difference in cost. :)

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 6:57 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
mihanson wrote:
I believe the PCI Intel gigabit NIC's run about $30 each at Newegg. Compare that to the $5 RealTek NIC I got at Fry's. ;) Full blown 9000 MTU jumbos are not worth a 600% difference in cost. :)
Agreed. I popped for the Intel GigE NICs for my MBE and the "backup" box running Slackware that I rsync to each night (no switch, direct connect between the two, that saves $$ :smile:). Took some playing, but found that my best transfers occur with an MTU of 9216 on each side.

I have never had an issue with playing anything on my frontends that are connected via 100Mb, why did you end up going GigE (and Jumbo frames) on yours?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 7:19 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
slowtolearn wrote:
Agreed. I popped for the Intel GigE NICs for my MBE and the "backup" box running Slackware that I rsync to each night (no switch, direct connect between the two, that saves $$ :smile:). Took some playing, but found that my best transfers occur with an MTU of 9216 on each side.

I have never had an issue with playing anything on my frontends that are connected via 100Mb, why did you end up going GigE (and Jumbo frames) on yours?


My MBE came with the GigE built in and I was concerned about bandwith usage when/if I expanded my MythTV setup. I wired the house (and I'm almost done with the garage) for Gigabit just becasue I wanted to. You never know what the future may hold. I got the Intel NIC in FE#2 for $10 after rebate a while back (and I've been searching for that deal ever since!) and $5 NIC's from Fry's are a no-brainer if you're going there anyway. Why jumbo frames? Why not? I have all the infrastructure in place, so I might as well use it to it's full potential. :) This morning I moved 3.1GB of .avi files from my desktop to MBE in 101 seconds or ~ 245Mbit/sec. It used to take about 140 seconds or ~175 Mbits/sec. 40% increase in speed. Pretty good. :) I have not done any exhaustive testing, but I'd imagine it's all in the ballpark.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 14, 2007 4:19 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
@mihanson - Glad to hear you got such a substantial gain with the 9k frames. Regarding your ifdown eth0 ; ifup eth0 comments, if you don't use static IPs in your /etc/interface like I wrote about, what you've posted is a nice work-around.

I also wanted to know what your network hardware is (switch?) It might be due to my old mythtv hardware, but 9k frames for me are much slower than 4k frames.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 14, 2007 7:46 am 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
graysky wrote:
@mihanson - Glad to hear you got such a substantial gain with the 9k frames. Regarding your ifdown eth0 ; ifup eth0 comments, if you don't use static IPs in your /etc/interface like I wrote about, what you've posted is a nice work-around.

I also wanted to know what your network hardware is (switch?) It might be due to my old mythtv hardware, but 9k frames for me are much slower than 4k frames.


Yes, I'm using static IPs and I use a Netgear GS108 switch. :)

[edit] Just for clarity... In the example I gave for network speed, those 2 computers were talking to each other with 4k frames, not 9k.[/edit]

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 12:04 am 
Offline
Joined: Sun Oct 29, 2006 7:36 am
Posts: 11
Location: Wellington, New Zealand
mihanson wrote:
I thought that if 2 machines with differing MTU settings would talk to eachother and come to an agreement on a proper size.


This gets done using MTU Path discovery (ftp://ftp.rfc-editor.org/in-notes/rfc1191.txt).

Thinking about it quickly, pretty it's not working because:
MTU Path discovery uses ICMP to to tell the sending party the packet is too big.
The device that send the ICMP back is normally a rounting device, which has an MTU interface on the ingress side with a bigger enough MTU to fit the packet, and knows the MTU on the egress is too small, so sends back an ICMP message to say its being dropped.
On a single subnet like yours (before you changed the MTU on a host route basis), the MBE was sending a 9000 MTU packet, the FE1 with only an MTU of 4000 would have never processed the packet, so not sent ICMP back.

Applying MTUs with a host routes makes a good work around.

Standard ping is not a good way to test MTU issues, because ping by default sends a small packet and it gets through. Then when using an application that uses large packets (e.g. streaming TV), the application fills the packet and is to large for the other end.
If using ping to troubleshoot MTU issues, need to change the ping packet size. Start it small (and working) and then increase it until it fails.

_________________
---
Scott Walsh
http://zone3.net.nz/

Knoppmyth R5F27 on Silverstone LC-16m


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 4:00 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
Good information, Scott. Thank you.

I made an edit to my post at the top of page 2 where I explained how to set up the per route MTU's. When you placed the script in /etc/network/if-up.d the routes did not survive a reboot. This is because the loopback interface is processed first and also parses the /etc/network/if-up.d directory for scripts to run. The script generates errors when run against the loop and then does not get run against eth0. I worked around this by moving the script to /usr/local/bin and added an option to the eth0 stanza of /etc/network/interfaces to call the script. I'll keep that original post updated so no one has to piece together scattered info in this thread.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2010 12:02 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
Anyone have jumbo frames working in R6? I can't seem to figure out how to get mtu 9000 to be default at startup. I added this line from here, but to no avail.

/etc/rc.local

Code:
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
/sbin/ifconfig eth1 mtu 9000


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2010 12:35 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
Try adding it to /etc/runit/1.local instead of /etc/rc.local.

Britney


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2010 2:20 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
The "proper" way to do this is by adding the following file:

/etc/net/ifaces/ethX/iplink (Where X is the number of your ethernet device).

The file iplink normally does not exist, so don't worry if it's not there. In iplink add the following line:
Code:
mtu 9000
Restart your network
Code:
$ sudo /etc/net/scripts/network.init restart
You can then check with ifconfig for confirmation that the MTU has changed.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2010 2:36 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
...or use the service menu.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 30, 2010 4:35 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
graysky wrote:
...or use the service menu.
What the what? :shock:

Didn't even think to look there... :oops:


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 6 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu