Static Networking *TIP*
#1
Static Networking *TIP*
Dear Nerds,

Networking on IRIX can be fiddly. I've seen a lot of HOWTO and best practices and I've seen shortcuts too. I figured I might put down the way I configure my hosts here in case anyone else has any fun or useful advice. If I make any assumptions then they are as they are and I'm open to constructive criticism. 

First of all, you have the actual hostname of your IRIS. Out of the box, the /etc/hosts file comes with the default 192.0.2.1 /32 host address. This is done because RFC5737 and RFC 6890 designate a bunch of IPv4 address spaces as 'Special Use'. In fact, the 192.0.2.0/24 is reserved for Documentation and not as we usually use 192.168.0.0/16 which is reserved for Private-Use and you'd normally have in your house. If you want to have a read about all the IPv4 space that is reserved you can checkout IETF RFC 6890

So yeah, the hostname, designated in /etc/sys_id

If you concatenate /etc/sys_id you'll see the name IRIS

Now you can take a look at the hosts file /etc/hosts. You'll see a line similar to this:

Code:
IRIS    192.0.2.1

So when you boot your SGI it looks for the name in the /etc/sys_id file then looks for that name in the /etc/hosts to get your IP address. If you change the hostname to bob for example and then add bob to /etc/hosts with a different IP address, your box will start to use the new IP address for the first network interface, typically ec0 (eg0).

You may be wondering where the network mask bit goes. Well, the network mask for the subnet 192.0.2.1 falls into what used to be known as a classful network and therefore by default inherits the 255.255.255.0 (a.k.a. /24 or 0xffffff00). From my experience, any IPv4 address you use here will inherit a default mask from the old classful network style. For example, if you use a 172.16.0.0/12 address then you'll get a /16 (255.255.0.0) mask. This can be awkward but thankfully can be overridden.

The default mask as I said is usually pulled from the old classful mask but you can override the behaviour by creating (or editing) the file /etc/config/ifconfig-ec0.options. If your network interface is different than ec0 (e.g. ec1 or eg0) then adjust as necessary on the filename. This is also the file you would create if you have more than one network interface card to configure. I've copy and pasted the output from mine below. You can see I use a different IPv4 address from the Special-Use pool. I use this because it reminds me of a public internet address and helps me in my home lab environment. The interesting thing here is the netmask.

Code:
richard@marvin [config]: cat ifconfig-ec0.options
203.0.113.12 netmask 0xfffffff8

As we mentioned earlier, the netmask is typically taken as a classful. That is either 255.0.0.0, 255.255.0.0 or 255.255.255.0 for classes A, B and C respectively. The way IRIX displays the netmask is rather different because instead of binary they use HEX decimal notation. For each letter there are 4 bits whereas for binary to decimal we use 8-bits. 

DECIMAL: 255
BINARY: 1111 1111
HEX: FF

In most cases, you'll likely be using a /24 mask which in BINARY is 11111111.11111111.11111111.00000000 or in HEX is FF:FF:FF:00 (0xffffff00). In my example above, I'm using a smaller subnet size of DECIMAL 248 which works out as F8 in HEX. So if you have a smaller (or larger) subnet then you just need to edit this file and tell IRIX what mask to use.

The last nugget I can offer regards gateways. Normally, your subnet will have a single gateway which would most likely be your home router. Sometimes however you may need to route some traffic to the internet and some traffic to your home LAN or elsewhere. To add default and/or another gateway(s) you need to edit the file /etc/config/static-route.options.

Code:
richard@marvin [config]: cat /etc/config/static-route.options
$ROUTE $QUIET add net default 203.0.113.9

In my case, my home router has the IPv4 address 203.0.113.9. Your home router is maybe 192.168.0.1 or similar. If you need to add a new route to a destination via a different gateway (router) then simply add it to this file. Again, noting the network mask is very important. Let's say I want to route traffic to destination network 8.8.8.0 via a different router with IPv4 address 203.0.113.10. I edit the file /etc/config/static-route.options, add the line I need and then save it.

Code:
$ROUTE $QUIET add net default 203.0.113.9
$ROUTE $QUIET add net 8.8.8.0/24 203.0.113.10

In this case note, I used the /24-bit notation rather than the HEX notation. You can check your configuration works by running the networking init script or rebooting your box. In the CLI issue the 'netstat -rn' command and look at the default Destination and Gateway output. 

Code:
richard@marvin [~]: netstat -rn
Routing tables

Internet:
Destination      Gateway            Netmask    Flags    Refs     Use  Interface
default          203.0.113.9                   UGS         2        0  ec0
8.8.8            203.0.113.10       0xffffff00 UGS         0        0  ec0
127.0.0.1        127.0.0.1                     UH         10        4  lo0
203.0.113        link#1             0xffffff00 UC          0        0  ec0
203.0.113.12     127.0.0.1                     UGHS        1        0  lo0
224              link#1             0xf0000000 UCS         0        0  ec0
255.255.255.255  203.0.113.255                 UGHS        0        0  ec0

