Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Nov 1994 00:25:47 GMT
From:      Adrian Corston <adrian@duster.adelaide.on.net>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        adrian@internode.com.au
Subject:   kern/652: Gated & multiple addresses on one interface
Message-ID:  <199411090025.AAA00398@duster.adelaide.on.net>
Resent-Message-ID: <199508031630.JAA05185@freefall.cdrom.com>

next in thread | raw e-mail | index | archive | help

>Number:         652
>Category:       kern
>Synopsis:       Multiple addresses on one interface interacts badly with gated
>Confidential:   yes
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug  3 09:30:00 PDT 1995
>Last-Modified:
>Originator:     Adrian Corston
>Organization:
Internode Professional Access
>Release:        FreeBSD 2.0-BUILT-19950529 i386
>Environment:

I am trying to configure a machine to respond on multiple (ie. > 20)
addresses by having lots of aliases on the ed0 interface. The aliases
are on a different network number to the main address on ed0. I also
need to use gated to propagate routing information about this network.

Here is my /etc/gated.conf:
!#traceoptions route;
!
!rip on {
!#	traceoptions packets;
!#	traceoptions send response;
!	interface ed0 ripin ripout;
!	interface tun0 ripin ripout;
!};
!
!#egp off;
!#bgp off;
!#hello off;
!
!# for ICMP packets
!redirect on;
!
!#static {
!#	203.16.210.0 interface lo0 retain;
!#};
!
!#
!# Accept only RippleTech's net from Thebarton.
!#
!import proto rip interface tun0 {
!	203.16.208.0 mask 255.255.255.0;
!	all restrict;
!};
!
!#
!# Propagate our nets to the IPA rack.
!#
!export proto rip interface ed0 {
!	proto rip {
!		203.16.208.0 mask 255.255.255.0;
!		all restrict;
!	};
!	proto direct {
!		203.16.210.0 mask 255.255.255.0;
!		all restrict;
!	};
!};

At startup, I add the aliases to the ed0 interface by adding the following
commands to /etc/netstart (after the for loop which ifconfigs the network
interfaces and before the bits which set up default route):

!# XXXX Adrian's additions for multiple address response on the local machine.
!for addr in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23; do
!	ifconfig ed0 203.16.210.$addr alias netmask 255.255.255.255
!done

Here is my /etc/sysconfig:

!#!/bin/sh
!#
!
!# This is sysconfig - a file full of useful variables that you can set 
!# to change the default startup behavior of your system.
!#
!#	$Id: sysconfig,v 1.14 1995/05/17 04:46:57 rgrimes Exp $
!
!######################### Start Of Syscons Section #######################
!
!# Choose keyboard map from /usr/share/syscons/keymaps/* or NO if default.
!keymap=/root/keymap
!
!# Set keyboard rate to: slow, normal, fast or NO if default.
!keyrate=fast
!
!# Change function keys default values (or no change if NO)
!# Syntax: "<funkey_number> <new_value> [<funkey_number> <new_value>]..."
!keychange=NO
!
!# Desired cursor type {normal|blink|destructive}, NO if no change
!cursor=NO
!
!# Choose screen map from /usr/share/syscons/scrnmaps/* (or NO for none)
!scrnmap=NO
!
!# Choose font 8x16 from /usr/share/syscons/fonts/* (or NO for default)
!font8x16=NO
!
!# Choose font 8x14 from /usr/share/syscons/fonts/* (or NO for default)
!font8x14=NO
!
!# Choose font 8x8 from /usr/share/syscons/fonts/* (or NO for default)
!font8x8=NO
!
!# Set blank time (in seconds) or "off" to turn it off (or NO for default)
!blanktime=600
!
!# Set to screen saver desired: blank, green, snake, star (or NO for none)
!saver=green
!
!# General russian setup for example:
!# (koi8-r keyboard with cp866 screen font mapped to koi8-r)
!#
!# keymap=ru.koi8-r
!# keyrate=fast
!# keychange="61 "
!# cursor=destructive
!# scrnmap=koi8-r2cp866
!# font8x16=cp866b-8x16
!# font8x14=cp866-8x14
!# font8x8=cp866-8x8
!# blanktime=600
!# saver=snake
!
!######################### End Of Syscons Section #######################
!
!######################### Start Of Netconfig Section #######################
!
!# Set to the name of your host - this is pretty important!
!hostname="duster"
!
!# Set to the NIS domainname of your host, or NO if none
!defaultdomainname=NO
!
!#
!# Some broken implementations can't handle the RFC 1323 and RFC 1644
!# TCP options.  If TCP connections randomly hang, try disabling this,
!# and bug the vendor of the losing equipment.
!#
!tcp_extensions=YES
!
!#
!# Set to the list of network devices on this host.  You must have an
!# ifconfig_${network_interface} line for each interface listed here.
!# for example:
!#
!#	network_interfaces="ed0 sl0 lo0"
!#	ifconfig_ed0="inet 10.0.0.1 netmask 0xffffff00"
!#	ifconfig_sl0="inet 10.0.1.0 netmask 0xffffff00"
!#
!network_interfaces="ed0 lo0 tun0"
!ifconfig_ed0="inet 192.231.203.6 netmask 255.255.255.0"
!ifconfig_lo0="inet localhost"
!ifconfig_tun0="up"
!
!#
!# Set to the list of route add lines for this host.  You must have a
!# route_${static_routes} line for each static route listed here.
!#
!static_routes="loopback"
!#route_multicast="224.0.0.0 -netmask 0xf0000000 -interface ${hostname}"
!route_loopback="${hostname} localhost"
!
!# Set to the host you'd like set as your default router, or NO for none.
!defaultrouter=NO
!
!# These are the flags you'd like to start the routing daemon with
!routedflags=NO
!
!# timed flags, or NO if you don't want to start the time daemon
!timedflags=NO
!
!# xntpd flags, or NO if you don't want to start the xntpd daemon
!xntpdflags="NO"
!
!# this is inoperative unless xntpd is enabled; NO to disable
!tickadjflags="-Aq"
!
!# Set to the site you'd like to syncronize your clock from (gatekeeper.dec.com,
!# for example) or NO for no such site.
!ntpdate="NO"
!
!# Set to YES if you want to run rwhod
!rwhod=NO
!
!# Default sendmail flags.  -bd is pretty mandatory, -q<n>m sets the queue scan
!# time in minutes.  If set to NO, don't start sendmail at all.
!#sendmail_flags="-bd -q30m"
!sendmail_flags=NO
!
!# Set to appropriate flags if you want to use AMD
!amdflags="NO"
!
!# Set to YES if this machine will be an NFS client
!nfs_client=NO
!
!# Set to YES if this machine will be an NFS server
!nfs_server=NO
!
!# Set to appropriate flags if you want to start NIS for a client
!nis_clientflags="NO"
!
!# Set to appropriate flags if you want to start NIS for a server
!nis_serverflags="NO"
!
!# Set to appropriate flags for yppasswdd, if you wish to run it.
!# Typical flags might be "-m /var/yp/master.passwd -s -f"
!yppasswddflags="NO"
!
!# Set to appropriate flags for named, if you have a full-time
!# connection to the Internet.
!# For most hosts, flags should be "-b /etc/namedb/named.boot"
!namedflags="NO"
!
!# Set to YES if you want to run the X-10 power controller daemon
!xtend=NO
!
!# Set to YES if you want kernel crashdumps to be saved for debugging
!savecore=NO
!
!# Set to YES if you want to run Kerberos authentication
!kerberos_server=NO
!
!# Set to YES if you want to run gated
!gated=YES
!
!# Set to YES if you wish to check quotas.  NOTE:  For now this probably
!# doesn't work and should be left disabled.
!check_quotas=NO
!
!# Set to YES to turn on accounting.  NOTE: For now this probably
!# doesn't work and should be left disabled.
!accounting=NO
!
!
!# This stuff needed for proper daemons tuning, comsat f.e.
!# See profile and csh.login also.
!# Uncomment next line if you want to setup your 8-bit locale at program
!# startup automatically
!# ENABLE_STARTUP_LOCALE=; export ENABLE_STARTUP_LOCALE
!# Uncomment next line to activate russian locale
!# LANG=ru_SU.KOI8-R; export LANG
!# Uncomment next line to activate italian locale
!# LANG=it_IT.ISO8859-1; export LANG
!# For full list of locales, check /usr/share/locale/*
!
!######################### End Of Netconfig Section #######################
!
!######################### Start Of Misc Section #######################
!
!# Set to YES if you want ibcs2 (SCO) emulation loaded at startup
!ibcs2=NO

>Description:

The alias addresses on the ed0 interface aren't reachable once gated
is started. I can't even ping them.

>How-To-Repeat:

Configure a machine with the files as shown above (with different network
numbers and without the tun0 driver stuff, which I don't think is the
cause of the problem), and after a reboot, try "telnet <addr>" where
<addr> is one of the aliases on the ed0 interface. The connection doesn't
work - it prints the error:

telnet: Unable to connect to remote host: Permission denied

>Fix:

I don't know. If you just define a small number of aliases by hand after
startup, it seems to work ok, but restarting gated causes the problem
to resurface (I think).

To be honest, I suspect this is my inability to configure gated correctly
:-)


Many thanks,

Adrian@internode.com.au
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199411090025.AAA00398>