LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-03-2008, 05:32 AM   #1
slackster
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware
Posts: 12

Rep: Reputation: 0
ethernet bridge, no link between first and second pc


Previous working setup

Gentoo install running recent kernel (per november-december 2007).
Asus A7N8X-E Deluxe mainboard with 2 ethernet ports: Marvell 1Gb and nForce 100Mb.

says lspci:
01:04.0 Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (rev 13)
00:04.0 Ethernet controller: nVidia Corporation nForce2 Ethernet Controller (rev a1)

My gateway access is handled by the Marvell one [eth0].
That makes the nForce adapter [eth1].

As my 4-port home router is stuffed and I don't have access to a wifi access point, I figured I would bridge eth0 and eth1 so my notebook could enjoy (wired) internet access.

To accomplish a connection both on the notebook als well as on the desktop, I assigned the bridge an IP. I remember this setup functioning correctly.

--------
[kernel 2.6.24-gentoo-r8]

Currently, I can't seem to get a link established between my desktop and notebook. I have tried several patch cables and when connecting the notebook with them to the router directly, a link does get established. When connecting the eth1 port to the router, a link is also established.

In general I have DHCP turned off as otherwise the port forwarding features of the router are disabled. For testing I turned it on to see if it would make a difference, but no.

It seems like the behaviour of the drivers has changed, as they currently will not bring up a link between two computers without a hub/router between them. I am familiar with the use of a cross cable when connecting two computers ad-hoc, but I recall that I used a straight cable out of the eth1 port of my desktop to succesfully connect to my notebook before.

(As a matter of fact, on another machine which refuses to bring the link up using live distributions as Backtrack 2 and Zeroshell, WinXP does the trick. Bridging its two ethernet ports and connecting them with a straight cable to the router and to my desktop exhibits no issues.)
--------

Any suggestions or likewise experiences, I'd love to hear them.
Once I get this solved I can continue setting up that transparent traffic monitor that I was planning to
 
Old 06-03-2008, 06:32 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Don't bridge eth0 to eth1 - that's like unplugging your desktop and plugging only your laptop into the modem. Unless of course you bridged to a virtual interface (eth0:0). Hmm. Well, that's one option - bridge eth1 to eth0:0 and everything should magically work.

A second option is to forward DHCP requests and replies between eth1/eth0. That one gets very tricky. Let's forget I ever mentioned it.

