Does anyone remember the steps to set up a dual interface IRIX box as a gateway for other systems?
Something about routed...
Thanks.
Something about routed...
Thanks.
-h -Prdisc_interval=45 -q
if1name=tg0
if1addr=$HOSTNAME
if2name=tg1
if2addr=gate-$HOSTNAME
if3name=tg2
if3addr=gate2-$HOSTNAME
86 packets forwarded (forwarding enabled)
0 packets not forwardable
Code: Select all
netstat -rn
Routing tables
Internet:
Destination Gateway Netmask Flags Refs Use Interface
default 999.999.112.1 UGS 4 298 tg0
127.0.0.1 127.0.0.1 UH 42 7 lo0
999.999.112 link#4 0xffffff00 UC 0 0 tg0
999.999.112.141 127.0.0.1 UGHS 10 1 lo0
192.168.10 link#2 0xffffff00 UC 0 0 tg1
224 link#4 0xf0000000 UCS 0 0 tg0
255.255.255.255 1X8.123.112.255 UGHS 0 0 tg0
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
Configuring a Router With Two Interfaces
The /etc/init.d/network script is designed to automatically detect and configure a router with two interfaces if the default naming scheme for the interfaces is used. By default, the Internet addresses of the primary and secondary interfaces are derived from the /etc/sys_id file. The primary interface uses the name in the sys_id file. The secondary interface prefixes gate- to the name specified in the sys_id file.
To set up a router with two interfaces using the default naming scheme, follow this procedure:
1. Log in as root.
2. Assign valid Internet names and addresses to both interfaces in the /etc/hosts file. For example, the /etc/hosts file entries for the primary and secondary interfaces on the station biway might look like this:
198.70.75.2 biway.salad.com biway
198.70.80.3 gate-biway.salad.com gate-biway
3. Ensure that the router has the appropriate name in its /etc/sys_id file. Following this example, the /etc/sys_id file should look like this:
biway
4. Reconfigure the kernel and reboot the station to initialize your changes and interfaces. Some systems prompt you for permission, as in the following example. Others simply return a shell prompt. In either case, enter the reboot command when the kernel has been reconfigured:
/etc/autoconfig
Automatically reconfigure the operating system? (y/n)y
reboot
Code: Select all
999.999.112.141 heimdall
192.168.10.1 gate-heimdall
Code: Select all
f1name=tg0
if1addr=$HOSTNAME
if2name=tg1
if2addr=gate-$HOSTNAME
Code: Select all
$ROUTE $QUIET add -net default 999.999.112.1
routed on
gated off
Code: Select all
traceroute 999.999.228.160
traceroute to 999.999.228.160 (999.999.228.160), 30 hops max, 60 byte packets
1 vlan112-rtr-b28 (999.999.112.1) 1 ms 1 ms 1 ms
2 vlan900-rtr-b5 (999.999.58.181) 0 ms 0 ms 0 ms
3 eno (999.999.228.160) 0 ms 0 ms 0 ms
Code: Select all
traceroute 999.999.228.160
traceroute to 999.999.228.160 (999.999.228.160), 30 hops max, 46 byte packets
1 heimdall (192.168.10.1) 0.406 ms 0.302 ms 0.298 ms
2 999.999.112.1 (999.999.112.1) 1.151 ms 0.992 ms 0.986 ms
3 * * *
4 * * *
5 * * *
Code: Select all
/sbin/iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
/sbin/iptables --append FORWARD --in-interface eth1 -j ACCEPT
/sbin/route add -net 192.168.10.0 netmask 255.255.255.0 gw 999.999.112.141 dev eth1
Code: Select all
route add -net 192.168.10.0 -gateway 999.999.112.141
Code: Select all
add net 192.168.10.0: File exists