On Sat, Mar 9, 2013 at 8:57 AM, Yasir hussan <kolyasir_at_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_at_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.Received on Sun Mar 10 2013 - 01:21:45 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:35 UTC