Computing.Net > Forums > Linux > Linux as a router - do I need 2 nic's?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Linux as a router - do I need 2 nic's?

Reply to Message Icon

Name: Dan
Date: March 20, 2002 at 09:36:53 Pacific
Comment:

I want to use my linux box as a router/firewall. Do I need two network cards, or can I assign multiple IP addresses to one nic?

If I can get away with only one nic, will I have problems with collisions? I would think not... since the cable modem is a 10mbit connection but the linux box and win2k machine both have 100mbit nics.. using a 5 port netgear switch.



Sponsored Link
Ads by Google

Response Number 1
Name: jerry
Date: March 20, 2002 at 10:01:15 Pacific
Reply:

You need two nic's.

You cannot assign two ip addresses to one nic. It is impossible.

Give your linux box a real ip and a private like 192.x.x.x

Then go to http://www.e-infomax.com/ipmasq/

Follow the instructions, ipmasq will give you a firewall as well nat. Follow the instructions for ipmasq, they give you example config files, that you can use. All you have to do is modify them slightly with your nic ip info.

works great...I use a linux box and ipmasq to firewall off 48 pc's running linux. One real world ip and a inside ip of 192.168.0.x.

hope this helps

jerry


0

Response Number 2
Name: Charles Wilkins
Date: March 20, 2002 at 20:47:09 Pacific
Reply:

Well, actually you can assign several ip addresses to a single nic.

The same way you assign eth0 an ip address, you can assign to eth0:0, eth0:1, eth0:2, etc.

Therefore, technically, but not ideally, you can set up a router with one nic.

Charles


0

Response Number 3
Name: pcdoc
Date: March 20, 2002 at 20:48:39 Pacific
Reply:

I use one nic with command ifconfig eth0:0 with my ipmasq.


0

Response Number 4
Name: Dan
Date: March 21, 2002 at 08:06:07 Pacific
Reply:

great. I figured if NT can do multiple IP's on a single nic then linux should also.

Question 2 - in NT if I set my nic for DHCP then I can't assign static IP's. does this hold for linux too? or can I set eth0:0 to dhcp (cable modem requires it) and eth0:1 to a static ip???

Question 3 - how much additional latency can I expect? Or is it so fast that my pings won't change???


0

Response Number 5
Name: regal
Date: March 24, 2002 at 12:37:45 Pacific
Reply:

http://www.freesco.info/


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Linux as a router - do I need 2 nic's?

Linux as a router