Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Networking between NICs - what am I missing?

  • 13-01-2014 8:50pm
    #1
    Closed Accounts Posts: 17,208 ✭✭✭✭


    Hey guys,

    I have FreeBSD 9.2 running inside a VirtualBox VM. I want this to act as a DHCP server between a Raspberry Pi and any number of other VMs.

    So far I have two NICs, em1 bridged to an Ethernet port and em2 configured to an internal network. So far I have been able to hand out the addresses, but I just cannot get traffic moving between them.

    I'm not the greatest at networking on this level manually. Ok, I stink. I'm assuming I need to add something to the routing tables manually but I cannot figure out for the life of me what that needs to be. When I try to add a path (such as route add -net 192.168.63.0/24 192.168.64.1) it tells me it already exists in the table.

    I have attached the output of netstat -r.

    Anyone see what I am missing?


Comments

  • Registered Users, Registered Users 2 Posts: 1,299 ✭✭✭moc moc a moc


    Do you mean you want the FreeBSD box to route between the two networks? Adding 'gateway_enable="YES"' to your rc.conf and restarting networking should do it.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Yeah. I have tried setting them up on different networks (as above) or the same range. Either way whenever I try to ping from one NIC to the next is Host Unreachable. If I ping different VMs on the internal network, all is good but none can see the Pi.

    Sorry, I should have mentioned I have previously added gateway_enable to rc.conf and both manually restarted the network service and rebooted the VM but no joy.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Nothing jumping out at people?


  • Registered Users, Registered Users 2 Posts: 3,739 ✭✭✭Stuxnet


    I cant answer your question directly, but I have a similar setup in virtualbox for a college project Im working on, and it works.

    But for my setup Im using pfSense (FreeBSD based) as my DHCP & Firewall server. With this I have 2 NICS, em0 which connects to my WAN, and em1 acts as my lab LAN

    em0 192.168.0.23/24 WAN
    em1 192.168.1.1/24 LAN

    in virtualbox, the pfSense NICS are adapter 1, bridged mode, NIC 2, internal network, intnet. (Like what you want).

    My other vm's (CentOS 6.5) each only have a single NIC enabled, NIC 1, internal network, intnet.

    With this setup, all vm's on intnet see each other without issue and get out the the internet through the pfSense vm, obviously you need to setup some firewall NAT rules in pfsense if you want to ssh into the vm's behind the fw from the host.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Thats encouraging. I was starting to think it was a limitation of running it in VirtualBox with internal networking. I had tried pfSense but actually found myself getting further rolling my own. Maybe I should go back and take a look at that again.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,739 ✭✭✭Stuxnet


    Ya maybe give pfSense another shot if your stuck, literally no configuration needed, just need type in em0 when prompted for a WAN, and em1 when prompted for LAN during install, I didnt do anything else, everything worked then without issue.

    There are some niggly configs to do, if your looking to configure pfSense remotely from your WAN instead of vb console after install, like accessing the web admin panel, I needed to "playback enableallowallwan" from pfSense option 12 menu. Then you can access its webpage from normal browser session on host, depends how secure you need to leave the box. Holler if you get stuck ! God knows I spent a bit of time sussing it out !

    good luck


Advertisement