Koozali.org: home of the SME Server

just one ethernet card

renaud devers

just one ethernet card
« on: February 25, 2001, 12:16:20 AM »
Hello
I need some help...
I have juste one ETH0 and i want to do a gateway ( the eth0 card was connected to a HUB). If anyone now how have the same card on my external and local  network settings, it was cool.

thinks a lot for our reply.
ps. E-Smith 4.1


                     best regard   renaud

Gerald Jansen

Re: just one ethernet card
« Reply #1 on: February 25, 2001, 07:13:37 AM »
No can do. Think about it. How can you provide access to the internet and to your local network with a single connection, can't be done.

rk

Re: just one ethernet card
« Reply #2 on: February 25, 2001, 09:55:20 AM »
This may be possible.  I am screwing around with the same thing.  Try to set your system up for both Server and Gateway.  Set the ETH1 to your internal address for the machine, and ETH0 to DHCP.  Use the same network type.  Then all internal traffic goes in through ETH1, and out through ETH0.

Again, this is all theoretical.  I have a server that I am putting together that basically does this, only just with the webserver.  The Internet sees my server through ETH0, and I connect internally via ETH1.  I don;t route all my traffic through the box though.

Now I only wish that the system came with gcc and kernel headers.  It's a nightmare trying to install new web packages without it!

rk

Gerald Jansen

Re: just one ethernet card
« Reply #3 on: February 25, 2001, 05:00:07 PM »
What is the possible advantage doing this? if it were to work? Good realtec 10/100 cards cost less than $10.00. What happens if you have internet traffic and local network traffic at the same time. This borders on insanity.

Boris

Re: just one ethernet card
« Reply #4 on: February 25, 2001, 09:00:27 PM »
It’s done by using sub-interfaces (aliases, virtual interface depends on terminology)
The trick is to create interface ETH0:1, ETH0:2 WTH1:1 etc. you got the idea :-)
After this you have logical interfaces (Lets say Eth0 and Eth0:1) to manage traffic, do routing, NAT etc. Physically all the traffic still going through the same NIC so its not a good idea for busy network, but works OK for small, home networks.
Down side is (I've been using it myself for more then 2 years with floppy based firewalls) you can not use any spoofing detection-protection rules (guess why :-))
and you are NOT protected against such attacks.
You can create interface using command like
ifconfig eth0:1 a.b.c.d(your IP address) netmask 255.255.255.0(or whatever)
but then many scripts need to be redone to reflect nonstandard interface. It’s just not worth it any more with NIC prices like they are today.
Good luck.