netgraph and high availability(bonding) problem
amendola maurizio
m.amendola at finecogroup.it
Fri Sep 10 02:57:12 PDT 2004
Hi at all
I have some problem to configure two network card in high availabilty mode.
I have done many test with some configurations but I desn't work. I have
Freebsd 5.2.1 and I have also add a patch realized from Evgeny Dolgopiat
about ng_one2many.c and ng_one2many.h. Test n.1 (with 2 cards on single
switch(yes, i know that is not a best ha solution)
In this case I have had packets duplication but I have HA to get or put a
net cable. Test n2. (with 2 cards on differnet switch) In this case I have
not packets duplication but I haven't HA to get or put a net cable: if I get
a secondary cable It works but if I get the primary cable it doesn't work
all. This the configuration that I have testes:
#from README of ng_one2many patch
#!/bin/sh
#Build ng_one2many module
kldload /usr/src/sys/modules/netgraph/one2many/ng_one2many.ko
#Stat about module
kldstat
#Create one pseudo interface
ngctl mkpeer xl0: one2many upper many
#Assegno il nome xl0 al nodo o2m
ngctl name xl0: upper o2m
#Creo un link tra xl0 e o2m usando many0
ngctl connect xl0: o2m: lower many0
#Creo un link tra xl1 e o2m usando many1
ngctl connect xl1: o2m: lower many1
#Metto in promisc mode xl1
ngctl msg xl1: setpromisc 1
#Metto xl1 in autosrc=0
ngctl msg xl1: setautosrc 0
ifconfig xl0 inet 192.168.168.239 netmask 255.255.255.0
ngctl msg o2m: setconfig { xmitAlg=1 failAlg=2 } # set heartbit algo
ngctl msg o2m: sethbconfig { timeout=2 period=3 } # set time between
ngctl list
route add default 192.168.168.220
_______________________________________________
#IDS:port bonding and taps
#in etherchannel ok
#
#!/bin/sh
kldload /usr/src/sys/modules/netgraph/fec/ng_fec.ko
kldstat
ngctl list
ngctl mkpeer fec dummy fec
ngctl msg fec0: add_iface '"xl0"'
ngctl msg fec0: add_iface '"xl1"'
ngctl msg fec0: set_mode_inet
ngctl msg fec0: set_mode_mac
ngctl msg fec0: set_mode_inet6
ngctl list
ifconfig fec0 promisc
ifconfig fec0 up
ifconfig fec0 inet 192.168.168.239 netmask 255.255.255.0
route add default 192.168.168.220
__________________________________________________________
#!/bin/sh
kldload /usr/src/sys/modules/netgraph/ether/ng_ether.ko
kldload /usr/src/sys/modules/netgraph/one2many/ng_one2many.ko
kldstat
ngctl list
ifconfig xl0 promisc -arp up
ifconfig xl1 promisc -arp up
ngctl mkpeer . eiface hook ether
ngctl mkpeer ngeth0: one2many lower one
ngctl connect xl0: ngeth0:lower lower many0
ngctl connect xl1: ngeth0:lower lower many1
ngctl list
ifconfig ngeth0 up
ifconfig ngeth0 inet 192.168.168.239 netmask 255.255.255.0 ifconfig -a route
add default 192.168.168.220 _____________________________________________
#Taosecurity
#!/bin/sh
kldload /usr/src/sys/modules/netgraph/ether/ng_ether.ko
kldstat
ifconfig xl0 promisc -arp up
ifconfig xl1 promisc -arp up
ngctl mkpeer . eiface hook ether
ngctl mkpeer ngeth0: one2many lower one
ngctl connect xl0: ngeth0: lower lower many0
ngctl connect xl1: ngeth0: lower lower many1
ngctl list
ifconfig ngeth0 -arp up
ifconfig ngeth0 inet 192.168.168.239 netmask 255.255.255.0 ifconfig -a route
add default 192.168.168.220 ________________________________________
#Taosecurity modified 30/07/04
#!/bin/sh
kldload /usr/src/sys/modules/netgraph/ether/ng_ether.ko
kldstat
ifconfig xl0 promisc -arp up
ifconfig xl1 -arp up
ngctl mkpeer . eiface hook ether
ngctl mkpeer ngeth0: one2many lower one
ngctl connect xl0: ngeth0: lower lower many0
ngctl connect xl1: ngeth0: lower lower many1
ngctl list
ifconfig ngeth0 -arp up
ifconfig ngeth0 inet 192.168.168.239 netmask 255.255.255.0 route add default
192.168.168.220 ifconfig -a
Any suggetion.
Maurizio
More information about the freebsd-net
mailing list