# Gigabit Ethernet Card

## n7down

Hey,

I just got a new gigabit ethernet card, its a d-link dge-530t and I'm running on a 2.6.5 gentoo-dev-sources kernel, i think i think i have the right drivers installed in the kernel.... but im not really sure.  Bytheway how do i get the new card to work and how do i add a new softlevel??  Thanks.

----------

## yottabit

I just set up the same card. The proper driver is the sk98lin. Don't compile the dl2000 by accident and waste your time like I did. The driver is available in the 2.6.9 kernel, possibly earlier.

Don't forget to turn on Jumbo Frames to get some killer speed out of huge file transfers!

Obviously substitute eth1 with your card. And remember to set it on both ends or your packets will mysteriously disappear. (And if you're using a switch make sure it supports Jumbo Frames or your packets will also disappear. I'm personally using a point-to-point crossover link between my server and my media computer since I'm not prepared to drop a couple grand on a GigE switch.)

```
ifconfig eth1 mtu 9000
```

To answer your other question, just modify /etc/conf.d/net for your new network parameters. Then copy /etc/init.d/net.eth0 to ...net.eth1 for initialization of the network parameters. Don't foget to rc-update add net.eth1 default if you want the config loaded by default. (And don't forget to compile the network driver into your kernel or autoload it as a module in /etc/modules/autoload.d/kernel-2.6 or whatever it is.)

Oh, one last note... either modify /etc/init.d/net.eth1 to set your MTU to 9000 or maybe shove the ifconfig configuration line into /etc/conf.d/local.start.

GigE rox!

----------

## justincataldo

 *yottabit wrote:*   

> 
> 
> ```
> ifconfig eth1 mtu 9000
> ```
> ...

 

Hmmm very interesting. I've had problem with mine running at 100Mbps. I'll have to make that change and give it a try!

----------

## justincataldo

Well I made the change, but the card is still running at 10/100.  :Sad: 

----------

## yottabit

Don't forget that the card will still auto-negotiate a link (10/100/1000, half- or full-duplex) based on type of cable connected, length, and hardware on the other end. To get a GigE link you will need two GigE cards connected with a cross-over Ethernet cable, or connect your card with a standard Ethernet cable to a GigE-capable switch.

If you are interested in using jumbo frames, make sure your switch supports it first or it will drop the frames.

J

----------

## justincataldo

 *yottabit wrote:*   

> Don't forget that the card will still auto-negotiate a link (10/100/1000, half- or full-duplex) based on type of cable connected, length, and hardware on the other end. To get a GigE link you will need two GigE cards connected with a cross-over Ethernet cable, or connect your card with a standard Ethernet cable to a GigE-capable switch.
> 
> If you are interested in using jumbo frames, make sure your switch supports it first or it will drop the frames.
> 
> J

 

I'm connecting it to my MacBook Pro which also has gigabit ethernet. No switch involved. Just one cable between machines.

I don't believe a cross over is going to fix the problem.

If I use a CAT5E straight-through cable I get 12MB/sec.

If I use a CAT5E cross-over cable I get 17MB/sec.

What I need to do to get something close to 100MB/sec I just can't figure out...

I've set mtu 9000 for that interface, but still not working. Is that all that is needed to allow jumbo packets? Nothing in the kernel?

----------

## yottabit

Okay, if you're getting a link, then either you're already using a cross-over cable, or one of your cards is auto MDI/MDI-X and doing the cross from you.

You're saying "MB" which is megaBYTES per second, not MB/Megabits per second. You said you get 17 MB/s which is 136 Mb/s... depending on your file transfer protocol, speed of the computer bus, and speed of the computer's hard disk, that might be all you can get... notebooks have notoriously slow buses and hard drives (to save power)... and if you aren't using Jumbo frames on each end, that can also affect the speed. The whole point of Jumbo Frames is to reduce the packet overhead (so more data payload is sent with each packet).

----------

## justincataldo

Yes, that's correct. The mac reports the transfer speed as 17MB/sec. According to iptraf on the Gentoo box, it's coming in at about 169000Kbps which reflects that. But, it should be much close to 100MB/sec.

Gentoo Box: Pentium 4 1.6GHz, 1GB RAM, 120GB 7200RPM HDD, 400MHz FSB.

MacBook Pro: Intel Core Duo, 2GB RAM, 100GB 7200RPM HDD, 667MHz FSB.

I don't see why these machines wouldn't be able to deliver the traffic at gigabit speeds?

