Date: Sat, 9 Mar 2013 21:21:44 -0500 From: Zaphod Beeblebrox <zbeeble@gmail.com> To: Yasir hussan <kolyasir@gmail.com> Cc: Current <freebsd-current@freebsd.org>, Daniel Nebdal <dnebdal@gmail.com> Subject: Re: multi-homing in freebsd Message-ID: <CACpH0Md=8O1URdscbWffrWc05SOUoXHYeCMaoodtVA_gButrgQ@mail.gmail.com> In-Reply-To: <CAMwCe3QXarU%2BRh5qJWF-oY9aZiM_%2BY=2EcG02QAHVuq_mkOeuQ@mail.gmail.com> References: <CAMwCe3T1f8Ze8AnS%2BAXzPxatH522qUH0brGTE5ZmduxazPyivA@mail.gmail.com> <CAMwCe3QgcQeL=yhxAkNLxKLESHJkRrMT=sFKds_Gqa29KQ_Atw@mail.gmail.com> <CACpH0Mf=sxF8eFVeSA9FMBHv-PpreFPD5LKzLE90xQxP2TBAKg@mail.gmail.com> <CAMwCe3SXygBW1seqiJuB9vGTpHJLs1udsPZ2%2B3hjm5dK5du2-g@mail.gmail.com> <CA%2Bt49PJ0AarR%2Bdtc3dRfCg=ZmRHA730gCah3ZqBobFdVBmhJCg@mail.gmail.com> <CAMwCe3QXarU%2BRh5qJWF-oY9aZiM_%2BY=2EcG02QAHVuq_mkOeuQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 9, 2013 at 8:57 AM, Yasir hussan <kolyasir@gmail.com> wrote: > i want to have differnet ips`s and each should have different interface, > it could be a virtual interface. like u can made it like > > *ifconfig arge0.1 create* > > but each ip should able to access from differnet machine > > This is linux-specific. We don't create sub interfaces. If you want the equivalent on FreeBSD, you would just: ifconfig arge0 192.168.0.1/24 ifconfig arge0 192.168.1.1/24 alias ... and so on for as many addresses as you require. Replace "alias" with "delete" to remove an alias from an interface (including the first one). In retrospect, it might be good for us to harmonize the meanings there... > On Sat, Mar 9, 2013 at 7:29 AM, Daniel Nebdal <dnebdal@gmail.com> wrote: > >> Going by Zaphod's recommendation of using a /32 for each IP, how about >> this? >> >> ifconfig arge0 inet 192.168.1.100/32 >> ifconfig arge0 alias 192.169.1.100/32 >> > Nope, you miss an important point. If you were going to add 192.168.0.[123] you might: ifconfig em0 192.168.0.1/24 ifconfig em0 192.168.0.2/32 alias ifconfig em0 192.168.0.3/32 alias ... these three addresses are on the _same_ network. In your example above, you would require the correct netmask for each network _unless_ you did something like the following: ifconfig em0 192.168.1.1/15 ifconfig em0 192.168.1.100/32 alias ifconfig em0 192.169.1.100/32 alias ... ie: you're in effect saying the network goes from 192.168.1.0 to 192.169.255.255.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACpH0Md=8O1URdscbWffrWc05SOUoXHYeCMaoodtVA_gButrgQ>