- 1
Decide on a network addressing scheme. For example, many local area networks use a network of "192.168.1.0" and a netmask of "255.255.255.0"; the latter may also be referred to as "/24" or "24-bit" netmask.
- 2
Set a static IP address on the network interface of the first Linux PC. This address will be in the form of the network number and host address, e.g., "192.168.1.100," where the final octet, in this example "100," is a number between 1 and 254 inclusive. Using your Linux GUI, simply navigate into the "System" menu to find the "Network" or "Network Connections" applet, and click on it. Select your "eth0" interface, and then click "Edit" to change the IPv4 settings. Change the configuration method to "Manual," then click "Add" to create a new address on this interface if necessary. Enter your desired IP address and netmask into the appropriate boxes, then click the "Apply" button to save the settings permanently.
- 3
Set a static IP address on the network interface of the second Linux box. This computer's network number must be identical to the first computer's, however, the final octet must be a different unique number within the same range, e.g., "192.168.1.101."
- 4
Connect both of the Linux PC network cards to the network switch using the appropriate Ethernet patch cables.
- 5
Ping the other computer's IP address. At a shell prompt or terminal window, type "ping" followed by a space and then the other computer's IP address, then press "Enter." A reply from the other computer verifies the link between the two Linux PCs.
5/8/11
How to Link Two PCs With a Switch in Linux
So you've got a couple PCs, both running your favorite distribution of Linux, plus a simple Ethernet network switch, and you'd like to link the two. Even without the DHCP host function provided by a router, you can still easily link these two computers to one another. There's even no need to upgrade one PC to a server role; all it takes is some very basic static network design and setup in Linux, plus a few simple Ethernet network connections.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment