LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-03-2004, 03:15 AM   #1
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Linux: Bridges and Switches


Firstly: What is the difference between a bridge and a switch?

Second: If I wanted to turn a linux box into a four port switch - how would I go about doing it. Do I need to give each network interface an IP address? - do any of the cards need to have IP addresses come to think of it.

Third: I have router with four ethernet ports on. Could someone explain how the router is set up. It has and internet LAN IP address and an external WAN IP address, but what addresses would the ethernet ports have?
 
Old 03-03-2004, 03:27 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A bridge is a device that connects network segments together. The network segments will be on different subnets. For a computer to connect another computer on a different subnet, the traffic goes through a bridge. A bridge may also connect an ethernet to a token-ring network.

A switch is similar to a hub. A switch will however make a dedicated connection between to ports. It will also store a packet before sending it. This will allow full duplex modes, and also a 10baseT NIC can connect to a 100baseT NIC, and the 100baseT NIC doesn't have to drop down speed.

Just buy a switch. A 5-port switch will only cost around $30.
 
Old 03-03-2004, 04:20 AM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
You can buy 2-port and 4-port hub PCI cards, and also dual and quad NICs as well. I'm not sure if there are any PCI switch cards, but I imagine there are if you look hard enough.

Turning a PC into a switch would be fairly difficult, since you would need multiple network cards that are all on the same subnet. I'm not sure that the level of complication would really be worth it. What are you trying to achieve with a PC-as-switch that you could not just buy from eBay?

Oh, and routers that have multiple ethernet ports are generally just routers with embedded switches. Each of the ethernet ports may have an IP on the LAN subnet (but usually you can't assign different ports to different subnets).

Last edited by chort; 03-03-2004 at 04:22 AM.
 
Old 03-03-2004, 05:05 AM   #4
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Original Poster
Rep: Reputation: 15
I basically want to do some expreimenting with layer two devices.

I understand how hubs work and switches to a degree - but they don't have IP addresses. This is what confuses me becuase I always associate a NIC with having an IP address.

My router for example. If I wanted to set up a linux box as a 4-port router then each interface would have a different mac address - but would they all need to have the same IP address??
 
Old 03-03-2004, 05:20 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A switch will use the MAC address of the NIC card.
 
  


Reply



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
Wow, the coffee shop I frequent switches to Linux jaz General 9 11-19-2005 07:04 PM
India Bridges Diggital Gap With Linux. rvijay Linux - News 14 02-27-2005 10:04 AM
DWL-810+ -or- Wireless Bridges in Linux andrewb758 Linux - Wireless Networking 3 01-28-2004 01:47 PM
Linux switches from level 3 to 5 mikeshn Linux - General 4 09-18-2003 06:22 AM
DreamWorks Switches to Linux jeremy Linux - General 1 04-25-2002 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration