Compatible USB 2.0 Ethernet Adapter?
-
Thanks for your detailed reply. Unfortunately I can't use VLANs in this case because I need the device for my WAN connection (I'm using a laptop with one onboard NIC).
You can in fact use VLANs, as long as your WAN <-> LAN bandwidth needs don't approach/exceed half the capacity of your one interface. This is sometimes referred to as a "router-on-a-stick" configuration. Set up two VLANs on your laptop's network interface, then set up the switch port it hangs off of to handle both of those VLANs. Attach your WAN VLAN to one of the remaining ports and connect your modem there, then attach the LAN VLAN to all the other ports. Done, you now have a functioning router with a single ethernet port.
This is actually how many home routers work. My Linksys WRT54GS has a single ethernet interface to its CPU and a six port switch which is configured out of the box with two VLANs. Port 0 is internal only and connects to the CPU with both VLANs, port 1 is on vlan0 for WAN, ports 2-5 are on the vlan1 for LAN, and both vlan1 and eth1 (wireless) are bridged in to br0 as the "real" LAN interface as far as Linux is concerned. All we're doing here is the same thing, but with standalone components.
That said, I have plugged a number of USB NICs in to my pfSense boxes over the years and they've all just worked. I could be lucky, but when building a 6-WAN 1-LAN machine in college I had all four USB NICs I could round up between my roommates and I plus two PCI units and the onboard all working under one of the 1.0.x builds without any hacking. This is probably easier
-
Thanks for your detailed reply. Unfortunately I can't use VLANs in this case because I need the device for my WAN connection (I'm using a laptop with one onboard NIC).
You can in fact use VLANs, as long as your WAN <-> LAN bandwidth needs don't approach/exceed half the capacity of your one interface. This is sometimes referred to as a "router-on-a-stick" configuration. Set up two VLANs on your laptop's network interface, then set up the switch port it hangs off of to handle both of those VLANs. Attach your WAN VLAN to one of the remaining ports and connect your modem there, then attach the LAN VLAN to all the other ports. Done, you now have a functioning router with a single ethernet port.
This is actually how many home routers work. My Linksys WRT54GS has a single ethernet interface to its CPU and a six port switch which is configured out of the box with two VLANs. Port 0 is internal only and connects to the CPU with both VLANs, port 1 is on vlan0 for WAN, ports 2-5 are on the vlan1 for LAN, and both vlan1 and eth1 (wireless) are bridged in to br0 as the "real" LAN interface as far as Linux is concerned. All we're doing here is the same thing, but with standalone components.
That said, I have plugged a number of USB NICs in to my pfSense boxes over the years and they've all just worked. I could be lucky, but when building a 6-WAN 1-LAN machine in college I had all four USB NICs I could round up between my roommates and I plus two PCI units and the onboard all working under one of the 1.0.x builds without any hacking. This is probably easier
Great idea! I'm gonna try this when I get home.
-
Thanks for your detailed reply. Unfortunately I can't use VLANs in this case because I need the device for my WAN connection (I'm using a laptop with one onboard NIC).
You can in fact use VLANs, as long as your WAN <-> LAN bandwidth needs don't approach/exceed half the capacity of your one interface. This is sometimes referred to as a "router-on-a-stick" configuration. Set up two VLANs on your laptop's network interface, then set up the switch port it hangs off of to handle both of those VLANs. Attach your WAN VLAN to one of the remaining ports and connect your modem there, then attach the LAN VLAN to all the other ports. Done, you now have a functioning router with a single ethernet port.
This is actually how many home routers work. My Linksys WRT54GS has a single ethernet interface to its CPU and a six port switch which is configured out of the box with two VLANs. Port 0 is internal only and connects to the CPU with both VLANs, port 1 is on vlan0 for WAN, ports 2-5 are on the vlan1 for LAN, and both vlan1 and eth1 (wireless) are bridged in to br0 as the "real" LAN interface as far as Linux is concerned. All we're doing here is the same thing, but with standalone components.
That said, I have plugged a number of USB NICs in to my pfSense boxes over the years and they've all just worked. I could be lucky, but when building a 6-WAN 1-LAN machine in college I had all four USB NICs I could round up between my roommates and I plus two PCI units and the onboard all working under one of the 1.0.x builds without any hacking. This is probably easier
Great idea! I'm gonna try this when I get home.
I tried it but can't figure out a way to make it work since I don't have a static IP from my ISP :(
-
I tried it but can't figure out a way to make it work since I don't have a static IP from my ISP :(
It = "using USB nics"?
It = "using VLANs"?In either case, I don't understand why you think a static IP on WAN is required. (I don't use VLANs but I do have a USB NIC as my WAN interface and it gets it's IP address by DHCP.)
-
I tried it but can't figure out a way to make it work since I don't have a static IP from my ISP :(
It = "using USB nics"?
It = "using VLANs"?In either case, I don't understand why you think a static IP on WAN is required. (I don't use VLANs but I do have a USB NIC as my WAN interface and it gets it's IP address by DHCP.)
Sorry, I should have been more specific. I tried to set up VLANs but was unable to because everything I read indicated that I would need a static IP from my ISP. Please correct me if this is wrong.
-
VLANs behave like physical NICs. You can use DHCP, etc. on a VLAN interface. All you need is a VLAN capable switch and the proper configuration. If you don't have a VLAN capable switch, getting a USB ethernet adapter would be cheaper/easier.
-
VLANs behave like physical NICs. You can use DHCP, etc. on a VLAN interface. All you need is a VLAN capable switch and the proper configuration. If you don't have a VLAN capable switch, getting a USB ethernet adapter would be cheaper/easier.
Yes, I'm using DD-WRT on my router. However, when I assign a VLAN don't I need to assign a gateway IP to that VLAN? If so, I don't know what I'd use since my ISP is assigning me an IP via DHCP. I know very little about VLANs so I could be wrong…
-
I have never tried to use DDWRT as a VLAN switch. I think I remember a post where someone was doing that. If I recall correctly, it didn't work. Anyway, that's between you and DDWRT. I know that if you configure a switch correctly, and add a vlan interface to pfsense correctly, you can configure it like any other interface- static, dhcp…
-
Ok, I'm going to rephrase my question: What IP address would I assign to my VLAN if my cable modem is assigning the interface it's IP address via DHCP?
-
Ok, I'm going to rephrase my question: What IP address would I assign to my VLAN if my cable modem is assigning the interface it's IP address via DHCP?
If you specify the interface type as "DHCP" you shouldn't be required to supply an IP address.
-
Ok, I'm going to rephrase my question: What IP address would I assign to my VLAN if my cable modem is assigning the interface it's IP address via DHCP?
If you specify the interface type as "DHCP" you shouldn't be required to supply an IP address.
Yup, you were right, somehow I missed that. I got my 'router on a stick' working last night but for some reason my VLAN changes in pfSense only seemed to take effect when I rebooted. It took me a while to figure out why my changes didn't seem to work.