network

Kevin O'Connor kevin at ziptek-technologies.co.uk
Tue Jan 6 12:21:15 GMT 2004


Kevin,
       The ifconfig stuff should go into /etc/rc.conf  There is a
difference in your masks between the RedHat and FreeBSD setup example
you have given  so I'm not sure which is the correct one and therefore
unsure of what you are trying to achieve.   
The route add commands are not needed simply enable the FreeBSD box as a
gateway. Should you wish to add static routes the following goes into
/etc/rc.conf

static_routes="lan1 lan2"     
route_lan1="10.80.164.0/24   10.80.164.1"
route_lan2="192.168.0.0/24     192.168.0.1"
router_enable="YES"
router_flags="-s"
router="routed"

the format is
static_routes="names of routes separated by a white space"
route_route-name="network address in CIDR format   router IP address" 

However as your FreeBSD box is your router I don't see the need unless
your using OSPF on a large network and wish to tell the FreeBSD box
where the router is for networks it's not directly attached to. On the
other hand I could have completely misunderstood what you are trying to
do :)
Regards
Kevin  "Hmmm that's going to confuse people"
 
-----Original Message-----
From: freebsd-users-admin at uk.freebsd.org
[mailto:freebsd-users-admin at uk.freebsd.org] On Behalf Of Kevin
Sent: 06 January 2004 10:16
To: freebsd-users at uk.freebsd.org
Subject: network 

Happy New Year

I am in the process of moving our Redhat systems to FreeBSD systems.  We
are currently using a machine as a router which below is a snip of the
script we run to start everything working 

echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/default/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/eth0/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/lo/send_redirects
/sbin/ifconfig eth0:0 192.168.1.254 netmask 255.255.255.0
/sbin/route add -host 192.168.1.254 dev eth0:0
/sbin/ifconfig eth0:1 192.168.2.254 netmask 255.255.255.0
/sbin/route add -host 192.168.2.254 dev eth0:1
/sbin/ifconfig eth0:2 192.168.3.254 netmask 255.255.255.0
/sbin/route add -host 192.168.3.254 dev eth0:2

FreeBSD
Would this be the correct syntax?

ifconfig ep0 inet 192.168.1.254 netmask 255.255.255.255 alias
route add -host 192.168.1.2540 127.0.0.1 0
ifconfig ep0 inet 192.168.2.254 netmask 255.255.255.255 alias
route add -host 192.168.2.254 127.0.0.1 0

Am I on the correct track or way off?

Thanks for any advice

Kevin


________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

------ FreeBSD UK Users' Group  -  Mailing List ------
http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users





More information about the Ukfreebsd mailing list