代码: 全选
# ifconfig bge0 up
# ifconfig bge1 up
# ifconfig trunk0 trunkport bge0 trunkport bge1192.168.1.1 netmask 255.255.255.0
代码: 全选
# ifconfig bge0 up
# ifconfig bge1 up
# ifconfig trunk0 trunkport bge0 trunkport bge1192.168.1.1 netmask 255.255.255.0
环境i386 4.9:chenjun 写了:OB官方手册上trunk可以实现双网卡故障转移,功能我实现了,可是就是在ping同一网段是出现大量dup,很是费解,trunk官方手册http://www.openbsd.org/cgi-bin/man.cgi? ... ormat=html
代码: 全选
CAVEATS
The trunk protocols loadbalance and roundrobin require a switch which
supports IEEE 802.3ad static link aggregation; otherwise protocols such
as inet6(4) duplicate address detection (DAD) cannot properly deal with
duplicate packets.
There is no way to configure LACP administrative variables, including
system and port priorities. The current implementation always performs
active-mode LACP and uses 0x8000 as system and port priorities.
代码: 全选
# cat /etc/hostname.re0
dhcp
# cat /etc/hostname.re1
dhcp
#
# ifconfig trunk0 trunkproto failover trunkport re0 trunkport re1 192.168.2.88 netmask 255.255.255.0
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33200
priority: 0
groups: lo
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
dc0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:08:a1:13:d9:b9
priority: 0
media: Ethernet autoselect (none)
status: no carrier
re0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:18:e7:17:e1:b8
priority: 0
trunk: trunkdev trunk0
groups: egress
media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
status: active
inet6 fe80::208:a1ff:fe13:d9b9%re0 prefixlen 64 scopeid 0x2
inet 192.168.2.100 netmask 0xffffff00 broadcast 192.168.2.255
re1: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:18:e7:17:e1:b8
priority: 0
trunk: trunkdev trunk0
media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
status: active
inet6 fe80::208:a1ff:fe13:d9b9%re1 prefixlen 64 scopeid 0x3
inet 192.168.2.35 netmask 0xffffff00 broadcast 192.168.2.255
xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:b0:d0:e4:97:14
priority: 0
media: Ethernet autoselect (none)
status: no carrier
enc0: flags=0<>
priority: 0
groups: enc
status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33200
priority: 0
groups: pflog
trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:18:e7:17:e1:b8
priority: 0
trunk: trunkproto failover
trunkport re1
trunkport re0 master,active
groups: trunk
media: Ethernet autoselect
status: active
inet 192.168.2.88 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::218:e7ff:fe17:e1b8%trunk0 prefixlen 64 scopeid 0x8
#
# ping 192.168.2.33
PING 192.168.2.33 (192.168.2.33): 56 data bytes
64 bytes from 192.168.2.33: icmp_seq=0 ttl=128 time=1.199 ms
64 bytes from 192.168.2.33: icmp_seq=1 ttl=128 time=0.447 ms
64 bytes from 192.168.2.33: icmp_seq=2 ttl=128 time=0.433 ms
64 bytes from 192.168.2.33: icmp_seq=3 ttl=128 time=0.474 ms
64 bytes from 192.168.2.33: icmp_seq=4 ttl=128 time=1.127 ms
64 bytes from 192.168.2.33: icmp_seq=5 ttl=128 time=0.452 ms
64 bytes from 192.168.2.33: icmp_seq=6 ttl=128 time=0.454 ms
64 bytes from 192.168.2.33: icmp_seq=7 ttl=128 time=0.558 ms
64 bytes from 192.168.2.33: icmp_seq=8 ttl=128 time=0.439 ms
64 bytes from 192.168.2.33: icmp_seq=9 ttl=128 time=0.442 ms
64 bytes from 192.168.2.33: icmp_seq=10 ttl=128 time=0.454 ms
64 bytes from 192.168.2.33: icmp_seq=11 ttl=128 time=0.481 ms
64 bytes from 192.168.2.33: icmp_seq=12 ttl=128 time=0.647 ms
64 bytes from 192.168.2.33: icmp_seq=13 ttl=128 time=0.445 ms
64 bytes from 192.168.2.33: icmp_seq=14 ttl=128 time=0.440 ms
64 bytes from 192.168.2.33: icmp_seq=15 ttl=128 time=0.451 ms
64 bytes from 192.168.2.33: icmp_seq=16 ttl=128 time=0.448 ms
64 bytes from 192.168.2.33: icmp_seq=17 ttl=128 time=0.846 ms
64 bytes from 192.168.2.33: icmp_seq=18 ttl=128 time=0.459 ms
64 bytes from 192.168.2.33: icmp_seq=19 ttl=128 time=0.460 ms
64 bytes from 192.168.2.33: icmp_seq=20 ttl=128 time=0.461 ms
64 bytes from 192.168.2.33: icmp_seq=21 ttl=128 time=0.452 ms
64 bytes from 192.168.2.33: icmp_seq=22 ttl=128 time=0.438 ms
64 bytes from 192.168.2.33: icmp_seq=23 ttl=128 time=0.441 ms
64 bytes from 192.168.2.33: icmp_seq=24 ttl=128 time=0.452 ms
64 bytes from 192.168.2.33: icmp_seq=25 ttl=128 time=0.467 ms
64 bytes from 192.168.2.33: icmp_seq=26 ttl=128 time=0.456 ms
64 bytes from 192.168.2.33: icmp_seq=27 ttl=128 time=0.444 ms
64 bytes from 192.168.2.33: icmp_seq=28 ttl=128 time=0.442 ms
64 bytes from 192.168.2.33: icmp_seq=29 ttl=128 time=0.444 ms
64 bytes from 192.168.2.33: icmp_seq=30 ttl=128 time=0.449 ms
64 bytes from 192.168.2.33: icmp_seq=31 ttl=128 time=0.474 ms
64 bytes from 192.168.2.33: icmp_seq=32 ttl=128 time=0.463 ms
64 bytes from 192.168.2.33: icmp_seq=33 ttl=128 time=0.458 ms
64 bytes from 192.168.2.33: icmp_seq=34 ttl=128 time=1.068 ms
64 bytes from 192.168.2.33: icmp_seq=35 ttl=128 time=0.447 ms
64 bytes from 192.168.2.33: icmp_seq=36 ttl=128 time=0.451 ms
64 bytes from 192.168.2.33: icmp_seq=37 ttl=128 time=0.471 ms
--- 192.168.2.33 ping statistics ---
38 packets transmitted, 38 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.433/0.524/1.199/0.193 ms
#
正浏览此版面之用户: 没有注册用户 和 1 访客