Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2007 04:42:44 +0800
From:      "=?WINDOWS-1252?Q?area_damai=99?=" <area.damai@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   /etc/rc.d/netif wont add default gateway
Message-ID:  <f22f48480712021242o462e6492od633d7955a247af0@mail.gmail.com>

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

whenever i run /etc/rc.d/netif it will read rc.conf and add the pc IP and
netmask but it wont read the default gateway resulting lost connectivity to
internet

# -- my /etc/rc.conf :
defaultrouter="192.168.1.1"
hostname="msc.edu"
ifconfig_rl0="inet 192.168.1.9 netmask 255.255.255.0"
inetd_enable="YES"
linux_enable="YES"
saver="daemon"
sshd_enable="YES"
#usbd_enable="YES"

# -- while issuing /etc/rc.d/netif restart:
[root@msc ~]# /etc/rc.d/netif restart
Stopping network: lo0 rl0 plip0 pfsync0 pflog0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:15:e9:7c:76:12
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active

# -- the result of running netif to routing tables:
[root@msc ~]# netstat -rn
Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.1 link#1 UC 0 0 rl0
192.168.1.10 00:0f:b0:84:97:80 UHLW 1 15 rl0 1146

Internet6:

# -- i have to manually add default gateway to get my gateway back on
routing tables:
[root@msc ~]# route add default 192.168.1.1
add net default: gateway 192.168.1.1

# -- routing status
[root@msc ~]# netstat -rn
Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGS 0 0 rl0
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.1 link#1 UC 0 0 rl0
192.168.1.1 link#1 UHLW 2 0 rl0
192.168.1.10 00:0f:b0:84:97:80 UHLW 1 54 rl0 1056

Internet6:

***my question is, why /etc/rc.d/netif wont read directly from my
/etc/rc.conf as I already stated the defaultrouter="192.168.1.1" there?

i'm on FreeBSD 6.2 on LAN

[root@msc ~]$ uname -a
FreeBSD www.msc.edu 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Sat Dec  1
14:31:02 MYT 2007     root@msc.edu:/usr/obj/usr/src/sys/MSC  i386
[root@msc~]$

thanks for helping



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