----------

## yottabit

The specs look good, even if one is a notebook.  :Wink: 

What xfer protocol are you using when you measure the speeds?

----------

## justincataldo

Well I've tried using rsync, scp and samba. All give me between 12MB/sec and 17MB/sec.

----------

## yottabit

Well, I don't know what else to do... try sending a ping with an 8000 byte payload and set the do-not-fragment flag to see if it goes through... that would let you know whether jumbo is working...

----------

## justincataldo

 *yottabit wrote:*   

> Well, I don't know what else to do... try sending a ping with an 8000 byte payload and set the do-not-fragment flag to see if it goes through... that would let you know whether jumbo is working...

 

```
aria ~ # ping nightcrawler -s 8000

PING nightcrawler (192.168.1.51) 8000(8028) bytes of data.

8008 bytes from nightcrawler (192.168.1.51): icmp_seq=1 ttl=64 time=0.426 ms

8008 bytes from nightcrawler (192.168.1.51): icmp_seq=2 ttl=64 time=0.477 ms

8008 bytes from nightcrawler (192.168.1.51): icmp_seq=3 ttl=64 time=0.475 ms

8008 bytes from nightcrawler (192.168.1.51): icmp_seq=4 ttl=64 time=0.472 ms

8008 bytes from nightcrawler (192.168.1.51): icmp_seq=5 ttl=64 time=0.434 ms

--- nightcrawler ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 3996ms

rtt min/avg/max/mdev = 0.426/0.456/0.477/0.034 ms

aria ~ # 
```

Like that?

I've forced the ethernet card in the mac to use jumbo packets, but I'm still only getting 17MB/sec.

----------

## yottabit

I don't see an option to set the Do Not Fragment flag in ping... try setting your payload to 10000 bytes and make sure your pings don't come back... at least that way you know the packets aren't being fragmented.

----------

## justincataldo

 *yottabit wrote:*   

> I don't see an option to set the Do Not Fragment flag in ping... try setting your payload to 10000 bytes and make sure your pings don't come back... at least that way you know the packets aren't being fragmented.

 

Uh, what do you mean don't come back?

```

aria ~ # ping nightcrawler -s 10000

PING nightcrawler (192.168.1.51) 10000(10028) bytes of data.

10008 bytes from nightcrawler (192.168.1.51): icmp_seq=1 ttl=64 time=0.428 ms

10008 bytes from nightcrawler (192.168.1.51): icmp_seq=2 ttl=64 time=0.518 ms

10008 bytes from nightcrawler (192.168.1.51): icmp_seq=3 ttl=64 time=0.497 ms

10008 bytes from nightcrawler (192.168.1.51): icmp_seq=4 ttl=64 time=0.551 ms

10008 bytes from nightcrawler (192.168.1.51): icmp_seq=5 ttl=64 time=0.516 ms

--- nightcrawler ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 3996ms

rtt min/avg/max/mdev = 0.428/0.502/0.551/0.040 ms

aria ~ # 
```

Here's an interesting issue:

Copying a 350MB file from one machine to the other via scp gives me about 26.7MB/s.

Copying a 350MB file from one machine to the other via samba gives me about 2MB/s.

Copying a 350MB file from one machine to the other via rsync gives me about 18MB/s.

So... where does that leave me?

----------

## justincataldo

I'll have the opportunity to test the mac with another mac with gigabit ethernet soon. So I can rule out that as being the problem.

----------

## yottabit

also, because you got ping replies with a 10000 byte payload, fragmentation is occurring. Somehow need to find a tool that lets you set the Do Not Fragment flag on the ICMP packet for the ping... apparently BSD ping doesn't allow this (at least I couldn't find it in the man page...).

J

----------

## justincataldo

Any other ideas on how I can test it?

----------

## think4urs11

 *yottabit wrote:*   

> also, because you got ping replies with a 10000 byte payload, fragmentation is occurring. Somehow need to find a tool that lets you set the Do Not Fragment flag on the ICMP packet for the ping... apparently BSD ping doesn't allow this (at least I couldn't find it in the man page...).

 

```
ping nightcrawler -s 10000 -M do
```

Maximum size possible via a direct PC-PC connection should be (lower) MTU-40, everything above would come back as icmp_seq=1 Frag needed and DF set (mtu = xxxx).

So if both machines claim to have MTU 9000 set, the command should work with up to 8960 bytes payload.

----------

