networking - Configure Fedora 14 server to have two networks

29
2013-07
  • sizzzzlerz

    I have a server running Fedora 14 on a local subnet and configured with a static IP address. It communicates to other devices on that subnet through a switch. I would like to connect this server to a second subnet using one of the other NIC interfaces on the server. This second network would obtain its IP address via a DHCP server located on the second subnet.

    What do I need to do to set up this configuration so that it will use the first subnet when I refer to an address on that subnet but route the request to the second subnet for addresses that the first subnet doesn't know about?

  • Answers
  • Paul

    Assuming the DHCP server will provide a default gateway along with the IP address on subnet 2, the behaviour you want will happen automatically.

    If the destination is one subnet 1, this is a directly connected network and so will take precedence over any other route. It will go out of ic 1.

    For destinations on subnet 2, again, it is directly connected so will go out of nic 2.

    For anything it doesn't know about, it will use its default gateway - as this was supplied by the dhcp server on subnet 2, the traffic will go out of nic 2 to the IP address of the default gateway.

  • ktf

    you may have to amend /etc/sysconfig/network-scripts/ifconfig-eth[01]

    first of all I suggest to add HWADDR=mac-address to specify which eth* device should map to which physical interface.

    For eth0 set BOOTPROTO=static set IPADDR, NETMASK, NETWORK, and BROADCAST to your needs

    For eth1 set BOOTPROTO=auto and remove any static settings

    for both interfaces set ONBOOT=yes

    I had real trouble with NetworkManager on my Fedora 14 Box that is connected to 3 Networks (DMZ, Intranet and DMZ-test) where 2 Networks were serverd by DHCP servers. Since both DHCP servers offered a default route and (different) Nameserver. I ended up by removing the NetworkManager startup scripts from the default boot sequence and setting the immutable flag on /etc/resolv.conf. Your mileage may vary, but I found some automagic settings very annoying to circumvent.

    But you only have to deal with one DHCP server, so I don't expect to much trouble at your side.



  • view all most popular Amazon Coupons
    .

    Related Question

    networking - Why do I get slow network throughput when I have a bad DNS server?
  • Daniel Rikowski

    I have Fedora 11 in a Virtual Box VM and because of a bad DNS configuration my network connection in that VM was awfully slow.

    I fixed it now, but I don't understand what happened and I'm curious about what was going on.

    I set a primary and a secondary DNS server. The primary server was misconfigured and most of the times did not respond. The secondary was fine.

    Normally I would expect slowdowns during the first time a connection is made to a host, when the host name is resolved.

    Although that was always the case, additionally my overall throughput was very slow, i.e. when I was downloading a larger file from the internet. (5-20 KB/s as opposed to 1.5 MB/s) Sometimes the transfer spiked at 100-200 KB for a few seconds, sometimes there was no transfer at all for about 20-60 seconds. That was the case with all applications, Firefox and yum I thoroughly tested.

    After removing the bad DNS server everything went normal again.

    Could all this come from a bad DNS server? Or is this a Fedora or Virtual Box problem?


  • Related Answers
  • Bruce McLeod

    If you have bad DNS the initial request will be slow, then once the lookup is cached, your speed should be fine.

    It may be a routing issue though with packets trying a wrong default gateway, I had that problem with my dual airport express' once I unplugged the one that was not connected to the net it was fine.

    Start by doing a ping and a tracerouce and look at the latency and any dropped packets.