The third option (the best option in the days when virtual interfaces weren't implemented), is to run dhcpd on eth1 to give your laptop an IP. The 'ipmasq' scripts can set up NAT between eth1 and eth0. You can run 'bind9' so that yoru desktop can act as a DNS machine - that allows you to set up dhcpd to tell the laptop to use your computer as a DNS. Alternatively, just set dhcpd to tell the laptop to use the desktop as a gateway and the static LAN IP of the modem as the DNS.
 
Old 06-03-2008, 07:07 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
You could also have your laptop on a different subnet and enable ip forwarding on the ASUS. Using the routers address for DNS might not work. It doesn't work on my router.
 
Old 06-03-2008, 09:07 AM   #4
slackster
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pinniped View Post
Don't bridge eth0 to eth1 - that's like unplugging your desktop and plugging only your laptop into the modem. Unless of course you bridged to a virtual interface (eth0:0). Hmm. Well, that's one option - bridge eth1 to eth0:0 and everything should magically work.
Dear pinniped,
Rather than using a virtual interface by the name of eth0:0, I solely use eth0, eth1 and br0. And for the record, with the bridge set up, although not connecting to the notebook, internet is still fully accesible form the desktop. That's because I assign br0 an IP, if I wouldn't then I would suffer what you describe above.

Quote:
Originally Posted by pinniped View Post
The third option (the best option in the days when virtual interfaces weren't implemented), is to run dhcpd on eth1 to give your laptop an IP. The 'ipmasq' scripts can set up NAT between eth1 and eth0. You can run 'bind9' so that yoru desktop can act as a DNS machine - that allows you to set up dhcpd to tell the laptop to use your computer as a DNS. Alternatively, just set dhcpd to tell the laptop to use the desktop as a gateway and the static LAN IP of the modem as the DNS.
Please forgive me for my ignorance but I've never heard of an ipmasq-script, what distro are you using? Also DHCP is not my concern, I know very well which IPs are available in my subnet. I merely hoped enabling DHCP would somehow wake up my notebook's ethernet port and thus establish a link.

Also my DNS needs are handled by my router, I merely fill out its IP as the default gateway and DNS server and my internet connection (if directly connected like on my desktop) works fine.

Dear jschiwal,
Actually I am using that subnetting 'trick' already at a different point in the local network. Like this:
----WWW----|ISP router|--192.168.1.--|hub|--192.168.1.--|my 4-port router|--192.168.2.--|desktop|

Although creating a new subnet for my notebook is fine with me, the reason I'd like to have it on the same subnet is because I am preparing a server to act as a traffic monitor for the entire network. That's why I'd like to have this bridge-problem figured out first so I know how to implement it on that other machine.


UPDATE: (Partial) Victory! Luckily I'm not losing my mind
Just ran some more tests, here are my findings;

The Realtek chip in my notebook was not being correctly initialised by the Backtrack 2.xx/3beta live disc I was using. In other words, after trying several live discs, Slax provided an useful testing platform, ironically enough (Backtrack is based on Slax). The bridge on my desktop to my notebook is functional now but there is still something very strange going on though.

The setup works when the Realtek port of my notebook is connected to the Marvell port of my desktop and the nForce port of my desktop is connected to the router.

When the Realtek port of my notebook is connected to the nForce port of my desktop and the Marvell port of my desktop is connected to the router, there is no link between the notebook and the desktop!

As a sidenote, the DHCP traffic is succesfully forwarded though the bridge, but now that I'm reassured it works I'll go back to static IPs quite soon.

Last edited by slackster; 06-03-2008 at 02:21 PM.
 
Old 11-30-2008, 05:34 AM   #5
slackster
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware
Posts: 12

Original Poster
Rep: Reputation: 0
Post the re-invention of the wheel

To fill anyone who might still see this in, this is my hardware:

Asus A7N8X-E Deluxe, featuring a Marvell 1Gbps ethernetport and a nForce 100Mbps ethernetport.
The 1Gbps port is equipped with Auto MDI/MDI-X which means that it can connect to another computer('s NIC) through either a straight through or a crossover cable.

Also I happen to have a (it seems just one) crossover ethernet cable at my disposal.


There are two methods of sharing my internet connection through my workstation:
1) the router connects to the 100Mbps port and the 1Gbps port is connected to a second pc with either a straight through or crossover cable

2) the router connects to the 1Gbps port and the 100Mbps port is connected to a second pc with a crossover cable only!


As the performance of the 1Gbps NIC in my workstation seems to be better than the 100Mbps one, I like using that one for connecting to the router. (the secondary/shared connection will only be used incidentally) What I clearly forgot when setting up my system the second time (right before I started this thread) is that I had been using a crossover cable to connect to connect to the 100Mbps port.

Tip1: If I understand correctly, Auto MDI/MDI-X is a standard feature of 1Gbps NICs.

Tip2: Always have a straight through _and_ a crossover cable at your disposal when experimenting with ethernet networks.

Tip3: Ethernet bridges (under Linux) can be assigned an IP address which means the bridging machine can also itself be reached as part of the network.

Thread closed, thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless ethernet bridge? nirj Linux - Wireless Networking 4 01-21-2008 10:31 PM
Is it possible to bridge ethernet and wifi? daishin Linux - Wireless Networking 1 10-06-2006 03:53 PM
try an ethernet to wireless bridge!! leec11 Linux - Wireless Networking 0 10-10-2004 10:42 PM
Network Bridge- IR to Ethernet systemparadox Linux - Networking 2 08-18-2004 09:51 AM
Ethernet Bridge bogging out finegan Linux - Networking 4 04-28-2004 04:21 AM


All times are GMT -5. The time now is 12:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration