Install two network cards one computer


















Had you ever need of simple routing, like sharing your connection to other computer? I had : so here is a script which turns my laptop into a router, simple configuration, one command, to run it save the script as router.

Enter this information in connected machines: IP address : One thing that you home router provides is internet protocol addresses to every machine on the network with out you having to manually assign the ipaddresses aka computer telephone numbers to all the systems that request an address.

It also associates hostnames for system connected to it like a telephone book. If for some reason your router fails, you can use an existing system to replace those services. You just need to install a software package known as Dnsmasq. In fact. You will want to use an extra nic so that later you can turn the system into a router. It can serve the names of local machines which are not in the global DNS.

If your goal was to set up a simple DNS server, you just succeeded. To test it, use your favorite DNS lookup tool pointed at localhost:. See Debian Reference or the resolv. Uncomment the line and specify which ethernet interface s you want it server IPs to. For example, if I want it to listen on eth1 my DMZ and eth2 my local network , then it should look like:.

By default, DHCP is turned off. This is a good thing, as you could bring down whatever network you are connected to if you are not careful. Around line , you will see: Make sure the existing network you are plugging into is not In the example above, this server would hand out address starting at The last number is how long the DHCP leases are good for.

In this example, they would be good for twelve hours. It also helps me remember which range is which. Now restart your dnsmasq server, connect up a few clients, and see if they autoconfigure themselves:. Using dnsmasq to cache DNS queries for the local machine is a bit tricky, since all DNS queries from the local machine need to go to dnsmasq, while as the same time, dnsmasq must be configured to forward all those queries to upstream DNS servers.

Exaclty how to do this depends on the method s of network configuration in use. A multitude of reasons exist as to why one would want to build a custom router vs. Note: This post assumes you already have your machine loaded up with a fresh copy of Debian and you have the two needed NICs installed. With systemd on the horizon, this setup will change. I would probably use auto instead of hotplug to configure the interfaces. Set your timer and type quickly!

The internal LAN interface eth1 auto eth1 allow-hotplug eth1 iface eth1 inet static address As an example, this set includes allowing tcp traffic in from the outside world on port I run SSH on this alternate port and also port-forwards tcp port 50, to an internal machine with the ip of Use this as a guide for your own rules.

This known as a firewall script. You might want to install multiple network adapters in your computer if one of the following applies:. If you follow these steps, you'll be easily able to distinguish the two connections, instead of having to remember which "Local Area Connection" icon is which. Later in this tutorial, we will discuss how to configure Windows networking to use both of your adapters, under "Setting Up a Routed Network and "Setting Up a Bridged Network. CAUTION Microsoft recommends that you do not install multiple network adapters in a computer that is a domain controller or master browser, unless you are bridging the adapters.

Assign an IP address and subnet mask, but don't assign a default gateway. Was this reply helpful? Yes No. Sorry this didn't help. Thanks for your feedback. Steve Richter. How can I connect to the IP cameras and to the web at the same time?

Depends on your setup. Ofcourse, if you have a router or switch segmented into vlans and add a router on stick setup, you can access different networks. You can do it with adding2 IP with2 Routes and configure one of them as static route to specific network then change route metric to1.

Sure, you simply have to enable vlan tagging on the switch and the network adapter and setup both sides with all the vlans you want the computer to see. Products By Bayt. Use Our Mobile App. Get Fresh Updates On your job applications, and stay connected.



0コメント

  • 1000 / 1000