# [SOLVED]problem with neostrada (client only!) gentoo,rfc1483

## reavertm

I'm connected to ethernet switch that is connected (directly I guess) with neostrada Sagem F@st 1400 adsl modem (it's also a router).

ADSL modem has "LAN" capability enabled via bridged RFC1483 (ATM) ethernet protocol (should it be set to RFC1483 routed??)

There is also NAT with DHCP set up.

I can't really evaluate the validity of it's configuration (even when I have access to adsl modem configuration via http://192.168.1.1 panel, I just don't know  these things), but it seems valid as Windows workstations and Kubuntu 6.06LTS (livecd) have no problem with this Internet connection.

IP is received via DHCP and everything works for them.

The problems is with my gentoo (with livecd also) as well as with ubuntu desktop (installed on my friend's notebook).

Even when ping works (and all ICMP??), DHCP works (network address is acquired successfully), the rest doesn't.

After connecting to destination server (any web page for example, or emerge --sync) connection hangs waiting for answer, but there is no answer.

Looking at ADSL admin panel, WAN is configured via RFC1483 bridged protocol (if I understand correctly, this 'bridge' is between ADSL pppoatm line and ethernet output - one, that is connected to LAN ethernet switch), so I ensured that any ATM occurrence and "RFC1483/sth brigded" is ENABLED and loaded in my kernel.

Unfortunately it's still not working at all - DHCP works (and whole ICMP I guess) but the rest doesn't.

I tried just to use kubuntu 6.06 LTS livecd kernel with gentoo (just to test), but apparently it does some kind of /proc premount so it can't be used with gentoo without initrams modifiactions (it just tries to mount /proc twice and fails to boot) - maybe I should try to hack kubuntu livecd initramfs a bit...

So I tried to compile my kernel using new ubuntu (7.10 - not released yet) kernel config - still network on my gentoo (let's say 'Internet') is not working and I just don't know what to do.

I mean, I just want to connect my gentoo to neostrada NAT via ethernet (so I don't have to set up any ppp magic, load usb modem drivers etc even if I have all ppp and ppp over atm/ethernet modules compiled and loaded).

any ideas?

(I even tried to sniff those packets under Windows and they look like typical Ethernet II packets. Maybe there is some strange problem with MTU? Btw - Windows XP SP2 seems to send ACK ethernet packets with invalid checksum, according to wireshark/ethereal anyway)

thx in advance

Maciek

----------

## hermanng

I had problems with the default MTU in the past, and did set 

```
mtu_eth0="1472"
```

 in /etc/conf.d/net. After that my networking problems with the internet went away. YMMV, but I think, playing with the MTU is worth trying. For trying out, you can use the ifconfig command, e.g.

```
ifconfig eth0 mtu 1472
```

----------

## reavertm

 *hermanng wrote:*   

> I had problems with the default MTU in the past, [...]

 

Thanks for reply

Well, I tried with no luck :/

I tried MTU with 1472 and with 1492 (it's neostrada default MTU as I googled) and still no response

To be noted, I've been comparing ifconfig output from kubuntu livecd 6.06LTS (which was working well on neostrada out of the box) with my ifconfig output and they are pretty much identical (same interface settings, like MTU in.ex), so it should have already been working with MTU 1500 (default, as it was also on kubuntu)

I'm afraid I have to examine diff kubuntu-kernel-config my-kernel-config and look for some ATM/PPP strange things as I have no clue where's the problem.

The TTL is high enough if anyone asks

Speaking of kubuntu livecd 6.06LTS (the only linux 'working' here so far I've tested), there is also a load of restricted network drivers/other modules loaded during the boot and I'm afraid some of them are causing all this shit to work :) So I guess it's time to rmmod one by one and test network ...

And one word about this kubuntu - when I chroot to my gentoo from kubuntu livecd, network works well.. but I noticed strange behaviour, so:

```
# chroot /mnt/gentoo

(chrooted gentoo) # emerge --sync
```

connecting, gettting file list, rsyncing.. and after downloading some number of files (let's say about twenty ebuilds directories) emerge (rsync really) just stops - no matter the rsync mirror! (I tried with few) So I have to kill (ctrl+C) the process

So this kubuntu kernel doesn't work smooth (but it works at least, and there are delays with the ping reply even when 100% queries are replied). Anyway all of this is just strange

There is also an option to call TP.SA (ISP) and report the problem (with neostrada configuration?)

If anyone has any clue, don't be so shy ;)

----------

## hermanng

Hm, I should have thought a little harder, before answering. MTU values are important, but rely on the IP packet defragmentation of the router (i.e. should normally not be needed). if I  was to play with MTU, I would start with much lower values (e.g. 1400).

If the neostrada really is a router, you should not need any special driver for that, only routing should be set up correctly (... thinking of that, perhaps you should try to operate the neostrada in "routed" mode.)

You wrote, that ping works - do you mean it works in your lan, or does it work with the internet ? In the latter case, routing will be ok (you probably already tried some host commands yourself, like "host www.google.com" ? )

----------

## reavertm

 *hermanng wrote:*   

> Hm, I should have thought a little harder, before answering. MTU values are important, but rely on the IP packet defragmentation of the router (i.e. should normally not be needed). if I  was to play with MTU, I would start with much lower values (e.g. 1400).

 

also tried, no change observed

 *Quote:*   

> If the neostrada really is a router, you should not need any special driver for that, only routing should be set up correctly (... thinking of that, perhaps you should try to operate the neostrada in "routed" mode.)

 

Yes it shouldn't need any drivers for that so that's strange it's not working. I'll talk with the owner about trying to change to routed mode, but... I don't see it neccessary as other operating systems like WinXP (dual boot, so same machine), Kubuntu Livecd have no problem with that.

 *Quote:*   

> You wrote, that ping works - do you mean it works in your lan, or does it work with the internet ? In the latter case, routing will be ok (you probably already tried some host commands yourself, like "host www.google.com" ? )

 

Of course I tried to ping external addresses and they seem to work no problem (ping I mean). There is also VERY strange thing (I forgot to mention about it) that some (well, two to be honest) web pages seem to work: www.google.com and www.metallica.com (tested by wget XXX/index.html) - the rest (including sites hosted on Polish servers) hangs upon connection with no answer. I didn't try to 'host www.whatever.com' (just don't have it installed and being unable to install anything...) but tracepath works fine for both Polish and 'further' addresses.

And I'm 100% certain that there is no firewall mechanism blocking access for me.

Thanks for the answer

----------

## reavertm

A small update.

I've tested several livecd linux distributions (Knoppix, DSL, Slax) on my machine and on my friend's notebook, and only Slax seems to work. The results on my friend's notebook are the same as on my machine, so network adapted is not the issue.

----------

## reavertm

Help - I can even pay ;)

----------

## hermanng

Whats so special with slax ? Do they have special network drivers or anything else that catches the eye ? Is the ifconfig output different from Gentoo ?

Did you try an rsync command by hand ? I.e., does 

```
rsync -av --progress --delete-after rsync://rsync.europe.gentoo.org/gentoo-portage /usr/portage/
```

work ?

----------

## reavertm

```
rsync -av --progress --delete-after rsync://rsync.europe.gentoo.org/gentoo-portage /usr/portage/
```

doesn't work, no answer

It may be some kernel version specific issue or I've got some features missing still in the kernel (not loaded /compiled modules etc, stuff like crc functions or sth, maybe some of them are needed for rfc1483 bridget protocol). ifconfig outputs are nearly identical.

summary:

working (no matter the machine): windows xp sp2, kubuntu 6.06LST amd64, slax (not recent one)

not working: gentoo livecd, knoppix, ubuntu 7.07, damn small linux

ping 'works', dhcp works, the rest of common TCP/IP protocols doesn't (so no ftp, rsync, http, ssh etc)

When I burn new slax image to cd, I'll try to unload modules one by one to make it stop working and diff kernel configs to get some hints

thx for answers

----------

## ianw1974

Czesc Maciek,

I also have neostrada but I have a Netgear router managing the connection.  You say you have the Sagem modem, does it have the username/password configured on the sagem modem to connect to the internet for you?  If so, then if you just connect to the ethernet port, then you would just need to provide a LAN IP so that you can then ping the sagem modem as this should also have an IP address if it's acting as a router.

If not, then you'd only be able to connect using pppd instead.  If you can ping the sagem modem if it's configured as a router and then check your DNS in /etc/resolv.conf and your default gateway is the sagem modem, and then try to test internet connectivity.  Also look at disabling IPV6 in case this is a problem.

----------

## reavertm

It's solved now and the solution was to... USE OLDER kernel version.

It's strange but it works. All these working livecd's (kubuntu, slax) were running pretty old kernel so I decided to give it a go and compile 2.6.16 with minimal neccesary config (just drivers for hardware I have, only audio modules, no CRC libs or ATM/RFC 1483 brigded etc)

To be honest still I don't know where's the issue - switch I'm using is specific or neostrada modem issue (or maybe cable is crossed but shoudn't?). Anyway , this modem is not mine (nor switch is) so I'm rather not allowed to interfere in those settings and it was necessary to solve it on my side.

----------

## reavertm

 *ianw1974 wrote:*   

> Czesc Maciek,
> 
> I also have neostrada but I have a Netgear router managing the connection.  You say you have the Sagem modem, does it have the username/password configured on the sagem modem to connect to the internet for you?  If so, then if you just connect to the ethernet port, then you would just need to provide a LAN IP so that you can then ping the sagem modem as this should also have an IP address if it's acting as a router.
> 
> If not, then you'd only be able to connect using pppd instead.  If you can ping the sagem modem if it's configured as a router and then check your DNS in /etc/resolv.conf and your default gateway is the sagem modem, and then try to test internet connectivity.  Also look at disabling IPV6 in case this is a problem.

 

all pings worked as charm, dhcp and dns also, just normal packets weren't flowing...

----------

## ianw1974

I have a feeling it might have been an IPV6 issue that could have been causing it not to work correctly.

----------

## reavertm

 *ianw1974 wrote:*   

> I have a feeling it might have been an IPV6 issue that could have been causing it not to work correctly.

 

What exactly do you suggest? To ENABLE Ipv6 to make it work ('it = Internet via my neostrada') or to DISABLE Ipv6?

Currently Ipv6 is disabled and it's working for me on 2.6.16.54, I'll try to disable it also under 2.6.22, but I guese I had it already disabled.

Anyway looking at some kernel patches, some of them was related to ipv4 ack, synack etc, so maybe they fixed some issue with 'possibly' invalid ethernet ipv4 implementation in kernel thus making the kernel less tolerant for some specific ethernet environments ;) I'll investigate further, I'm going to test kernel by kernel (2.6.17, 2.6.18, etc...) and find kernel version breaking my network and then try to find what piece of code is responsible for that - just for curiousity.

----------

## ianw1974

Normally, when I've seen problems browsing the internet, yet DNS and pings were working OK, it was usually down to an IPV6 issue.

Sometimes, just disabling IPV6 in firefox is enough (using about:config and filtering for ipv6).  Other times, which I experienced with realtek 8139 cards, was to disable ipv6 system-wide, or alternatively remove ipv6 support from the kernel when it's compiled.

----------

## reavertm

Well, last 'working' kernel with my neostrada is 2.6.16 (no matter the patches, so 2.6.16-gentoo-r13 and vanilla 2.6.16, 2.6.16.54)

2.6.17 is not working

diff between 2.6.16 and 2.6.17 in kernel directory net/ipv4 is so big, I'm unable to find the code responsible for not working (I would if I were kernel developer though). To be mentioned, there are some differences in packet fragmentation code for example, so who knows

For the record: 2.6.16 kernel line is the most recent one working with my neostrada (so If anyone sees strange no-Internet behaviour on neostrada...)

----------

## reavertm

UPDATE UPDATE UPDATE

I found the real source of the problem, and the problem is.. TCP window scaling issue (or rather bugged neostrada router).

Since 2.6.17+ there is more aggressive use of TCP window scaling which causes better network performance on sane hardware and causes also severe network problems (no ACK, packets loss, etc) in some specific environments.

The solution:

1. To disable TCP window scaling at all:

via proc (sysctl)

```
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
```

or

2. For new kernel apply old (2.6.16) TCP window size settings via proc or sysctl:

```
echo "4096    16384   131072" > /proc/sys/net/ipv4/tcp_wmem

echo "4096    87380   174760" > at /proc/sys/net/ipv4/tcp_rmem
```

or use similar values (not tested :P)

----------

## hermanng

Thanks for sharing the info !

----------

## ianw1974

Many thanks, I have to remember this if I connect Neostrada direct to my machine.

----------

