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 0h0P vyK0 *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 0 5ԙ';zo/ۜuU} [WBz|DLZ5.dC/ɦW>ߕePp 4|>lzRаKLr-5o'ks1> Q 00 `HB0U0U#0m+} U+6L!10AU:0806420http://crl.globalsign.net/PersonalSignClass2.crl0 *H dк>3S7ՊG8'lsN'A E,r曭+:g}8}K&[=YoN<)maJ1e04nDջ`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|!hR B0@0U 0U`{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`9PzM k|yNJ66dB_ĺ@:YMSPQ lm]|?|O'%pPYufX,މ ICw 00U0U00U|粱,ޱkvNlǹ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ΏUm pS.x<2/TY_SL$5ݿ.(ss`ix |xd_nõ'Y&poq_2`f>҄ Q/פ-oخ4 +{yebHb Sre&4ˋYS00 a!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 x6t9'iWǮM7onG[y_,RYi_gq.݉ $$DضN@, \Uv8z_d.^xNW Qx*$I^E)7C7q2*3jI[)Cjx2P1j24q]$Yab+ȈF91łv9HqK\$dd)^s&۟G*5Nrt6 00U0U0 0Um+} U+6L!109U2000.,*(http://crl.globalsign.net/primclass2.crl0 `HB0U#0|粱,ޱkvNlǹ0 *H zyFY?cU9L}B-[3 ?w쬪s<0k[̚zGyzMlC@3lpV ,Y8ν=ۧڡi8Wd7%nL؍W\7' \N',TB¤^v<D\JK}`0ira<LuN $,Q33OQsu&B]xvj;aZi2/A8:`6Z7+^m CtqDZZ1-0)00w10 UBE10U GlobalSign nv-sa1 0UPersonalSign Class 2 CA1+0)U"GlobalSign PersonalSign Class 2 CA vyK0 + 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 CA vyK0*H 10w10 UBE10U GlobalSign nv-sa1 0UPersonalSign Class 2 CA1+0)U"GlobalSign PersonalSign Class 2 CA vyK0 *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$>
