ChorusOS 4.0 Network Administration Guide

Appendix B System Image Configuration Summary

This appendix summarizes how to configure your system image to support networking.

Table B-1 Networking Features, Tunables, Actors and Scripts

If you want... 

Set... 

Include the following in the system image... 

DHCP (client)

  • BPF=true

  • dhclient.cf script

  • dhclient.r actor

  • sysadm.ini

Ethernet 

  • ADMIN_IFCONFIG=true

  • sysadm.ini

ifconfig (built-in C_INIT(1M) command)

  • ADMIN_IFCONFIG=true

 

mount (built-in C_INIT(1M) command)

  • ADMIN_MOUNT=true

 

netstat (built-in C_INIT(1M) command)

  • ADMIN_NETSTAT=true

 

PPP (client)

  • ADMIN_IFCONFIG=true

  • VTTY=true

  • PPP=true

  • iom.nfs.rsize=1024

  • iom.nfs.wsize=1024

  • chat.cmd chat script (if needed to configure a modem)

  • chat.r actor (if needed to configure a modem)

  • pppstart.r actor

  • sysadm.ini

RARP (client)

  • BPF=true

  • ADMIN_IFCONFIG=true

  • ADMIN_RARP=true

  • BPF=true

  • sysadm.ini commands

route (built-in C_INIT(1M) command)

  • ADMIN_ROUTE=true

 

SLIP (client)

  • ADMIN_IFCONFIG=true

  • VTTY=true

  • SLIP=true

  • iom.nfs.rsize=512

  • iom.nfs.wsize=512

  • chat.cmd chat script (if needed to configure a modem)

  • chat.r actor (if needed to configure a modem)

  • slattach.r actor

  • sysadm.ini

Table B-2 Networking sysadm.ini Commands

If you want... 

Adapt the following example sysadm.ini commands...

DHCP (client)

# Create an Ethernet interface
#
mkdev ifeth 0 /pci/epic100
#mkdev ifeth 1 /pci/pci-isa/smc1660-1

# Create a Berkeley Packet Filter
mkdev bpf 0
mknod /dev/bpf0 c 20 0

# Create a loopback interface
#
mkdev lo 0

# Configure the Ethernet interface with DHCP
arun /image/sys_bank/dhclient ifeth0 &
ifwait ifeth0

# Configure the loopback interface
#
ifconfig lo0 127.0.0.1 up

Ethernet 

# Create an Ethernet interface
#
mkdev ifeth 0 /pci/epic100
#mkdev ifeth 1 /pci/pci-isa/smc1660-1

# Create a loopback interface
#
mkdev lo 0

# Configure the interfaces using ifconfig
# (IP address is known)
#
ifconfig ifeth0 129.157.197.88 netmask 0xffffff00 \ 
broadcast 129.157.197.255
ifconfig lo0 127.0.0.1 up

IP forwarding

#
# Enable IP forwarding
#
arun /bin/sysctl -w IPCTL_FORWARDING=1

#
# Deliver packets addressed to the local system
#
route add -host 129.157.197.88 lo0

#
# Send other packets back out to the Ethernet
#
route add default -interface ifeth0

PPP (client)

mkdev tty 0 /pci/pci-isa/ns16550-2      # Create a tty interface
                                        # using the second serial port
                                        # because the first is reserved
                                        # for the tip line

mkdev ppp 0                             # Create a PPP interface that is
                                        # not bound to the tty yet.

mknod /dev/tty01 c 0 0                  # Create a tty special file

#mknod /dev/ttyp0 c 5 0                # Pseudo tty devices, needed
#mknod /dev/ptyp0 c 6 0                # for dialup on demand.

# Enable PPP
# Requires pppstart.r in system image
#
arun /image/sys_bank/pppstart &

pppd /dev/tty01                         # Open a PPP line.

# Wait for the interface to be up.
#
ifwait ppp0

RARP (client)

# Create an Ethernet interface
#
mkdev ifeth 0 /pci/epic100
#mkdev ifeth 1 /pci/pci-isa/smc1660-1

# Create a loopback interface
#
mkdev lo 0

# Create a Berkeley Packet Filter for RARP
mkdev bpf 0
mknod /dev/bpf0 c 20 0

# Configure the Ethernet interface with RARP
rarp ifeth0

# Configure the loopback interface
#
ifconfig lo0 127.0.0.1 up

SLIP (client)

mkdev tty 0 /pci/pci-isa/ns16550-2      # Create a tty interface
                                        # using the second serial port
                                        # because the first is reserved
                                        # for the tip line.

mkdev sl 0                              # Create a SLIP interface that is
                                        # not bound to the tty yet.

mknod /dev/tty01 c 0 0                  # Create a tty special file

# Simple initialization of direct serial line connection
# Requires slattach in system image
#
arun /image/sys_bank/slattach -s 38400 -l /dev/tty01 &

# Initialization using chat to connect through a modem
# Requires slattach.r, chat.r and chat.cmd in system image
#
#arun /image/sys_bank/slattach -z -r "'/image/sys_bank/chat \ 
#-f /image/sys_bank/chat.cmd'" /dev/tty01 &

# Configure the SLIP interface
#
ifconfig sl0 129.157.197.88 129.157.197.144 netmask 255.255.255.0

See the appropriate document in the ChorusOS 4.0 Target Family Documentation Collection for serial device IDs for other serial line hardware.