/etc/rc.d/netif wont add default gateway

area damai™ area.damai at gmail.com
Sun Dec 2 13:48:39 PST 2007


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 at 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 at 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 at msc ~]# route add default 192.168.1.1
add net default: gateway 192.168.1.1

# -- routing status
[root at 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 at msc ~]$ uname -a
FreeBSD www.msc.edu 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Sat Dec  1
14:31:02 MYT 2007     root at msc.edu:/usr/obj/usr/src/sys/MSC  i386
[root at msc~]$

thanks for helping


More information about the freebsd-stable mailing list