Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> How Do I Use Linux To Create A Switch From Multiple Ethernet Ports
vizskywalker
post Dec 1 2006, 05:47 AM
Post #1


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



I have a Linux box with three ethernet ports (NIC cards). I could easily give it more. I have one ethernet connection to the outside world at college. College's ethernet policy is amazing, as they give us IP addresses that in theory are fully routable from the outside world (haven't had a chance to try it out). Unfortunately, I have another computer, my primary laptop, that is connected to the internet, and no switch or router.

I was wondering how to use my Linux box as either a switch or router. What I want to do is the following:
1) Connect the Linux box to the room ethernet port to give it internet and network access.
2) Connect my other computers to the other NIC cards so they also have access to the internet and network.

Since I can request an IP for each of my computers, and the IPs are fully routable, I was also wondering if it would be possible to somehow give each of my computers their own IP that the college gives me and maintain that outside access via IP.

Any help would be appreciated. I think I explained this pretty well, but if you have questions, please ask.

~Viz
Go to the top of the page
 
+Quote Post
yordan
post Dec 2 2006, 05:56 PM
Post #2


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,183
Joined: 16-August 05
Member No.: 7,896
myCENTs:15.50



Each "slave" computers will have fixed IP, I agree.
Each one of these computers must have :
. the primary one as default gateway when you configure the slave NIC's properties.
. they must also have a valid DNS. Look at your primary computer the address of the DNS, and eventually the address of the Internet proxy.
Then, this should work.
Go to the top of the page
 
+Quote Post
vizskywalker
post Dec 2 2006, 08:11 PM
Post #3


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



Okay, I think I have that set up, but let me give you the current configuration to be sure, because it isn't working.

Linux Box:
eth0: the card the other computer plugs into
active
ip: 192.168.1.1
subnetmask: 255.255.248.0
default gateway: 134.176.60.121

eth2: the card that connects to the internet
active
ip: 134.176.60.121
subnetmask: 255.255.248.0
default gateway: 134.173.63.200

DNS for the machine
Primary: 134.173.53.8
Secondary: 134.173.254.23
DNS Search PAth: localdomain

Windows Box (the remote machine)
Local Area Connection - the ethernet not wireless
ip: 134.173.60.56
subnetmask: 255.255.248.0
default gateway: 192.168.1.1

Primary DNS: 134.173.53.8
Secondary DNS: 134.173.254.23

~Viz
Go to the top of the page
 
+Quote Post
yordan
post Dec 2 2006, 09:35 PM
Post #4


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,183
Joined: 16-August 05
Member No.: 7,896
myCENTs:15.50



This is false :
QUOTE
Windows Box (the remote machine)
Local Area Connection - the ethernet not wireless
ip: 134.173.60.56
subnetmask: 255.255.248.0
default gateway: 192.168.1.1

ip of this machine must be 192.168.1.XXX (XX=5 or 6 or what you want).

This IP must be on the same network (192.168.1.___ as the computer at the other hand, which is 192.168.1.1.


Hope his thelped

Yordan
Go to the top of the page
 
+Quote Post
Mark420
post Dec 2 2006, 10:10 PM
Post #5


The Modernator
Group Icon

Group: Members
Posts: 486
Joined: 6-August 06
From: The Interweb!
Member No.: 15,021



Or maybe the best thign is to use DNS from the Linux box?
Let the windows pc pick up the settings via DNS..That way if you need to add another pc you will have lots of spare IPs to play with.

Im going out again just now like last night when we got talking about this..best thing to do is use google to search for setting up linux DNS and firewall

Its fairly easy to do you just need to set a range of IPs like 192.168.1.5 to 192.168.1.255 and now you can have 200 devices connected if you want.

Also like I mentioned last night..you can make a really good firewall for the inside network with just a few lines in your config file..hopefully you can google up a tutorual..if not Il get one for you tomorrow..

Also you will need NAT and port forwarding to allow programs like ftp smtp torrents..games etc specific routes tho the firewall and through the NAT to route directly to any inside IPs ports..

Something like this..134.176.60.121:21 to 192.168.2.5:21 that would be ftp..note i put a static IP in there? you can do it with DNS IP's too but I forget how to right now..ill post it up tomorrow when i get home..

Ive made a great firewall/switch/router from an old 486 with 64mb ram and a floppy drive and no hard drive before...once it was setup it just booted from the floppy..loaded the ipchains..dns..routign tables etc..and was good to go!! no monitor no kb no mouse on it..it just sat in the closet and was the best router you could ever have wink.gif)

