Re: creating a netbsd router
On 2017-07-22 18:35, g...@duzan.org wrote: I wrote: => "Johnny Billquist"wrote: => => On 2017-07-22 16:38, dieter roelants wrote: => =>> On Wed, 19 Jul 2017 22:33:36 +0200 => =>> Johnny Billquist wrote: => =>> => =>>> No. You should not set an ip address on any of the interfaces. You => =>>> create a bridge interface, connect all the physical interfaces to the => =>>> bridge interface, and you set an ip address on the bridge interface. => =>> => =>> That's not how it works in NetBSD. You cannot add IP addresses to the => =>> bridge interface itself. => => => => Thanks for the correction. Interesting and unexpected (for me). => =>I believe the NetBSD way would be to create a tun interface, add that => to the bridge, and configure the IP address on that. Drat. I meant "tap" interface. "ifconfig tap0 create", etc. Ah, yes. Using tap would in my view be the proper way. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: creating a netbsd router
"Johnny Billquist"wrote: => On 2017-07-22 16:38, dieter roelants wrote: =>> On Wed, 19 Jul 2017 22:33:36 +0200 =>> Johnny Billquist wrote: =>> =>>> No. You should not set an ip address on any of the interfaces. You =>>> create a bridge interface, connect all the physical interfaces to the =>>> bridge interface, and you set an ip address on the bridge interface. =>> =>> That's not how it works in NetBSD. You cannot add IP addresses to the =>> bridge interface itself. => => Thanks for the correction. Interesting and unexpected (for me). I believe the NetBSD way would be to create a tun interface, add that to the bridge, and configure the IP address on that. Gary Duzan
Re: creating a netbsd router
On 2017-07-22 16:38, dieter roelants wrote: On Wed, 19 Jul 2017 22:33:36 +0200 Johnny Billquistwrote: No. You should not set an ip address on any of the interfaces. You create a bridge interface, connect all the physical interfaces to the bridge interface, and you set an ip address on the bridge interface. That's not how it works in NetBSD. You cannot add IP addresses to the bridge interface itself. Thanks for the correction. Interesting and unexpected (for me). Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: creating a netbsd router
On Wed, 19 Jul 2017 22:33:36 +0200 Johnny Billquistwrote: > No. You should not set an ip address on any of the interfaces. You > create a bridge interface, connect all the physical interfaces to the > bridge interface, and you set an ip address on the bridge interface. That's not how it works in NetBSD. You cannot add IP addresses to the bridge interface itself. dieter > > Johnny >
Re: creating a netbsd router
If everything works, then all is good. My thinking about the ip address on the bridge interface is just that I find it more natural to think of the bridge as represented by the bridge interface, and not some individual physical interface that is a part of it. But in the end, it's just that you need a local IP address, and a path out on your bridged network from the local host. If you accomplish that through one of the participating physical interfaces, or through the bridge interface is in the end a minor detail. And no, you would not manage that through brconfig, but through ifconfig, which is the tool through which you set ip addresses on interfaces. The bridge interface is not so different from any other interface. Johnny On 2017-07-19 23:02, Derrick Lobo wrote: Yes I have routing and running DHCP/DNS on this device.. As for IP address on the bridge interface I did try it, but it may have not worked since I did not have the ifconfig file with "UP" in them.. I have two static IPs on LAN so im not sure if an alias would work on a bridge interface since I don’t see an option on brconfig for it. But yes seems like it will work if I have just one LAN IP address(I run an app on the alias interface.). Derrick Lobo -Original Message- From: Johnny Billquist [mailto:b...@update.uu.se] Sent: Wednesday, July 19, 2017 4:44 PM To: Brook Milligan; Derrick Lobo Cc: Francisco Valladolid H.; netbsd-users@netbsd.org Subject: Re: creating a netbsd router On 2017-07-19 20:01, Brook Milligan wrote: On Jul 19, 2017, at 10:01 AM, Derrick Lobo <derrick.l...@givex.com> wrote: So does that means each of the interface has an ip eg 192.168.0.1 on wm1 192.168.0.2 on wm2 and so on and then just bridge all the interface. Ill try that . for now only wm1 had an ip the rest did not have an ifconfig.wmx file I have a setup more or less like what I think you are interested in: 1 uplink port and 3 bridged ports. The uplink port is just marked up in its ifconfig file and gets its IP via dhcp from upstream. Right. In addition, it might be worth pointing out that you need to enable routing in the system, or else the machines connected to the bridge will not be able to reach outside. You might also want to turn on a dhcp server for the bridge side, so that machines connected on that side gets an ip address, but all that are parts you are free to play with as you wish. Only one of the 3 bridged ports is assigned an IP; the rest are just marked up in their ifconfig files. All four ports have individual ifconfig files. My ifconfig.bridge0 file looks like this: create !brconfig $int \ add wm1 \ add wm2 \ add wm3 \ up Whatever is plugged into any of the 3 bridged ports just communicate amongst themselves just like a “real” switch. Right. I'm a bit surprised if you really need to set an ip address on any of those interfaces. Seems illogical and unnecessary. When you add them to the bridge, they will all be set in promiscuous mode anyway. No IP address needed. However, you do need your own IP address on this bridge, which I would think you normally setup through the bridge interface itself. And then, with routing enabled, machines on the inside can reach out. You might also want to run nat on this, unless you have a public range of ip addresses. But it's all fairly straight forward, if you just think about it. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
RE: creating a netbsd router
Yes I have routing and running DHCP/DNS on this device.. As for IP address on the bridge interface I did try it, but it may have not worked since I did not have the ifconfig file with "UP" in them.. I have two static IPs on LAN so im not sure if an alias would work on a bridge interface since I don’t see an option on brconfig for it. But yes seems like it will work if I have just one LAN IP address(I run an app on the alias interface.). Derrick Lobo -Original Message- From: Johnny Billquist [mailto:b...@update.uu.se] Sent: Wednesday, July 19, 2017 4:44 PM To: Brook Milligan; Derrick Lobo Cc: Francisco Valladolid H.; netbsd-users@netbsd.org Subject: Re: creating a netbsd router On 2017-07-19 20:01, Brook Milligan wrote: > >> On Jul 19, 2017, at 10:01 AM, Derrick Lobo <derrick.l...@givex.com> >> wrote: >> >> So does that means each of the interface has an ip eg 192.168.0.1 on >> wm1 >> 192.168.0.2 on wm2 and so on and then just bridge all the interface. >> Ill try that . for now only wm1 had an ip the rest did not have an >> ifconfig.wmx file > > I have a setup more or less like what I think you are interested in: 1 > uplink port and 3 bridged ports. > > The uplink port is just marked up in its ifconfig file and gets its IP via > dhcp from upstream. Right. In addition, it might be worth pointing out that you need to enable routing in the system, or else the machines connected to the bridge will not be able to reach outside. You might also want to turn on a dhcp server for the bridge side, so that machines connected on that side gets an ip address, but all that are parts you are free to play with as you wish. > Only one of the 3 bridged ports is assigned an IP; the rest are just > marked up in their ifconfig files. All four ports have individual > ifconfig files. > > My ifconfig.bridge0 file looks like this: > > create > !brconfig $int \ > add wm1 \ > add wm2 \ > add wm3 \ > up > > Whatever is plugged into any of the 3 bridged ports just communicate > amongst themselves just like a “real” switch. Right. I'm a bit surprised if you really need to set an ip address on any of those interfaces. Seems illogical and unnecessary. When you add them to the bridge, they will all be set in promiscuous mode anyway. No IP address needed. However, you do need your own IP address on this bridge, which I would think you normally setup through the bridge interface itself. And then, with routing enabled, machines on the inside can reach out. You might also want to run nat on this, unless you have a public range of ip addresses. But it's all fairly straight forward, if you just think about it. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: creating a netbsd router
On 2017-07-19 20:01, Brook Milligan wrote: On Jul 19, 2017, at 10:01 AM, Derrick Lobowrote: So does that means each of the interface has an ip eg 192.168.0.1 on wm1 192.168.0.2 on wm2 and so on and then just bridge all the interface. Ill try that . for now only wm1 had an ip the rest did not have an ifconfig.wmx file I have a setup more or less like what I think you are interested in: 1 uplink port and 3 bridged ports. The uplink port is just marked up in its ifconfig file and gets its IP via dhcp from upstream. Right. In addition, it might be worth pointing out that you need to enable routing in the system, or else the machines connected to the bridge will not be able to reach outside. You might also want to turn on a dhcp server for the bridge side, so that machines connected on that side gets an ip address, but all that are parts you are free to play with as you wish. Only one of the 3 bridged ports is assigned an IP; the rest are just marked up in their ifconfig files. All four ports have individual ifconfig files. My ifconfig.bridge0 file looks like this: create !brconfig $int \ add wm1 \ add wm2 \ add wm3 \ up Whatever is plugged into any of the 3 bridged ports just communicate amongst themselves just like a “real” switch. Right. I'm a bit surprised if you really need to set an ip address on any of those interfaces. Seems illogical and unnecessary. When you add them to the bridge, they will all be set in promiscuous mode anyway. No IP address needed. However, you do need your own IP address on this bridge, which I would think you normally setup through the bridge interface itself. And then, with routing enabled, machines on the inside can reach out. You might also want to run nat on this, unless you have a public range of ip addresses. But it's all fairly straight forward, if you just think about it. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
RE: creating a netbsd router
Thanks Yes based on the instruction provided by Brook Milligan I create the interface file with "up" in it and it worked.. Thanks once again.. I have it working I have tested it with connecting 4 switches to the 4 port as well as connecting DHCP and static hardware to the 4 ports and all worked with no issues. Derrick -Original Message- From: Johnny Billquist [mailto:b...@update.uu.se] Sent: Wednesday, July 19, 2017 4:34 PM To: Derrick Lobo; Francisco Valladolid H.; netbsd-users@netbsd.org Subject: Re: creating a netbsd router On 2017-07-19 18:01, Derrick Lobo wrote: > Thanks Johnny > > So does that means each of the interface has an ip eg 192.168.0.1 on > wm1 > 192.168.0.2 on wm2 and so on and then just bridge all the interface. > Ill try that . for now only wm1 had an ip the rest did not have an > ifconfig.wmx file No. You should not set an ip address on any of the interfaces. You create a bridge interface, connect all the physical interfaces to the bridge interface, and you set an ip address on the bridge interface. Johnny > > Derrick Lobo > -Original Message- > From: Johnny Billquist [mailto:b...@update.uu.se] > Sent: Wednesday, July 19, 2017 11:53 AM > To: Derrick Lobo; Francisco Valladolid H.; netbsd-users@netbsd.org > Subject: Re: creating a netbsd router > > I seriously doubt agr is what you wanted anyway. > It's for if you want to have multiple parallell connections between > two devices in order to increase capacity. Ie. aggregate link. > > A bridge is what you want if you have multiple connections locally, > but you want them to all be associated with just one device locally, > and they should also be able to communicate directly between two ports > without your host being involved. Ie, a hub or a switch like function, > with just one interface for your local machine, which works the same > as any other port on the bridge. It's all like one ethernet segment. > > But you need to understand how you actually set it up to get it working. > You should not be playing with the individual interfaces... Just add > them all to the bridge interface, and then you use the bridge interface. > > Johnny > > On 2017-07-19 17:44, Derrick Lobo wrote: >> Thanks Everyone >> >> >> >> Agr does not work because you have to remove all IPs from the >> interface, before you add them.. and then theres no way to add an IP >> to the agr. Eg >> 192.168.0.1 I need this ip so that it becomes the LAN gateway for my >> internal PCs. >> >> >> >> Im checking briding, for now I could not get it to work will >> investigate this further. >> >> >> >> Thanks again everyone >> >> >> >> Derrick >> >> >> >> >> >> *From:*Francisco Valladolid H. [mailto:fic...@gmail.com] >> *Sent:* Sunday, July 16, 2017 6:41 AM >> *To:* Derrick Lobo; netbsd-users@netbsd.org >> *Subject:* Re: creating a netbsd router >> >> >> >> Hi folks >> >> >> >> On Sat, Jul 15, 2017 at 4:06 AM Derrick Lobo <derrick.l...@givex.com >> <mailto:derrick.l...@givex.com>> wrote: >> >> I have a device with 8 network interface,so wondering if I can set >> this up as my router/switch >> >> Ok >> >> >> >> I would like to create eth0 as the WAN interface and the remaining >> eth1-6 as the LAN interface so that I can connect multiple switches >> and devices directly on the 7 remaining ports.. is vlan, bridging >> the way to go .. linux uses bonding and im not sure if freebsds lagg >> is the same thing.. Anyone can provide information or link on how I >> can achieve this. >> >> >> >> Yes you can. You can use bridging, setting VLAN and agrégate >> interfaces like Linux with the agr(4) >> >> >> >> http://man-k.org/man/NetBSD-current/4/agr?r=1=Agr >> >> >> >> >> >> So eth0 would have a public Ip while the rest ports would have one >> LAN IP whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc >> on these interface to support my LAN. >> >> >> >> Yes, eth0 can be wan with the public IP and the rest can be LAN, >> setting dhcp over any interfaz and setting a DNS cache. >> >> >> >> Please review the npf.conf manual for information about the firewall >> program >> >> >> >> http://man-k.org/man/NetBSD-current/5/npf.conf?r=2=Npf.conf >> >> >> >> >> >> Bes regards. >> >> Thanks >> >> Derrick Lobo >> >> -- >> >> Francisco Valladolid H. >> -- http://blog.bsdguy.net - Jesus Christ follower. >> > > -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: creating a netbsd router
On 2017-07-19 18:01, Derrick Lobo wrote: Thanks Johnny So does that means each of the interface has an ip eg 192.168.0.1 on wm1 192.168.0.2 on wm2 and so on and then just bridge all the interface. Ill try that . for now only wm1 had an ip the rest did not have an ifconfig.wmx file No. You should not set an ip address on any of the interfaces. You create a bridge interface, connect all the physical interfaces to the bridge interface, and you set an ip address on the bridge interface. Johnny Derrick Lobo -Original Message- From: Johnny Billquist [mailto:b...@update.uu.se] Sent: Wednesday, July 19, 2017 11:53 AM To: Derrick Lobo; Francisco Valladolid H.; netbsd-users@netbsd.org Subject: Re: creating a netbsd router I seriously doubt agr is what you wanted anyway. It's for if you want to have multiple parallell connections between two devices in order to increase capacity. Ie. aggregate link. A bridge is what you want if you have multiple connections locally, but you want them to all be associated with just one device locally, and they should also be able to communicate directly between two ports without your host being involved. Ie, a hub or a switch like function, with just one interface for your local machine, which works the same as any other port on the bridge. It's all like one ethernet segment. But you need to understand how you actually set it up to get it working. You should not be playing with the individual interfaces... Just add them all to the bridge interface, and then you use the bridge interface. Johnny On 2017-07-19 17:44, Derrick Lobo wrote: Thanks Everyone Agr does not work because you have to remove all IPs from the interface, before you add them.. and then theres no way to add an IP to the agr. Eg 192.168.0.1 I need this ip so that it becomes the LAN gateway for my internal PCs. Im checking briding, for now I could not get it to work will investigate this further. Thanks again everyone Derrick *From:*Francisco Valladolid H. [mailto:fic...@gmail.com] *Sent:* Sunday, July 16, 2017 6:41 AM *To:* Derrick Lobo; netbsd-users@netbsd.org *Subject:* Re: creating a netbsd router Hi folks On Sat, Jul 15, 2017 at 4:06 AM Derrick Lobo <derrick.l...@givex.com <mailto:derrick.l...@givex.com>> wrote: I have a device with 8 network interface,so wondering if I can set this up as my router/switch Ok I would like to create eth0 as the WAN interface and the remaining eth1-6 as the LAN interface so that I can connect multiple switches and devices directly on the 7 remaining ports.. is vlan, bridging the way to go .. linux uses bonding and im not sure if freebsds lagg is the same thing.. Anyone can provide information or link on how I can achieve this. Yes you can. You can use bridging, setting VLAN and agrégate interfaces like Linux with the agr(4) http://man-k.org/man/NetBSD-current/4/agr?r=1=Agr So eth0 would have a public Ip while the rest ports would have one LAN IP whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc on these interface to support my LAN. Yes, eth0 can be wan with the public IP and the rest can be LAN, setting dhcp over any interfaz and setting a DNS cache. Please review the npf.conf manual for information about the firewall program http://man-k.org/man/NetBSD-current/5/npf.conf?r=2=Npf.conf Bes regards. Thanks Derrick Lobo -- Francisco Valladolid H. -- http://blog.bsdguy.net - Jesus Christ follower. -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
RE: creating a netbsd router
Hi Broke Great this worked, I did not have the interface turned up.. creating ifconfig.wmx file for each interface with "up" in them did it Thankyou.. Derrick -Original Message- From: Brook Milligan [mailto:br...@nmsu.edu] Sent: Wednesday, July 19, 2017 2:02 PM To: Derrick Lobo Cc: Johnny Billquist; Francisco Valladolid H.; netbsd-users@netbsd.org Subject: Re: creating a netbsd router > On Jul 19, 2017, at 10:01 AM, Derrick Lobo <derrick.l...@givex.com> wrote: > > So does that means each of the interface has an ip eg 192.168.0.1 on > wm1 > 192.168.0.2 on wm2 and so on and then just bridge all the interface. > Ill try that . for now only wm1 had an ip the rest did not have an > ifconfig.wmx file I have a setup more or less like what I think you are interested in: 1 uplink port and 3 bridged ports. The uplink port is just marked up in its ifconfig file and gets its IP via dhcp from upstream. Only one of the 3 bridged ports is assigned an IP; the rest are just marked up in their ifconfig files. All four ports have individual ifconfig files. My ifconfig.bridge0 file looks like this: create !brconfig $int \ add wm1 \ add wm2 \ add wm3 \ up Whatever is plugged into any of the 3 bridged ports just communicate amongst themselves just like a “real” switch. I hope this helps (and is close to what you need). Cheers, Brook
RE: creating a netbsd router
Thanks Johnny So does that means each of the interface has an ip eg 192.168.0.1 on wm1 192.168.0.2 on wm2 and so on and then just bridge all the interface. Ill try that . for now only wm1 had an ip the rest did not have an ifconfig.wmx file Derrick Lobo -Original Message- From: Johnny Billquist [mailto:b...@update.uu.se] Sent: Wednesday, July 19, 2017 11:53 AM To: Derrick Lobo; Francisco Valladolid H.; netbsd-users@netbsd.org Subject: Re: creating a netbsd router I seriously doubt agr is what you wanted anyway. It's for if you want to have multiple parallell connections between two devices in order to increase capacity. Ie. aggregate link. A bridge is what you want if you have multiple connections locally, but you want them to all be associated with just one device locally, and they should also be able to communicate directly between two ports without your host being involved. Ie, a hub or a switch like function, with just one interface for your local machine, which works the same as any other port on the bridge. It's all like one ethernet segment. But you need to understand how you actually set it up to get it working. You should not be playing with the individual interfaces... Just add them all to the bridge interface, and then you use the bridge interface. Johnny On 2017-07-19 17:44, Derrick Lobo wrote: > Thanks Everyone > > > > Agr does not work because you have to remove all IPs from the > interface, before you add them.. and then theres no way to add an IP > to the agr. Eg > 192.168.0.1 I need this ip so that it becomes the LAN gateway for my > internal PCs. > > > > Im checking briding, for now I could not get it to work will > investigate this further. > > > > Thanks again everyone > > > > Derrick > > > > > > *From:*Francisco Valladolid H. [mailto:fic...@gmail.com] > *Sent:* Sunday, July 16, 2017 6:41 AM > *To:* Derrick Lobo; netbsd-users@netbsd.org > *Subject:* Re: creating a netbsd router > > > > Hi folks > > > > On Sat, Jul 15, 2017 at 4:06 AM Derrick Lobo <derrick.l...@givex.com > <mailto:derrick.l...@givex.com>> wrote: > > I have a device with 8 network interface,so wondering if I can set > this up as my router/switch > > Ok > > > > I would like to create eth0 as the WAN interface and the remaining > eth1-6 as the LAN interface so that I can connect multiple switches > and devices directly on the 7 remaining ports.. is vlan, bridging > the way to go .. linux uses bonding and im not sure if freebsds lagg > is the same thing.. Anyone can provide information or link on how I > can achieve this. > > > > Yes you can. You can use bridging, setting VLAN and agrégate > interfaces like Linux with the agr(4) > > > > http://man-k.org/man/NetBSD-current/4/agr?r=1=Agr > > > > > > So eth0 would have a public Ip while the rest ports would have one > LAN IP whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc > on these interface to support my LAN. > > > > Yes, eth0 can be wan with the public IP and the rest can be LAN, > setting dhcp over any interfaz and setting a DNS cache. > > > > Please review the npf.conf manual for information about the firewall > program > > > > http://man-k.org/man/NetBSD-current/5/npf.conf?r=2=Npf.conf > > > > > > Bes regards. > > Thanks > > Derrick Lobo > > -- > > Francisco Valladolid H. > -- http://blog.bsdguy.net - Jesus Christ follower. > -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: creating a netbsd router
I seriously doubt agr is what you wanted anyway. It's for if you want to have multiple parallell connections between two devices in order to increase capacity. Ie. aggregate link. A bridge is what you want if you have multiple connections locally, but you want them to all be associated with just one device locally, and they should also be able to communicate directly between two ports without your host being involved. Ie, a hub or a switch like function, with just one interface for your local machine, which works the same as any other port on the bridge. It's all like one ethernet segment. But you need to understand how you actually set it up to get it working. You should not be playing with the individual interfaces... Just add them all to the bridge interface, and then you use the bridge interface. Johnny On 2017-07-19 17:44, Derrick Lobo wrote: Thanks Everyone Agr does not work because you have to remove all IPs from the interface, before you add them.. and then theres no way to add an IP to the agr. Eg 192.168.0.1 I need this ip so that it becomes the LAN gateway for my internal PCs. Im checking briding, for now I could not get it to work will investigate this further. Thanks again everyone Derrick *From:*Francisco Valladolid H. [mailto:fic...@gmail.com] *Sent:* Sunday, July 16, 2017 6:41 AM *To:* Derrick Lobo; netbsd-users@netbsd.org *Subject:* Re: creating a netbsd router Hi folks On Sat, Jul 15, 2017 at 4:06 AM Derrick Lobo <derrick.l...@givex.com <mailto:derrick.l...@givex.com>> wrote: I have a device with 8 network interface,so wondering if I can set this up as my router/switch Ok I would like to create eth0 as the WAN interface and the remaining eth1-6 as the LAN interface so that I can connect multiple switches and devices directly on the 7 remaining ports.. is vlan, bridging the way to go .. linux uses bonding and im not sure if freebsds lagg is the same thing.. Anyone can provide information or link on how I can achieve this. Yes you can. You can use bridging, setting VLAN and agrégate interfaces like Linux with the agr(4) http://man-k.org/man/NetBSD-current/4/agr?r=1=Agr So eth0 would have a public Ip while the rest ports would have one LAN IP whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc on these interface to support my LAN. Yes, eth0 can be wan with the public IP and the rest can be LAN, setting dhcp over any interfaz and setting a DNS cache. Please review the npf.conf manual for information about the firewall program http://man-k.org/man/NetBSD-current/5/npf.conf?r=2=Npf.conf Bes regards. Thanks Derrick Lobo -- Francisco Valladolid H. -- http://blog.bsdguy.net - Jesus Christ follower. -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
RE: creating a netbsd router
Thanks Everyone Agr does not work because you have to remove all IPs from the interface, before you add them.. and then theres no way to add an IP to the agr. Eg 192.168.0.1 I need this ip so that it becomes the LAN gateway for my internal PCs. Im checking briding, for now I could not get it to work will investigate this further. Thanks again everyone Derrick From: Francisco Valladolid H. [mailto:fic...@gmail.com] Sent: Sunday, July 16, 2017 6:41 AM To: Derrick Lobo; netbsd-users@netbsd.org Subject: Re: creating a netbsd router Hi folks On Sat, Jul 15, 2017 at 4:06 AM Derrick Lobo <derrick.l...@givex.com> wrote: I have a device with 8 network interface,so wondering if I can set this up as my router/switch Ok I would like to create eth0 as the WAN interface and the remaining eth1-6 as the LAN interface so that I can connect multiple switches and devices directly on the 7 remaining ports.. is vlan, bridging the way to go .. linux uses bonding and im not sure if freebsds lagg is the same thing.. Anyone can provide information or link on how I can achieve this. Yes you can. You can use bridging, setting VLAN and agrégate interfaces like Linux with the agr(4) http://man-k.org/man/NetBSD-current/4/agr?r=1 <http://man-k.org/man/NetBSD-current/4/agr?r=1=Agr> =Agr So eth0 would have a public Ip while the rest ports would have one LAN IP whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc on these interface to support my LAN. Yes, eth0 can be wan with the public IP and the rest can be LAN, setting dhcp over any interfaz and setting a DNS cache. Please review the npf.conf manual for information about the firewall program http://man-k.org/man/NetBSD-current/5/npf.conf?r=2 <http://man-k.org/man/NetBSD-current/5/npf.conf?r=2=Npf.conf> =Npf.conf Bes regards. Thanks Derrick Lobo -- Francisco Valladolid H. -- http://blog.bsdguy.net - Jesus Christ follower.
Re: creating a netbsd router
Hi folks On Sat, Jul 15, 2017 at 4:06 AM Derrick Lobowrote: > I have a device with 8 network interface,so wondering if I can set this > up as my router/switch > Ok I would like to create eth0 as the WAN interface and the remaining eth1-6 > as the LAN interface so that I can connect multiple switches and devices > directly on the 7 remaining ports.. is vlan, bridging the way to go .. > linux uses bonding and im not sure if freebsds lagg is the same thing.. > Anyone can provide information or link on how I can achieve this. > Yes you can. You can use bridging, setting VLAN and agrégate interfaces like Linux with the agr(4) http://man-k.org/man/NetBSD-current/4/agr?r=1=Agr So eth0 would have a public Ip while the rest ports would have one LAN IP > whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc on these > interface to support my LAN. > Yes, eth0 can be wan with the public IP and the rest can be LAN, setting dhcp over any interfaz and setting a DNS cache. Please review the npf.conf manual for information about the firewall program http://man-k.org/man/NetBSD-current/5/npf.conf?r=2=Npf.conf Bes regards. > Thanks > > Derrick Lobo > > -- Francisco Valladolid H. -- http://blog.bsdguy.net - Jesus Christ follower.
Re: creating a netbsd router
Yes, it's possible. I did it with a raspberry pi for a short time. As others have stated, bonding and bridging are 2 separate things... Hopefully you know which one you want. Bridge is like creating a switch out of some ports (like the LAN ports of a home router), bonding (agr) is for attaching multiple interfaces to a switch (aggregation of links between devices). And the switch needs to be configured for it as well. Follow the instructions to set up the kernel to forward packets: http://www.netbsd.org/docs/guide/en/chap-net-practice.html#chap-net-practice-ipnat This is a bit old, you're expected to use npf these days. I tried it a few times but I haven't given it the proper time/attention to learn the syntax. I set up a few simple looking statements that had unpredictable results so I gave up basically. Probably should try it again. My real interest in this is IPv6... One of these days... Andy On Fri, Jul 14, 2017 at 9:53 AM, Derrick Lobowrote: > I have a device with 8 network interface,so wondering if I can set this up > as my router/switch > > I would like to create eth0 as the WAN interface and the remaining eth1-6 as > the LAN interface so that I can connect multiple switches and devices > directly on the 7 remaining ports.. is vlan, bridging the way to go .. linux > uses bonding and im not sure if freebsds lagg is the same thing.. Anyone can > provide information or link on how I can achieve this. > > So eth0 would have a public Ip while the rest ports would have one LAN IP > whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc on these > interface to support my LAN. > > Thanks > > Derrick Lobo
Re: creating a netbsd router
On 2017-07-15 12:53, co...@sdf.org wrote: I don't know my way around networking, but I suspect agr(4) is the equivalent. Uh. I'm not sure. If I wanted to create some switch-line thingy, I would use the bridge interface... Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: creating a netbsd router
On Fri, Jul 14, 2017 at 12:53:58PM -0400, Derrick Lobo wrote: > I would like to create eth0 as the WAN interface and the remaining eth1-6 > as the LAN interface so that I can connect multiple switches and devices > directly on the 7 remaining ports.. As others have said: if you want multiple of the 7 remaining ports go into the *same* switch: agr(4) is what you need. If you just want to have a single IP for all 7 interfaces and otherwise have them behave like a switch: bridge(4) is what you need. Martin
Re: creating a netbsd router
On 15/07/2017 11:33, Julian H. Stacey wrote: https://www.freebsd.org/cgi/man.cgi?query=lagg=0=0=FreeBSD+11.0-RELEASE+and+Ports=default=html is the same thing.. No lagg (4) under http://netbsd.gw.com/cgi-bin/man-cgi/apropos?lagg++NetBSD-current Name is different again on NetNSD you are looking for agr If you use LACP the different OS's will interoperate with almost no effort. If you pick the right set of non-LACP options it should also work although it will be a bit more difficult. LACP also has the advantage of being supported by pretty much all switch hardware. You only need aggregation interfaces if you want to connect multiple ports on your router to a single switch. Mike
Re: creating a netbsd router
I don't know my way around networking, but I suspect agr(4) is the equivalent.
Re: creating a netbsd router
> I have a device with 8 network interface,so wondering if I can set this up > as my router/switch > > I would like to create eth0 as the WAN interface and the remaining eth1-6 > as the LAN interface so that I can connect multiple switches and devices > directly on the 7 remaining ports.. is vlan, bridging the way to go .. > linux uses bonding and im not sure if freebsds lagg https://www.freebsd.org/cgi/man.cgi?query=lagg=0=0=FreeBSD+11.0-RELEASE+and+Ports=default=html > is the same thing.. No lagg (4) under http://netbsd.gw.com/cgi-bin/man-cgi/apropos?lagg++NetBSD-current > Anyone can provide information or link on how I can achieve this. > > So eth0 would have a public Ip while the rest ports would have one LAN IP > whichis basically a 192.168.0.1 ip and Irun DHCP namedb etc on these > interface to support my LAN. > > Thanks > > Derrick Lobo Cheers, Julian -- Julian H. Stacey, Computer Consultant, BSD Linux Unix Systems Engineer Reply below, Prefix '> '. Plain text, No .doc, base64, HTML, quoted-printable. http://berklix.eu/brexit/#700k_stolen_votes