Re: multi-homing in freebsd

看板FB_current作者時間12年前 (2013/04/27 13:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串11/13 (看更多)
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. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HUsBbaI (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1HUsBbaI (FB_current)