I hope this was somewhat helpful to anyone stumbling into networking drama. IRIX also understands the RIP routing protocol and I could write about that if anyone is interested. Most people tend to have these boxes at home nowadays and home routers don't tend to support RIP whereas in the 90's when I worked on these boxes I used RIP a lot.

All the best
Rich

EDIT: Typos

"My answer in answering the question: "What does the red spectrum tell us about quasars",There are various words that need to be defined: what is a spectrum, what is a red one, why is it red, and why is it so frequently linked with quasars?"..."What the hell is a quasar?


Onyx2 Octane2 O2 O2 Origin 200 Indigo2 R10000/IMPACT Indy
(This post was last modified: 01-21-2022, 12:52 PM by defaultrouteuk.)
defaultrouteuk
Sponsor

Trade Count: (0)
Posts: 111
Threads: 28
Joined: Jul 2020
Location: Dubai
Website Find Reply
01-21-2022, 11:18 AM
#2
RE: Static Networking *TIP*
Nice read and very informative. Thanks
TruHobbyist
Developer

Trade Count: (0)
Posts: 195
Threads: 21
Joined: May 2018
Find Reply
01-21-2022, 12:07 PM
#3
RE: Static Networking *TIP*
(01-21-2022, 11:18 AM)defaultrouteuk Wrote:  IRIX also understands the RIP routing protocol and I could write about that if anyone is interested. Most people tend to have these boxes at home nowadays and home routers don't tend to support RIP whereas in the 90's when I worked on these boxes I used RIP a lot.
RIP doesn't do anything with link speeds, right?

Consider this: my SGI ethernet segment has systems with speeds ranging from 10Mb/s to gigabit. The FDDI segment is 100Mb/s. I have a router (a small Linux system) act as a router between ethernet and FDDI (which uses a larger ~4500bytes MTU so a simple bridge doesn't cut it).

FDDI was optional on SGI systems. These systems all have a 10Mb/s ethernet port as well. I do not wish to disable this ethernet interface because I can netboot from it.

The problem is that the fastest way to another system on the SGI ethernet system may well be via the FDDI segment even if the system has an interface in the ethernet segment.

Example (simplified):

Code:
Crimson
et0 : 192.168.10.10  -------------------------------------------------------------+           Origin
fddi: 192.168.11.11  ------------- 192.168.11.1 (FDDI router) 192.168.10.2 ---------------  192.168.10.20

In this case the fastest way from Crimson to Origin is via FDDI.

I think later routing protocols can deal with this, but nothing included in old IRIX will.

Alternatively, I could set up separate IP ranges for every speed grade (or at least for slower-than-FDDI) and send everything via router(s).

Thoughts?
(This post was last modified: 01-21-2022, 01:55 PM by jan-jaap.)
jan-jaap
SGI Collector

Trade Count: (0)
Posts: 1,048
Threads: 37
Joined: Jun 2018
Location: Netherlands
Website Find Reply
01-21-2022, 01:49 PM
#4
RE: Static Networking *TIP*
Hi There,

That's the sort of awesome homelab question I love :-)

You are right, RIP can't help you with this one. Your diagram was awesome by the way.

The static way I see you working this out would be to create an alias on the Octane interface (so it has two IP addresses) and use the host's file to address the second subnet interface. e.g.


CRIMSON                                                                     OCTANE
et0:  192.168.10.10  (255.255.255.0) ----------------------> ec0:0 192.168.10.11  (255.255.255.0)
fddi: 192.168.11.10  (255.255.255.0) ----------------------> ec0:1 192.168.11.11  (255.255.255.0)

/etc/hosts
CRIMSON 192.168.11.10
OCTANE   192.168.11.11

Code:
richard@marvin [~]: chkconfig
        Flag                 State
        ====                 =====
        OUTPUT TRUNCATED
        ipaliases            on

Code:
richard@marvin [~]: cat /etc/config/ipaliases.options
ec0 192.168.11.10 netmask 0xffffff00 broadcast 192.168.11.255

Code:
richard@marvin [~]: ifconfig -a
ec0: flags=8410c43<UP,BROADCAST,RUNNING,FILTMULTI,MULTICAST,LINK0,IPALIAS,IPV6>
        inet 203.0.113.12 netmask 0xffffff00 broadcast 203.0.113.255
        inet 192.168.11.10 netmask 0xffffff00 broadcast 192.168.11.255


Hope that helps and I didn't shoot myself in the nob
Richie

EDIT: Literally changed everything.

"My answer in answering the question: "What does the red spectrum tell us about quasars",There are various words that need to be defined: what is a spectrum, what is a red one, why is it red, and why is it so frequently linked with quasars?"..."What the hell is a quasar?


Onyx2 Octane2 O2 O2 Origin 200 Indigo2 R10000/IMPACT Indy
(This post was last modified: 01-21-2022, 02:58 PM by defaultrouteuk.)
defaultrouteuk
Sponsor

Trade Count: (0)
Posts: 111
Threads: 28
Joined: Jul 2020
Location: Dubai
Website Find Reply
01-21-2022, 02:47 PM
#5
RE: Static Networking *TIP*
Hmmm, I see some issues here:
  • I have systems running IRIX 3.2 / 3.3 / 4.0 / 5.3 / 6.2 / 6.5. I'm not so sure older IRIxes even know about IP aliases.
  • I'd end up with IP aliases on all but the slowest of my systems and significant hosts files which would have to be in sync across all of them. Maintenance nightmare.
  • The FDDI IP range currently only exists 'behind' the FDDI router appliance, and my central router (I have other IP ranges and VLANs) publishes a static route for the FDDI IP range via the FDDI appliance. The moment 'FDDI range' IP addresses show up on my ethernet this is going to fail.
  • If I'm going to assign FDDI range IPs to systems on ethernet, why even keep the ethernet address? I mean, sure, you'd save router bandwidth, but most of these systems don't see a lot of action, are 100Mb/s speed while all routing is at gigabit speeds. Without aliases, only the 10Mb/s systems would remain on "SGI ethernet". Effectively, this is not so different as my idea to put 10Mb/s on a separate IP range, right?

I have some 25 MIPS/IRIX systems. I try to have as much configuration centralized as possible and it makes sense to modify my network setup to match the out-of-the-box configuration of IRIX (at least on the subnet where the IRIX systems live) and minimize configuration changes on each system. For this reason alone I would prefer to have routed active if only so I don't need to edit config files on 25 systems (and on IRIX < 6.2 you need to edit the actual startup scripts, there's no static-route.options). This is an example of a (long term) goal, I know routed won't solve my FDDI IP problem.
jan-jaap
SGI Collector

