Date: Tue, 24 Feb 2004 18:57:51 +0200 From: Anton Blajev <valqk@lozenetz.net> To: freebsd-net@freebsd.org Subject: RE: ifconfig and route problem. Message-ID: <1077641871.1046.10.camel@valqk.upper.lan>
next in thread | raw e-mail | index | archive | help
Please stop flooding. :) RTFM -> man ifconfig ; man route you CAN'T change your NIC's ip whithough deleteing your default route. why's that? well... route add default 192.168.0.1 when you add default gw it must be reachable on your network. when you change ip, you have to add ne w route because you;ve changed network. aka you can patch ifconfig command to check if you change ip address to other form your network(192.168.0.0 for example) and don't delete default route... dunno ... I think ifconfig deletes it. not pretty sure. a simple desicion will be a bash script: ---- ./chaddr.sh rl0 192.168.0.50 255.255.255.0 192.168.0.1 ###############i-face ip nmask gw #!/bin/sh /sbin/ifconfig $0 $1 $3 /sbin/route add default 1$4
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1077641871.1046.10.camel>