Forums

Resolved
0 votes
Hello, i've a clearos server with 2 NIC's.
1. 1-port NIC acting as connenction with my cable modem (role external)
2. 4-port NIC and 1 of the ports is acting as connecting to my local network with dhcp on it (internal role). So the server is also dhcp server for the whole lan.

How can i use one or more of the remaining ports of this NIC? When i connect a cable and computer will on this port the dchp server will give out an adress in the lan?
Or do i need something to do with bridging? I've read the know-how for this but i'm not sure if this would be the way.

I fact i would like to use the free ports just like a switch, so i can connect a pc that will get automatically an ip in the lan from the dchp on the server.

Hope to get any wiser from your anwsers.
Thanks a lot already.
Ron
Friday, November 06 2020, 06:01 PM
Share this post:
Responses (6)
  • Accepted Answer

    Friday, November 06 2020, 08:16 PM - #Permalink
    Resolved
    0 votes
    You can get an IP by DHCP whichever way you choose. The options are:
    1 - configure each interface individually. Each NIC must be on a different subnet and each can have a DHCP server
    2 - bridge 2 or more interfaces into a single bridge interface with a single IP doing DHCP.

    At a guess you probably want to do the latter. You may need to delete your current LAN NIC and make the bridge from the console or WAN. Or bridge 3 of the ports then move your connection ofer to the bridge which must be on a different subnet then manually join the fourth to the bridge afterwards. The process is a bit easier on the version of app-network in updates-testing:
    yum update app-network --enablerepo=clearos-updates-testing
    Just don't try to use it for external VLANs.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 06:30 PM - #Permalink
    Resolved
    0 votes
    Hi Nick,
    Thanks already, but i've some questions to your anwser. Bridging the remaining 3, but different subnet. Say my lan is now 192.168.10.xx, should the new subnet be something like 192.168.20.xx?
    If so can i later set the subnet back to my current lan?
    Or can you provide me with the steps to:
    1. delete current lan for a moment
    2. brdiging all 4 together
    3 resetting my current lan
    I'm not used to the bridging.
    Or will installing the new app-network make things clear from to console?

    Thanks again,
    Ron
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 07 2020, 08:10 PM - #Permalink
    Resolved
    0 votes
    The problem you have is that generally you work from the LAN side, but at some point you need to delete the LAN interface which will kill you. This is why I say do it from the WAN or console.

    If you use the testing version of app-network, you can add a NIC to an existing bridge. If you use the current version, I believe you have to delete the bridge and re-create it, or just edit the last interface file manually.

    Your new subnet should be something like 192.168.20.xx, but once you have the original NIC deleted, you can change the bridge subnet to the old one. I am hoping you won't end up with a stale NIC in the DHCP file /etc/dnsmasq.d/dhcp.conf, and that, if you do end up with one, it won't interfere.

    If you want to do it from the LAN-side webconfig, you will need to:
    1 use the testing version of app-network
    2 connect to one nic
    3 create a bridge with the three remaining NICs on 192.168.20.1/24 and enable DHCP
    4 move you workstation to one of the bridged interfaces (and point your browser to the new LAN IP)
    5 (you may be able to skip this step) delete the DHCP server from the original NIC
    6 Delete the old NIC (you may bae able to set it up as a Bridge Child directly)
    7 Add the old NIC as a Bridge Child to the new NIC
    8 Change the LAN subnet of the bridge
    9 re-point your browser again.

    You should be able to do just about all of this from the console or WAN more easily as you can just delete the LAN NIC and set up the bridge directly with 4 ports and the correct LAN subnet.

    Note the facility to add a NIC to an existing bridge may get removed before the new app gets released.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 10 2020, 09:33 PM - #Permalink
    Resolved
    0 votes
    Hi Nick,
    Thanks for all the help.
    Simply through WAN-side and deleting all lan NICS and bridge them togehter did the job. First it wouldn't work (no connection to internet), but after some efforts i decided to bridge all and REBOOT, finally that did the job.
    I must say, i've not tested the bridged NIC with a second ethernet cable to another pc. But my network and lan and internet is working on all devices so i think the bridge is allright.

    Many thanks,
    Ron
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 10 2020, 09:45 PM - #Permalink
    Resolved
    0 votes
    Thanks for letting me know. I'll try doing it like you, from the WAN side, and see if mine works first go. I have a slightly later version of the app, so it may behave slightly differently.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 12 2020, 09:58 AM - #Permalink
    Resolved
    0 votes
    On my test box, I connected in from the WAN and deleted my two LAN interfaces. I then made a bridge out of them and connected my laptop to one of them. It immediately pulled an IP and gave me internet access.
    The reply is currently minimized Show
Your Reply