memif_create_chain_ipsec.exec revision 3d5a75be
1create memif socket id 1 filename $socket1
2create interface memif id $mid1 socket-id $sid1 hw-addr $mac1 slave
3set interface ip address memif$sid1/$mid1 $tnl_local_ip/24
4set interface state memif$sid1/$mid1 up
5
6create memif socket id 2 filename $socket2
7create interface memif id $mid2 socket-id $sid2 hw-addr $mac2 slave
8set interface ip address memif$sid2/$mid2 $remote_ip/24
9set interface state memif$sid2/$mid2 up
10
11set ip arp memif$sid2/$mid2 $tg_if2_ip4 $tg_if2_mac static
12set ip arp memif$sid1/$mid1 $tnl_remote_ip $tnl_remote_mac static
13ip route add $raddr_ip4/8 via $tg_if2_ip4 memif$sid2/$mid2
14