Date: Tue, 12 Mar 2013 18:10:21 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Yasir hussan <kolyasir@gmail.com> Cc: Current <freebsd-current@freebsd.org> Subject: Re: using multiple interfaces for same Network Card Message-ID: <20130313011021.GC88785@funkthat.com> In-Reply-To: <CAMwCe3TfpGvF_h8QwCvKZjyezBSKAFpM=uJS7t-i1NaDCeyuzw@mail.gmail.com> References: <CAMwCe3SeCroZW1EuZ1FouZcu9S6==o%2BCDoukZt_o2UQjTvcV9Q@mail.gmail.com> <CAFHbX1LDeWRZ=KTJTYy=0QOsoSuRCTp0odiGngq=pWD4Qjpm4Q@mail.gmail.com> <CAMwCe3SyJJVLDciEYjt2urQ9Z2HwPWA1c1pLQC1Y8qJ8p-0f3g@mail.gmail.com> <E1UFNyS-000H0R-TC@clue.co.za> <CAMwCe3S6kyokrv9rVsHqHUuas58C0jqkEJz2WoK5cOMnHS4rFg@mail.gmail.com> <20130312183947.GB88785@funkthat.com> <CAMwCe3TfpGvF_h8QwCvKZjyezBSKAFpM=uJS7t-i1NaDCeyuzw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Yasir hussan wrote this message on Wed, Mar 13, 2013 at 00:03 +0500: > U say u were successfully using vlans by vlandev in FreeBSD , Can u send > me exact commands and configuration which u were applying, It will be very > helpful for me... This is how I use it on my router... These lines are in rc.conf, from a 9.0 box: ifconfig_npe1="inet 192.168.x.x netmask 255.255.255.0" vlans_npe1="12 13" ifconfig_npe1_12="inet 10.y.y.y netmask 255.255.255.0" ifconfig_npe1_13="inet z.z.z.z netmask 255.255.255.0" ifconfig_npe1_13_alias0="inet z.z.z.z2 netmask 255.255.255.255" Replace npe1 w/ the interface you are using.. And obviously replace the ip's w/ the correct ones... My internet connection is connected to vlan 13 on npe1, and I have two ip addressess associated w/ that interface... I believe you can do "/etc/rc.d/netif start" if you don't want to reboot, but I've never done that.. I've just rebooted, since this is my router and I want to make sure it comes up... Good luck... > On Tue, Mar 12, 2013 at 11:39 PM, John-Mark Gurney <jmg@funkthat.com> wrote: > > > Yasir hussan wrote this message on Tue, Mar 12, 2013 at 23:32 +0500: > > > Yes, i want to use them as vlan interface, Does any one has used > > *vlandev*, > > > after seen this > > > > > http://www.cyberciti.biz/faq/howto-configure-freebsd-vlans-with-ifconfig-command/i > > > tried to use it as > > > > > > ifconfig vlan11 create 10.10.11.1 255.255.255.0 vlan 11 vlandev arge0 > > > ifconfig vlan12 create 10.10.12.1 255.255.255.0 vlan 12 vlandev arge0 > > > ifconfig vlan13 create 10.10.13.1 255.255.255.0 vlan 13 vlandev arge0 > > > ifconfig vlan14 create 10.10.14.1 255.255.255.0 vlan 14 vlandev arge0 > > > > > > i was expecting that it will create interfaces which will work under > > arge0, > > > and will able to ping from any pc, Does any one have used it, kindly > > guide > > > me about it > > > > vlans are a way to add different broadcast domains.. You need to have a > > vlan capable switch/machine connected and properly configured... If you > > plug in the machine to a normal switch, and the other machine isn't vlan > > aware not much will happen... > > > > Now if you configure your machine to route (net.inet.ip.forwarding) and > > setup the pc w/ the proper routing tables, you'll be able to ping the > > machines... > > > > If this doesn't help, please talk w/ a local network engineer to help > > you configure your network properly... > > > > I'm succussfully using FreeBSD with both vlans, and aliases (multiple > > ips on a single interface aka broadcast domain)... > > > > > On Tue, Mar 12, 2013 at 5:06 PM, Ian FREISLICH <ianf@clue.co.za> wrote: > > > > > > > Yasir hussan wrote: > > > > > Thanks for notic but all the elebration was for make alias on one > > > > > interface but i want to have multiple interface, i can no where that > > > > > some one would have tring to creating new interfaces and using them, > > > > > or may be i am missing something, just send its solution if have, > > > > > solution should be for > > > > > > > > I still think you're confusing Linux semantics with FreeBSD semantics. > > > > > > > > On linux you would have: > > > > eth0 Link encap:Ethernet HWaddr 00:1E:C9:53:0B:61 > > > > inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0 > > > > inet6 addr: fe80::21e:c9ff:fe53:b61/64 Scope:Link > > > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > > > RX packets:211328068 errors:0 dropped:0 overruns:0 frame:0 > > > > TX packets:368394006 errors:0 dropped:0 overruns:0 carrier:0 > > > > collisions:0 txqueuelen:1000 > > > > RX bytes:34065846811 (31.7 GiB) TX bytes:476377525764 (443.6 > > > > GiB) > > > > Interrupt:169 Memory:e6000000-e6011100 > > > > > > > > eth0:1 Link encap:Ethernet HWaddr 00:1E:C9:53:0B:61 > > > > inet addr:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0 > > > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > > > Interrupt:169 Memory:e6000000-e6011100 > > > > > > > > > > > > On FreeBSD you would have: > > > > > > > > re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu > > 1500 > > > > > > > > > > options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE> > > > > ether 54:04:a6:96:0c:1e > > > > inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255 > > > > inet 10.0.1.1 netmask 0xffffff00 broadcast 10.0.1.255 > > > > media: Ethernet autoselect (1000baseT <full-duplex>) > > > > status: active > > > > > > > > These are both the same thing. Is there any particular reason that > > > > you want multiple interfaces? I can't see a use for it beyond "it's > > > > what I'm used to seeing" unless they're VLAN interfaces. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130313011021.GC88785>