Hope this helps a little

Marky;)

Go to the top of the page
 
+Quote Post
vizskywalker
post Dec 2 2006, 10:22 PM
Post #6


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



Okay, one key issue, the IPs I am given by school are fully routable to the outside world, and I would like to maintain that. So the IPs, if I can set this up properly are restricted.

I also need to be able to use this Linux machine as a computer.

Before I go looking for DNS tutorials, could you provide some more details on how the DNS setup and NAT work.

~Viz
Go to the top of the page
 
+Quote Post
yordan
post Dec 2 2006, 10:37 PM
Post #7


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,183
Joined: 16-August 05
Member No.: 7,896
myCENTs:15.50



Simply use my tricks if you want to use your own IP addresses, you don't need DNS nor nat nor firewall.
Firewall will be an axtra bonus for the next step, when everything will be working fine.
Go to the top of the page
 
+Quote Post
vizskywalker
post Dec 2 2006, 11:22 PM
Post #8


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



@yordan
The current configuration is
subnet mask on both changed to 255.255.255.0
ip of windows is 192.168.1.101
no other changes.

Still nothing happening
Neither computer is reading a link between the two.
Do I need to have a dhcp server or something running, and if so, how.

~Viz
Go to the top of the page
 
+Quote Post
yordan
post Dec 3 2006, 07:43 PM
Post #9


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,183
Joined: 16-August 05
Member No.: 7,896
myCENTs:15.50



QUOTE
Neither computer is reading a link between the two.

Ach ! this means that you have a hardware problem now! A computer should see a link as soon as you plug a cable.
If no computer sees a link, that means that you have a cable problem.
If you have a rather old PC, you need a true crossed Ethernet cable, which is not the case with the modern Ethernet adapters.
Try to borrow a crossed cable, and you should see the lamps on the adapters on as soon as you plug the cable. If no lamp come up or Windows sees no network, this means that your cable is bad, or your adapter has a problem.

This post has been edited by yordan: Dec 3 2006, 07:43 PM
Go to the top of the page
 
+Quote Post
vizskywalker
post Dec 5 2006, 10:43 PM
Post #10


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



I know the cable isn't bad, I'm working on checking the adapter, and it may need a crossover cable, but I highly doubt it. Looking into getting one though. Will I need to bridge the adapter that connects to the internet with the other connections, and if so how?

And yordan, If I have specific IP addresses that are fully routable to the rest of the world, I'm not sure I understand how your method of assigning an IP address to the adapter on the Linux box and using that as the default gateway for the other connections will accomplish this.

~Viz
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. create a folder without any name(10)
  2. How to create a guestbook with php !!!(8)
  3. Now Linux is ease(9)
  4. Linux SuSE detec you all hareware(2)
  5. Create Ur Own Avatar(12)
  6. You Cannot Create A File Named Con(10)
  7. How To Create Your Own MSN Winks ?(11)
  8. PC Takes Ages To Boot(8)
  9. Help Me Create A Text-based, Turn-based Game(10)
  10. What Made You Switch To Linux?(61)
  11. How To Create Exe File In Java?(13)
  12. Can You Create A Folder Name "con"(19)
  13. Could Linux Become The Dominant Os?(14)
  14. Sandisk Memory Card Write Protection(13)
  15. How To Create Your Own Proxy Site (free And Easy)(14)
  1. How To Create/edit/delete Ftp Accounts With Php(2)
  2. How To Play Music And Movie In Linux? Which Is The Good One?.(6)
  3. Linux For Beginners- Easy To Install(16)
  4. How To Create A "user Profile" Page.(14)
  5. Linux Beginners - Tutorial On Editors In Linux.(3)
  6. C/c++ -gdb Linux Debug Tool(1)
  7. Which Linux Version For Newbies?(14)
  8. What You Need Before You Can Create A Text-based Game..(7)
  9. Internet Connection In Linux Through Mobile(4)
  10. Linux Partitioning Guide (new Users)(1)
  11. Linux Software Installation Help(2)
  12. I Want To Get Linux, Which One Is Best?(6)
  13. When And What Is Your First Linux Experience?(4)


 



- Lo-Fi Version Time is now: 20th November 2008 - 11:30 PM