Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 1997 20:16:09 +0300 (EET DST)
From:      Ruslan Ermilov <ru@ucb.crimea.ua>
To:        freebsd-questions@freebsd.org
Cc:        freebsd-bugs@freebsd.org
Subject:   slattach in 2.2.x
Message-ID:  <199707011716.UAA13617@relay.ucb.crimea.ua>

Next in thread | Raw E-Mail | Index | Archive | Help
Hi!

I've running 2.2.1-RELEASE of FreeBSD.
I need to start slattach with slip unit 1 (sl1).

The slattach (or ifconfig) works strange.

The command I use to run slattach (named start_sl1) is:
/sbin/slattach -a -h -r "" -s 38400 -u /etc/ifconfig_if.sl1 -S 1 /dev/cuaa0

And the /etc/ifconfig_if.sl1 (modified from
/usr/share/examples/slattach/unit-command.sh) looks like:

#############################################################
#!/bin/sh

old_unit=$1
new_unit=$2

if [ $old_unit != -1 ]; then
	ifconfig sl$old_unit delete down
fi

if [ $new_unit != -1 ]; then
	ifconfig sl$new_unit 194.93.177.2 195.114.158.252
fi
#############################################################

When I just invoke `start_sl1' (and nothing more):

`netstat -rn' says:
195.114.158.252    194.93.177.2       UH          0      116       sl1

`ifconfig -a' says:
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
sl1: flags=c011<UP,POINTOPOINT,LINK2,MULTICAST> mtu 552
	inet 194.93.177.2 --> 195.114.158.252 netmask 0xffffff00 
sl2: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
sl3: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552

Everything seems ok, right?

BUT.... When I use the following command: sh -c "start_sl1; ifconfig sl1",
I receive:

`netstat -rn' says:
195.114.158.252    194.93.177.2       UH          0        0       sl1

`ifconfig -a' says:
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
	inet 194.93.177.2 --> 195.114.158.252 netmask 0xffffff00 
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
sl2: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
sl3: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552

`netstat -in' says:
sl1*  552   <Link>                             277     0        0     0     0
sl1*  552   194.93.177    194.93.177.2         277     0        0     0     0
sl0*  552   <Link>                             933     0      131     0     0
sl2*  552   <Link>                               0     0        0     0     0
sl3*  552   <Link>                               0     0        0     0     0

I think the problem in `ifconfig' or `if_sl.c', because when I manually
run ifconfig on sl1, information actually saved to sl0 (sometimes in sl2
and sl3).

So, when I inkove just `ifconfig sl1' when the sl1 isn't yet in `slip
discipline', the ifconfig (or slattach) uses wrong slip unit.

The questions is: did you seen this and HOW TO SOLVE THIS PROBLEM?

Thanks in advance,
-- 
Ruslan A. Ermilov	System Administrator
ru@ucb.crimea.ua	United Commercial Bank
+380-652-247 647	Simferopol, Crimea



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?199707011716.UAA13617>