General discussion

Locked

Two network addresses

By jbowser1 ·
I am running a Squid proxy server for my company (30 users)and have all the users setup with static IP addresses 192.168.1.xxx with a subnet of 255.255.255.0. These are working fine. I have two NIC's installed, one for the network and one for the cable modem. My problem is getting two of the systems, which have to be set at a different ip address of 172.21.22.xxx with a subnet of 255.255.255.186, to find the proxy server. I can't change these ip's at all because they connect to a router that must be used to connect to one of our suppliers. I need help in detail since I am new to Linux and also have never worked with two different addresses.

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Two network addresses

by jbowser1 In reply to Two network addresses

Point value changed by question poster.

Collapse -

Two network addresses

by claudewatson In reply to Two network addresses

You don't say what linux distribution you are running, but I think linuxconf is fairly universal. You also don't say if all the systems are running Linux, but I'm guessing that they are since you made this a Linux question.

As root, run the program linuxconf. Select Networking, then Routing and Gateways.Select Other Routes to Hosts and input the correct information. You may have to restart networking for this to take effect.

You could also edit /etc/hosts on the two machines and add the proxy server there. That would take effect immediately.

Collapse -

Two network addresses

by jbowser1 In reply to Two network addresses

Poster rated this answer

Collapse -

Two network addresses

by schannachie In reply to Two network addresses

Hi,

Answer #1 is the right way to link two lans. But it's not the only way to do it, because it depends that you have installed a red hat linux falvor. If you've isntalled Suse, Slackware, you don't have a linuxconf utility (Yast for Suse i.e.). You can do this in a quite simple way.

1.- use the route command (check out the man files : man route). route at the command line will give you the internal router configuration, that you as root user can change.

2.- the most easy way to dothis is :

route add net(or host) net_or_host.ip.address netmask gw (gateway so you can see the net/host) dev eth_x (your nic)

this is a way to set up a gateway that is looking to a net or host with the gateway at the linux box.

2.- Once you have modified the kernel's routing table, you must modify the route.conf file at the /etc directory adding the new gateway so you can link the two lans at boot time.

The new line may be :

for net behind a gateway :

Net Gateway/dummiy ip netmask device
10.1.1.0 192.168.2.3 255.255.255.186 eth0

host behind a gateway :
Net Gateway/dummy ip netmask device
10.1.1.1 192.168.2.3 255.255.255.186 eth0


3.- to check out that all is OK, reboot and at the command line use route command, all the known routes will be send to standard output (screen). You can also use the command traceroute to check that the address resoulution is OK.

Hope it helps.

Collapse -

Two network addresses

by jbowser1 In reply to Two network addresses

Poster rated this answer

Collapse -

Two network addresses

by jbowser1 In reply to Two network addresses

This question was closed by the author

Back to Linux Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums