Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2006 06:59:49 +0200
From:      "Terrence Koeman" <root@mediamonks.net>
To:        <freebsd-questions@freebsd.org>
Subject:   Faking multiple physical adapters for DHCPDISCOVER
Message-ID:  <005801c65d24$c9f350d0$5dd9f270$@net>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi,

I'm trying to 'fake' multiple phisical adapters in my FreeBSD 6.1-PRERELEASE
system, but I'm not getting anywhere.

-There are two 3Com 905C cards in the system (xl0 and xl1).
-xl1 is assigned a static private IP address and xl0 aquires an address from
my provider using DHCP.
-The system does NAT for several clients having private addresses.

I need to 'clone' the xl1 adapter to appear as three adapters, each with a
distinct MAC address. This because my provider has assigned me three
semi-static addresses of which I want to use 1 for outbound NAT-traffic and
two for static NAT.

These addresses are semi-static because they are basically MAC-based
reservations on the providers DHCP server, and it happens to be that I'm
required to aquire a DHCP lease for all three addresses for routing to work
properly. If I configure the addresses statically the connectivity
'disappears' after a while.

I tried using netgraph as suggested here:
http://ezine.daemonnews.org/200406/netgraph.html

ifconfig xl1 delete
ngctl mkpeer . eiface hook ether
ifconfig ngeth0 up
ngctl mkpeer ngeth0: bridge lower link0
ngctl name ngeth0:lower mybridge
ngctl connect xl1: mybridge: lower link1
ngctl connect xl1: mybridge: upper link2
ngctl connect ngeth0: mybridge: upper link3
ngctl msg xl1: setautosrc 0
ngctl msg xl1: setpromisc 1
ifconfig ngeth0 link 00:50:04:32:8a:6b

At this point everything seems OK, the MAC-address is correctly set and xl1
is in promiscous mode. However, when I try 'dhclient ngeth0' the adapter does
not get any response/lease.

I also tried using a vlan interface as following:

ifconfig vlan create
ngctl msg xl1: setautosrc 0
ifconfig vlan0 vlan 0 vlandev xl1 
ifconfig vlan0 link 00:50:04:32:8a:6b

The same here, 'dhclient vlan0' fails.

I also thought that it'd be much simpler to have a dhcp client that I could
instruct to spoof the MAC-addresses so that it would aquire leases for 3
distinct mac-addresses, and run as a daemon so that it renews them when they
expire. I could then just configure the addresses statically and don't have
to clone any adapters. However, I haven't found any client that could do
this...

At the moment I'm out of ideas and I was hoping that someone here could point
me in the right direction with this problem.

-- 
Regards,
Terrence Koeman

MediaMonks B.V. (www.mediamonks.com)
Please quote all replies in correspondence.



[-- Attachment #2 --]
0	*H
010	+0	*H
0h0PvyK0
	*H
0w10	UBE10U
GlobalSign nv-sa1 0UPersonalSign Class 2 CA1+0)U"GlobalSign PersonalSign Class 2 CA0
051229122418Z
061229122418Z0e10	UNL10U
MediaMonks B.V.10UTerrence Koeman1"0 	*H
	root@mediamonks.net00
	*H
05ԙ';zo/ۜuU}	[WBz|DLZ5.dC/ɦW>ߕePp4|>lzRаKLr-5o'ks1>
Q00	`HB0U0U#0m+}
U+6L!10AU:0806420http://crl.globalsign.net/PersonalSignClass2.crl0
	*H
dк>3S7ՊG8'lsN'AE,r曭+:g}8}K&[=YoN<)maJ1e04nDջ`FFسE<He+R/7Q]+1V`Huiz6%O)hnyOs'aT	F!eSt@6,ttEcQd%Ԙks\-43n"q*0u0]x0
	*H
0W10	UBE10U
GlobalSign nv-sa10URoot CA10UGlobalSign Root CA0
980901120000Z
140128120000Z0W10	UBE10U
GlobalSign nv-sa10URoot CA10UGlobalSign Root CA0"0
	*H
0
晍ΣO~%kH*cgfH+)e-˫Lp=
0OԌPP.R}m50^CsAj㲉:V98o<i[*MŧTl̛<<xtnDaэFumlx
8$OsT:4w 	Sn{7tpG"QcyA&+FHd*׃4,*lCJ|!hRB0@0U0U`{fE
ʉP/}4K0U00
	*H
_9)(4lOodpJO`(I}
尝=6ۏQ	1*݉w.l˴?Mj*-xo+DPL$ZG^I7:)G:<wFcS!Ѭ~IKgY/,B|5է1:NcC9a4ӘC4);VXw>TE1ekXqR2@`y$lfݘDO.{k,vFx00ˠa0
	*H
0W10	UBE10U
GlobalSign nv-sa10URoot CA10UGlobalSign Root CA0
990128120000Z
140127110000Z0m10	UBE10U
GlobalSign nv-sa10UPrimary Class 2 CA1&0$UGlobalSign Primary Class 2 CA0"0
	*H
0
EAnؿ!oR,?Jc*I'ZtUѪy՝OƲ^c:o(A"NH׿Ϲٽ8O;
DnUA	ؿ!L"ĨkOuhV(P$.$9	dI!h~q0`9PzMk|yNJ66dB_ĺ@:YMSPQ
lm]|?|O'%pPYufX,މICw00U0U00U|粱,ޱkvNlǹ03U,0*0(&$"http://crl.globalsign.net/Root.crl0U#0`{fE
ʉP/}4K0
	*H
@`_J	a"Ћ;JzíN:3J
6n=>ks7vPi肋)&=ijh{+>hSz`v#xy4ΏUmpS.x<2/TY_SL$5ݿ.(ss`ix
|xd_nõ'Y&poq_2`f>҄	Q/פ-oخ4	+{yebHb
Sre&4ˋYS00a!j0
	*H
0m10	UBE10U
GlobalSign nv-sa10UPrimary Class 2 CA1&0$UGlobalSign Primary Class 2 CA0
040122090000Z
140127100000Z0w10	UBE10U
GlobalSign nv-sa1 0UPersonalSign Class 2 CA1+0)U"GlobalSign PersonalSign Class 2 CA0"0
	*H
0
x6t9'iWǮM7onG[y_׺,RYi_gq.݉$$DضN@, \Uv8z_d.^xNW
Qx*$I^E)7C7q2*3jI[)Cjx2P1j24q]$Yab+ȈF91łv9HqK\$dd)^s&۟G*5Nrt600U0U00Um+}
U+6L!109U2000.,*(http://crl.globalsign.net/primclass2.crl0	`HB0U#0|粱,ޱkvNlǹ0
	*H
zyFY?cU9L}B-[3 ?w쬪s<0k[̚zGyzM׸lC@3lpV  
,Y8ν=ۧڡi8Wd7%nL؍W\7'\N',TB¤^v<D\JK}`0ira<LuN	$,Q33OQsu&B]xvj;aZi2/A8:`6Z7+^mCtqDZZ1-0)00w10	UBE10U
GlobalSign nv-sa1 0UPersonalSign Class 2 CA1+0)U"GlobalSign PersonalSign Class 2 CAvyK0	+0	*H
	1	*H
0	*H
	1
060411045949Z0#	*H
	1Lt\	jH}_0g	*H
	1Z0X0
*H
0*H
0
*H
@0+0
*H
(0+0
*H
0	+7100w10	UBE10U
GlobalSign nv-sa1 0UPersonalSign Class 2 CA1+0)U"GlobalSign PersonalSign Class 2 CAvyK0*H
	10w10	UBE10U
GlobalSign nv-sa1 0UPersonalSign Class 2 CA1+0)U"GlobalSign PersonalSign Class 2 CAvyK0
	*H
FOuτ`#6'4k(8^92exzAfoVrAkBN"9G}o#ӋZ@mP2
UwÃG\ľnbm,!A}nb

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005801c65d24$c9f350d0$5dd9f270$>