Re: multi-homing in freebsd
Yasir hussan schrieb:,
> Kindly will u give me example with cammand line, which can test on my
> freebsd machine, i want two ips 192.168.1.100 and 192.169.1.100 to be work
> on single network interface, my default interface for network is arge0
I run 2 public networks with different routers and IPSs
All my servers are multi-homed.
1) confing both IPs
you set up each network on your interface.
2) config your routing (2 choices)
2a) kernel with ipfw and "options IPFIREWALL_FORWARD"
$fwcmd add pass all from ${network_a} to ${network_a} via ${ext_if}
$fwcmd add pass all from ${network_b} to ${network_b} via ${ext_if}
$fwcmd add fwd ${gw_a} ip from ${myip_a} to any
$fwcmd add fwd ${gw_b} ip from ${myip_b} to any
2b) with pf
pass quick on $ext_if from $network_a to $network_a no state
pass quick on $ext_if from $network_b to $network_b no state
pass out quick on $ext_if route-to ($int_if $gw_a) from $myip_a to any no state
pass out quick on $ext_if route-to ($int_if $gw_b) from $myip_b to any no state
3) verify that you can use both ips for internet
traceroute -s $myip_a www.example.com
traceroute -s $myip_b www.example.com
kind regards Dirk
- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 11 之 13 篇):