Trade Count: (0)
Posts: 1,048
Threads: 37
Joined: Jun 2018
Location: Netherlands
Website Find Reply
01-21-2022, 07:12 PM
#6
RE: Static Networking *TIP*
Hi defaultrouteuk & others,

there are a couple of other configuration files that need to be used including (IRIX 6.5):
- /etc/config/netif.options - to override the default network interface/name if you have multiple network cards in you machine
- /etc/ethers - provides mapping between MAC address and host name (use "netstat -ian" to get MAC addresses of your interfaces)
- /etc/config/proclaim.options - to control DHCP behaviour (I know it is not "static", but the DHCP behaviour is messy on IRIX as it is dependent on some of the static setup)

Cheers from Oz,

jwhat/John
(This post was last modified: 01-23-2022, 02:34 AM by jwhat.)
jwhat
Octane/O350/Fuel User

Trade Count: (0)
Posts: 513
Threads: 29
Joined: Jul 2018
Location: Australia
Find Reply
01-22-2022, 03:57 AM
#7
RE: Static Networking *TIP*
Hi There - seems like a moving feast at this point. I still appreciate the feedback and the notes from john are great.

Sounds like you need a flat network with multiple subnets in it.

I'm thinking way off piste here and it's not something you'd do in the real world without a few beers first but you can have one broadcast domain (bridge/switch VLAN) and host more than one IP subnet. So you can have a static subnet of 192.168.11.0/24 for your FDDI hosts and either static of dynamic DHCP for your primary hosts (192.168.10.0/24). If you wanted everyone on the same subnet you could even make your linux router a bridge instead. I used to do that with ethernet and TR hosts (translation bridge I think we called it).

I could be missing your point but it feels like you need a simple way for your 25 (or more) SGI boxes to get online. We all know DHCP is designed for that. So I heard there are some issues with DHCP under IRIX but I can't imagine there will be so bad, it and bootp have been a standards for ages. So if DHCP is an issue just use BOOTP.

So yeah, if you need layer 2 communication and have one bridge then just have 192.168.11.0 and 192.168.10.0 in the same VLAN//bridge domain. Then cut and paste if you use static or dynamic addressing for each network card then adjust the host file to prioritise which network card you want to use for which purpose.

One other thing that came to mind is using source NAT on your linux router. If you setup a 1:1 NAT rule for 192.168.11.10 as like 192.168.10.11 or something then you can have everything on 192.168.10.0/24. Nodes in the 11 subnet will always address the 10 hosts and the hosts on the 10 network will address your 11 host as a 10.

Food for thought I hope at least.
Rich

"My answer in answering the question: "What does the red spectrum tell us about quasars",There are various words that need to be defined: what is a spectrum, what is a red one, why is it red, and why is it so frequently linked with quasars?"..."What the hell is a quasar?


Onyx2 Octane2 O2 O2 Origin 200 Indigo2 R10000/IMPACT Indy
(This post was last modified: 01-23-2022, 08:18 AM by defaultrouteuk.)
defaultrouteuk
Sponsor

Trade Count: (0)
Posts: 111
Threads: 28
Joined: Jul 2020
Location: Dubai
Website Find Reply
01-23-2022, 07:59 AM


Forum Jump:


Users browsing this thread: 1 Guest(s)