LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Combined bridging and dhcp (https://www.linuxquestions.org/questions/linux-networking-3/combined-bridging-and-dhcp-315682/)

Ossar 04-21-2005 09:47 AM

Combined bridging and dhcp
 
Is it possible to assign my gateway a public ip address and at the same time bridge another ip public ip address, all through the same external interface?

Itzac 04-21-2005 10:04 AM

You can only assign one ip address to any consumer-level NIC. So you'd actually need three NICs in this machine - two to the outside world and one to the LAN.

I just had an idea, tho. You could set up the bridge. It might then be possible to forward a particular ip address through the loop-back, but this would likely screw up most web services because of addess inconsistencies.

Ossar 04-21-2005 11:53 AM

I thought of this sollution but I think it will look rather strange and a waste of money. But if there is no other way...

My real setup is this. I don't have any static public ip addresses, only up to five dynamic. So my 24/7 server gets one ip address. The windows machine behind this linux gateway wants a public ip address. Why put it behind the linux gateway? Never trust a windows machine without some kind of hardware firewall...

member57 04-21-2005 04:02 PM

You can assign numerous IP's to a NIC, even a "consumer level" NIC. Now about dynamic, PPOE, etc, IPs I don't know. I have a LNE-100TX right now using 3 IP's so I know a "consumer level" NIC can have multiple IPs.

Itzac 04-22-2005 02:46 PM

You'll have to tell us how to do this because I'm quite intrigued. Having reread Ossar's earlier posts, it would seem to me that you're really still only assigning one ip address to each machine. You just want the gateway to route traffic for a particular ip address directly to the windows box. I'm not sure how to do this but I'd guess it would involve ip tables or something. The one thing you need to keep in mind is that if you just route all traffic bound for that ip directly to the windows box you lose any benefit of the firewall; it becomes completely transparent. You could just use the XP SP2 firewall, or install third party software on the machine. ZoneAlarm is a great program.

member57 05-02-2005 11:31 AM

ifconfig eth0:1(virtual interface#) [ip,gateway,dns,other options]<br>
this command will create the virtual interface. I now have 4 ip addresses on a "consumer level" NIC now, a Linksys LNE-100tx. <br>To route to another host or network you would use the 'route' command, use the man page to help figure it out. To answer your first question, you can do the virtual interface, but it would not be a good idea. You should use 2 NICs, one for WAN, one for LAN. Using one interface could cause problems with security. I could keep explaining, but it would take too long to explain the topology to make the single NIC, multiple IP dynamic/static comno configuration.


All times are GMT -5. The time now is 11:00 PM.