From owner-freebsd-questions Tue Jul 1 10:22:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA09509 for questions-outgoing; Tue, 1 Jul 1997 10:22:40 -0700 (PDT) Received: from relay.ucb.crimea.ua (ru@UCB-CRIS-19.2K.CRIS.NET [194.93.177.2]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA09480; Tue, 1 Jul 1997 10:22:16 -0700 (PDT) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.8.5/8.8.5) id UAA13617; Tue, 1 Jul 1997 20:16:09 +0300 (EET DST) From: Ruslan Ermilov Message-Id: <199707011716.UAA13617@relay.ucb.crimea.ua> Subject: slattach in 2.2.x To: freebsd-questions@freebsd.org Date: Tue, 1 Jul 1997 20:16:09 +0300 (EET DST) Cc: freebsd-bugs@freebsd.org X-My-Interests: Unix,Oracle,Networking X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 mtu 552 sl1: flags=c011 mtu 552 inet 194.93.177.2 --> 195.114.158.252 netmask 0xffffff00 sl2: flags=c010 mtu 552 sl3: flags=c010 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 mtu 552 inet 194.93.177.2 --> 195.114.158.252 netmask 0xffffff00 sl1: flags=c010 mtu 552 sl2: flags=c010 mtu 552 sl3: flags=c010 mtu 552 `netstat -in' says: sl1* 552 277 0 0 0 0 sl1* 552 194.93.177 194.93.177.2 277 0 0 0 0 sl0* 552 933 0 131 0 0 sl2* 552 0 0 0 0 0 sl3* 552 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