I bought a NIC, now I need help



  • before I had a NIC, my entire network was plugged to a switch, then to a dlink router. I'm using static IPs for my computer because I'm running a diskless internet cafe. Can't switch to DHCP.

    here were my IPs before running PFsense:

    DSL: 192.168.1.1
    dlink router: 192.168.0.1 (this is also the gateway)
    server PC: 192.168.0.100
    diskless PCs: 192.168.0.101-120

    Now that I bought a NIC, the plan is to insert it to the server PC (thus now having 2 NICs), the addon NIC plugged to the DSL, and the onboard NIC plugged to the switch (for the diskless clients).

    Running pfsense on a virtual machine installed on this server PC. I guess my questions will be:

    1. should I go with bridged network from the VM?
    2. what should be the IP of the addon NIC?
    3. why can't I route 192.168.0.1 to 192.168.1.1?
    4. what should be the IPs of pfsense LAN and WAN? and their gateways?

    I'm a new guy. please bear with my noobism.


  • Netgate Administrator

    So you basically want to replace the d-link router with a pfSense VM instance?

    You should be able to do that.
    You will want to have the NIC connected to the DSL router bridged to the pfSense VM WAN interface in a dedicated manner so that neither the host machine or any other VMs can use it. Then have the pfSense LAN NIC connected, probably via an internal virtual switch, so that the host machine and other VMs can use it.
    The WAN interface could get it's info from the DSL router via dhcp. Alternatively set is as static in the same subnet as the DSL router. E.g. 192.168.1.10/24 use 192.168.1.1 as it's gateway.
    The LAN interface must be in a different subnet to the WAN, 192.168.0.X is fine. You can enable a dhcp server on LAN or not as you wish. There should be no gateway set on the LAN interface in pfSense. LAN side clients will use the pfSense LAN interface as their gateway.

    Further down the line it would be better to set the dsl modem in bridge mode so that the pfSense WAN interface gets a public IP directly from your ISP.

    Steve



  • You will want to have the NIC connected to the DSL router bridged to the pfSense VM WAN interface in a dedicated manner so that neither the host machine or any other VMs can use it.

    this is also one of my problems actually. whenever I enable the addon NIC in windows 7 (plugged to DSL), it automatically connects to the net (no pfsense whatsoever) meaning that the server PC is only getting internet while the diskless clients couldn't. How can I make windows 7 stop using the addon NIC without disabling it from Device Manager?

    Then have the pfSense LAN NIC connected, probably via an internal virtual switch, so that the host machine and other VMs can use it.

    can't the server PC's onboard NIC act as that? I use this NIC to serve a bootup for the diskless clients. how can make the onboard NIC also act as the gateway for their internet?

    The WAN interface could get it's info from the DSL router via dhcp. Alternatively set is as static in the same subnet as the DSL router. E.g. 192.168.1.10/24 use 192.168.1.1 as it's gateway.
    The LAN interface must be in a different subnet to the WAN, 192.168.0.X is fine. You can enable a dhcp server on LAN or not as you wish. There should be no gateway set on the LAN interface in pfSense. LAN side clients will use the pfSense LAN interface as their gateway.

    This was one of the few attempts I did but the diskless clients couldn't connect to the internet. Or maybe its because win7 (not pfsense) made the server PC auto connected to the net.

    WAN IP: 192.168.1.5
    gateway: 192.168.1.1
    LAN IP: 192.168.0.1
    gateway: none (as you said)

    tested it again and yeah, the diskless clients aren't connected to the net.

    other info: the diskless software is the one giving IP to the diskless clients, which is why I can't rely on DHCP.
    btw, what IP should I assign to the addon NIC in win7? the one plugged to the DSL?


  • Netgate Administrator

    I don't think you said what VM hypervisor you're using. Whatever it is I'm unfamiliar with it if it's running on a Windows7 host so I can only give you general guidance. Win7, the host OS, should not be using the addon NIC at all. If you disable it in device manager is it still available in the VM setup? Otherwise try removing any IP components from it in Win7 so it can't use it directly.
    The LAN interface should use the onboard NIC as you say. Usually in a VM host you can assign NICs either as dedicated to a single vitual NIC in a VM instance (like the WAN connection) or as bridged to the host OS which is like connecting both the hostmachine and the VM to a hub. This second type is how the LAN interface should be setup. In that configuration both the host machine and any external machines, your diskless clients, will only be able to connect to the dsl router via the pfSense VM.

    Steve



  • I don't think you said what VM hypervisor you're using.

    Oracle VM, if that will help.

    Win7, the host OS, should not be using the addon NIC at all. If you disable it in device manager is it still available in the VM setup? Otherwise try removing any IP components from it in Win7 so it can't use it directly.

    I knew it. I guess I can't move on until I find my way with this. the addon NIC won't be included in my available NICs in the VM if I disable it from the Device Manager. but if I do enable it, it auto connects to the internet.

    The LAN interface should use the onboard NIC as you say. Usually in a VM host you can assign NICs either as dedicated to a single vitual NIC in a VM instance (like the WAN connection) or as bridged to the host OS which is like connecting both the hostmachine and the VM to a hub. This second type is how the LAN interface should be setup.

    I am doing this correctly? I use 192.168.0.1 as:

    server PC onboard NIC gateway (IP is 192.168.0.100)
    diskless clients gateway (IP is 192.168.0.101-120)
    pfsense LAN IP


  • Netgate Administrator

    Yes the LAN interface, 192.168.0.1, will be the gateway for the host machine and the LAN side client machines.

    If you need to leave the NIC enabled in device manager then just disable it in 'network connections' or whatever the Win7 equivalent is.

    Steve



  • If you need to leave the NIC enabled in device manager then just disable it in 'network connections' or whatever the Win7 equivalent is.

    disabling it from network connections in win 7 (you actually got it right lol) is also the same as disabling it from device manager. whenever I do disable the NIC from there, it also gets disabled from device manager.

    and as long as its disabled, VM can't use the NIC.



  • In the adapter settings, disable everything except Virtualbox Bridged Network Driver.



  • ^ it worked. everything went smoothly.

    uncheck everything except VM bridge network.



  • hello. I'm reopening my question.

    I'm now getting intermittent connection using the ping command. sometimes "request time out" will appear out of nowhere. This was generally bad when my customers were surfing the net and the gamers were affected here the most. I've already tried directing my dsl to my main PC (pfsense closed) and I haven't gotten any successive RTOs after 1 hour. So I suspect something is wrong with my pfsense.

    already installed pfsense anew (entirely deleted my old pfsense from the VM) and re-followed the directions told here and still the same problem. just in case I already enabled UPnP & NAT-PMP. same IPs as above.

    edit: sorry guys false alarm. it was my internet after all. I'm so fail. dsl needs fixing.


Log in to reply