eg-253:network:step4
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eg-253:network:step4 [2007/11/15 09:31] – eechris | eg-253:network:step4 [2011/01/14 12:59] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Routing Through a Gateway ====== | ||
+ | |||
+ | To allow the '' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Configuring a gateway ===== | ||
+ | |||
+ | Before you can actually reach the other sub-nets, and the Internet, you still have to configure the cluster servers. These have two interfaces, one in each network that they talk to. These are set up independently to talk to their networks. Before they can perform routing between the two networks, they have to be set up to //forward// IP packets to one another. By default, this feature is turned off. To turn IP forwarding on, you have to enable IP forwarding in the Linux kernel. Most firewall and routing HOWTOs instruct you to do this by running the following command as root [Rankin, 2005((Kyle Rankin, “Hack #40 Create an Emergency Router”, //Knoppix Hacks//, O' | ||
+ | <cli> | ||
+ | root@myhost: | ||
+ | </ | ||
+ | |||
+ | However, under Ubuntu, you must change that command so that it works under the '' | ||
+ | <cli> | ||
+ | icct@myhost: | ||
+ | </ | ||
+ | |||
+ | However, this only works until the next boot. To make this change permanent edit the file ''/ | ||
+ | |||
+ | # / | ||
+ | # set ip_forward=yes if you need to set | ||
+ | # up a machine with two network interface cards | ||
+ | # as a router | ||
+ | ip_forward=yes | ||
+ | spoofprotect=yes | ||
+ | syncookies=no | ||
+ | |||
+ | You may need to reboot to turn this setting on. To reboot, use: | ||
+ | <cli> | ||
+ | icct@myhost: | ||
+ | </ | ||
+ | |||
+ | Once IP forwarding is turned on, the interfaces are set up using '' | ||
+ | |||
+ | You should assign the addresses '' | ||
+ | |||
+ | To set up the interfaces, we only need to tell '' | ||
+ | |||
+ | To illustrate this in more concrete terms, this is what the settings should look like in ''/ | ||
+ | |||
+ | # Interface in icct-net does the routing, | ||
+ | # so needs to know about the rest of the network. | ||
+ | | ||
+ | auto eth0 | ||
+ | iface eth0 inet static | ||
+ | address 192.168.1.3 | ||
+ | netmask 255.255.255.0 | ||
+ | gateway 192.168.1.1 # default for jupiter is solaris | ||
+ | # route to saturn-net | ||
+ | up route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.4 | ||
+ | down route del -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.4 | ||
+ | | ||
+ | # Interface in jupiter-net is much simpler | ||
+ | auto eth0 | ||
+ | iface eth1 inet static | ||
+ | address 192.168.2.1 | ||
+ | netmask 255.255.255.0 | ||
+ | |||
+ | The settings are similar on '' | ||
+ | |||
+ | Once the cluster gateway routers are configured, and networking is restarted, you should be able to ping any host (including the Internet gateway router and the Internet) from any host on the ICCT network. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | [[eg-253: | ||
+ | |||
+ | |||