Re: Virtual NICs w/different MAC addresses

From: P Gentry (rdgentry1_at_cablelynx.com)
Date: 05/05/04


Date: 5 May 2004 11:09:24 -0700

KR <kristian.rasmussen@broadpark.no.spam.com> wrote in message news:<4097e6de$1@news.broadpark.no>...
> Is it possible to set up a virtual NIC with a MAC address other than the
> one of the host (physical) NIC, and use dhcpcd/pump/dhclient and have a
> DHCP server assign an address to it?
>
> I have Internet access via cable, and my contract allows me to connect
> up to 5 different PCs to the cable modem. The ISP uses DHCP to assign IP
> addresses, and although the 5 addressess will always be in the same
> subnet, they are not contiguous and may change from time to time.

Don't bet on the fact that they will be on the same subnet (unless the
ISP promises and offers up his privates for a breach). The "typical"
URB that acts as the CMs gateway can support up to 6 subnets on the
same _physical_ cable segment -- ugly.

> This is what I'm trying to do: I want a Linux-based firewall between the
> 'net and my PCs, and I would like to NAT the PCs behind different IP
> addresses.

So use MASQing and keep your lan IPs private _and_ under your control.

> The problem is that the firewall PC obviously only gets assigned one
> address when I run 'dhcpcd eth0'. Creating an alias and running dhcpcd
> again (dhcpcd eth0:0) doesn't work as eth0:0 has the same MAC address as
> eth0. I guess could stick 4 extra NICs in the firewall, but surely there
> must be a better way to do it?

First, it is not clear to me why you want/need to use the ISP
addresses at all -- beyond the one for your FW. Simply use MASQing at
the FW and use private addresses on the lan.

If you need to use your ISP's dhcp addresses, then you need something
like dhcrelay (man dhcrelay -- it's available on RH -- or try
http://www.isc.org/ ). This will relay the dhcp requests to the
servers and relay back the replies to the clients.

Beware -- this will make setting up your FW filter rules a much bigger
pain than if you used private (static) IPs on the lan -- IPs that
_you_ assign/control. Not to mention that your entire lan will then
be exposed/reachable from the internet -- are you _sure_ you want that
headache?

hth,
prg
email above disabled



Relevant Pages

  • Re: networking private and public hosts questions
    ... while the private is 255.255.255.0. ... > some systmes in storage to create a test network. ... > a WS to the child and attempted to pull an IP from the DHCP server, ...
    (microsoft.public.win2000.networking)
  • [SLE] Re: SOLVED: [SLE] DHCP failure
    ... I'm running a 3-subnet LAN from a SUSE 9.3 box, and until yesterday I had a functioning LAN with a manually built dhcpd.conf file. ... Then I saved off that file and used YaST to poke around in the dhcp server section and the NIC section. ...
    (SuSE)
  • Re: Router incompatibility with Vista
    ... DHCP is still useful. ... My LAN uses all static addresses, ... I use reservations on the DHCP server for devices that I want to have ... I assume you are using NAT, since you mention port forwarding. ...
    (uk.telecom.broadband)
  • Re: Cant get External NIC to pick up DHCP address from cable mode
    ... I'm not up 100% on all of the networking technology that is out there but it ... you just pick one that is for LAN side networking such as 192.168.xxx.xxx. ... and make the server also be DHCP server for the workstations on your LAN. ...
    (microsoft.public.windows.server.sbs)
  • Re: How do I config a router for the LAN side of things.
    ... >Disable any DHCP Server option in your Netgear (DHCP Client functions are ... >Make sure the LAN is configured with an IP address (usually the same IP on ... >size, using same subnet mask as the LAN interface on Netgear, and then enter ...
    (comp.security.firewalls)