[index] AT-AR3050S/AT-AR4050S/AT-AR4050S-5G コマンドリファレンス 5.5.4
接続用ユーザー名 | user@ispA | user@ispC |
接続用パスワード | isppasswdA | isppasswdC |
PPPoEサービス名 | 指定なし | 指定なし |
WAN側IPアドレス | 10.0.0.1 | 10.0.0.2 |
接続用ユーザー名 | user@ispB | |
接続用パスワード | isppasswdB | |
PPPoEサービス名 | 指定なし | 指定なし |
WAN側IPアドレス | 10.1.0.1 | 動的割り当て(DHCP) |
WAN側物理インターフェース(1) | eth1 | eth1 |
WAN側物理インターフェース(2) | eth2 | wwan0 |
WAN側IPアドレス(1) | 10.0.0.1/32 (ppp0) | 10.0.0.2/32 (ppp0) |
WAN側IPアドレス(2) | 10.1.0.1/32 (ppp1) | 動的割り当て (wwan0) |
LAN側IPアドレス(1) | 192.168.10.1/24 (vlan10) | 192.168.11.1/24 (vlan11) |
LAN側IPアドレス(2) | 192.168.20.1/24 (vlan20) | 192.168.21.1/24 (vlan21) |
IPsecトンネルIPアドレス(1) | 172.16.0.1/30 (tunnel0) | 172.16.0.2/30 (tunnel0) |
IPsecトンネルIPアドレス(2) | 172.16.0.5/30 (tunnel1) | 172.16.0.6/30 (tunnel1) |
no spanning-tree rstp enable
interface eth1 encapsulation ppp 0
interface eth2 encapsulation ppp 1
interface ppp0 ppp ipcp dns request keepalive ppp username user@ispA ppp password isppasswdA ip address 10.0.0.1/32 ip tcp adjust-mss pmtu
interface ppp1 ppp ipcp dns request keepalive ppp username user@ispB ppp password isppasswdB ip address 10.1.0.1/32 ip tcp adjust-mss pmtu
vlan database vlan 10,20 state enable
interface port1.0.1 switchport access vlan 10
interface port1.0.2 switchport access vlan 20
interface vlan10 ip address 192.168.10.1/24
interface vlan20 ip address 192.168.20.1/24
zone private network lan ip subnet 192.168.10.0/24 ip subnet 192.168.20.0/24 network peer ip subnet 192.168.11.0/24 ip subnet 192.168.21.0/24 network tunnel ip subnet 172.16.0.0/30 ip subnet 172.16.0.4/30
zone public network wan ip subnet 0.0.0.0/0 interface ppp0 ip subnet 0.0.0.0/0 interface ppp1 host ppp0 ip address 10.0.0.1 host ppp1 ip address 10.1.0.1
application esp protocol 50
application isakmp protocol udp dport 500
application nat-t protocol udp dport 4500
firewall rule 10 permit any from private to private no-state-enforcement rule 20 permit any from private to public rule 30 permit any from public.wan.ppp0 to public rule 40 permit any from public.wan.ppp1 to public rule 50 permit isakmp from public.wan to public.wan.ppp0 rule 60 permit isakmp from public.wan to public.wan.ppp1 rule 70 permit esp from public.wan to public.wan.ppp0 rule 80 permit esp from public.wan to public.wan.ppp1 rule 90 permit nat-t from public.wan to public.wan.ppp1 protect
nat rule 10 masq any from private to public enable
crypto isakmp key secret1 address 10.0.0.2 crypto isakmp key secret2 hostname RouterB
interface tunnel0 mtu 1300 tunnel source ppp0 tunnel destination 10.0.0.2 tunnel protection ipsec tunnel mode ipsec ipv4 ip address 172.16.0.1/30 ip tcp adjust-mss 1260
interface tunnel1 mtu 1300 tunnel source ppp1 tunnel destination dynamic tunnel remote name RouterB tunnel protection ipsec tunnel mode ipsec ipv4 ip address 172.16.0.5/30 ip tcp adjust-mss 1260
ping-poll 1 ip 172.16.0.2 source-ip 172.16.0.1 normal-interval 10 up-count 5 sample-size 10 active
trigger 1 type ping-poll 1 down script 1 tunnel0_down_01.scp trigger 2 type ping-poll 1 up script 1 tunnel0_up_01.scp
ip route 0.0.0.0/0 ppp0 ip route 10.0.0.2/32 ppp0 ip route 192.168.11.0/24 tunnel0 ip route 192.168.11.0/24 null 254 ip route 192.168.21.0/24 tunnel0 ip route 192.168.21.0/24 null 254
ip dns forwarding
end
no spanning-tree rstp enable
interface eth1 encapsulation ppp 0
interface ppp0 keepalive ppp username user@ispC ppp password isppasswdC ip address 10.0.0.2/32 ip tcp adjust-mss pmtu
apn spmode name spmode.ne.jp carrier docomo
sim enable sim1
interface wwan0 ip dhcp-client default-route distance 100 apn sim1 spmode
vlan database vlan 11,21 state enable
interface port1.0.1 switchport access vlan 11
interface port1.0.2 switchport access vlan 21
interface vlan11 ip address 192.168.11.1/24
interface vlan21 ip address 192.168.21.1/24
zone private network lan ip subnet 192.168.11.0/24 ip subnet 192.168.21.0/24 network peer ip subnet 192.168.10.0/24 ip subnet 192.168.20.0/24 network tunnel ip subnet 172.16.0.0/30 ip subnet 172.16.0.4/30 ip subnet 0.0.0.0/0 interface tunnel0 ip subnet 0.0.0.0/0 interface tunnel1
zone public network wan ip subnet 0.0.0.0/0 interface wwan0 ip subnet 0.0.0.0/0 interface ppp0 host ppp0 ip address 10.0.0.2 host wwan0 ip address dynamic interface wwan0
application esp protocol 50
application isakmp protocol udp dport 500
dpi provider procera counters detailed learning enable
firewall rule 10 permit any from private to private no-state-enforcement rule 20 permit any from private to public rule 30 permit any from public.wan.ppp0 to public.wan rule 40 permit any from public.wan.wwan0 to public.wan rule 50 permit isakmp from public.wan to public.wan.ppp0 rule 60 permit isakmp from public.wan to public.wan.wwan0 rule 70 permit esp from public.wan to public.wan.ppp0 rule 80 permit esp from public.wan to public.wan.wwan0 protect
nat rule 10 masq any from private to public rule 20 masq dns from private to private.tunnel rule 30 masq office from private to private.tunnel rule 40 masq micrsoft from private to private.tunnel enable
crypto isakmp key secret1 address 10.0.0.1 crypto isakmp key secret2 address 10.1.0.1
linkmon probe name PROBE1 type icmp-ping destination 172.16.0.1 egress interface tunnel0 source 172.16.0.2 interval 1000 enable
linkmon probe name PROBE2 type icmp-ping destination 172.16.0.5 egress interface tunnel1 source 172.16.0.6 interval 1000 enable
linkmon group tunnelgroup member 10 destination 172.16.0.1 probe PROBE1 member 20 destination 172.16.0.5 probe PROBE2 load-balancing
linkmon profile tunnelquality consecutive-probe-loss bad-when 5 consecutive-probe-loss good-when 2 consecutive-probe-loss unreachable-when 15
policy-based-routing application-decision once-only ip policy-route 10 match office to private.tunnel nexthop ppp0 wwan0 ip policy-route 20 match micrsoft to private.tunnel nexthop ppp0 wwan0 ip policy-route 30 match dns to private.tunnel nexthop ppp0 wwan0 ip policy-route 40 match http from private.lan to private.tunnel linkmon-group tunnelgroup linkmon-profile tunnelquality ip policy-route 50 match https from private.lan to private.tunnel linkmon-group tunnelgroup linkmon-profile tunnelquality policy-based-routing enable
interface tunnel0 mtu 1300 tunnel source ppp0 tunnel destination 10.0.0.1 tunnel protection ipsec tunnel inline-processing tunnel mode ipsec ipv4 ip address 172.16.0.2/30 ip tcp adjust-mss 1260
interface tunnel1 mtu 1300 tunnel source wwan0 tunnel destination 10.1.0.1 tunnel local name RouterB tunnel protection ipsec tunnel inline-processing tunnel mode ipsec ipv4 ip address 172.16.0.6/30 ip tcp adjust-mss 1260
ip name-server preferred-order static ip name-server 8.8.8.8 ip name-server 8.8.4.4
ip dhcp pool pool11 network 192.168.11.0 255.255.255.0 range 192.168.11.201 192.168.11.250 dns-server 192.168.11.1 default-router 192.168.11.1 lease 0 2 0 subnet-mask 255.255.255.0
ip dhcp pool pool21 network 192.168.21.0 255.255.255.0 range 192.168.21.201 192.168.21.250 dns-server 192.168.21.1 default-router 192.168.21.1 lease 0 2 0 subnet-mask 255.255.255.0
service dhcp-server
ping-poll 1 ip 172.16.0.1 source-ip 172.16.0.2 normal-interval 10 up-count 5 sample-size 10 active
trigger 1 type ping-poll 1 down script 1 tunnel0_down_01.scp trigger 2 type ping-poll 1 up script 1 tunnel0_up_01.scp
ip route 0.0.0.0/0 tunnel0 ip route 0.0.0.0/0 null 254 ip route 10.0.0.1/32 ppp0 ip route 10.1.0.1/32 wwan0
ip dns forwarding
end
copy running-config startup-config
」の書式で実行します。awplus# copy running-config startup-config ↓ Building configuration... [OK]
awplus# write memory ↓ Building configuration... [OK]
awplus(config)# log buffered level informational facility local5 ↓
awplus# show log | include Firewall ↓
! no spanning-tree rstp enable ! interface eth1 encapsulation ppp 0 ! interface eth2 encapsulation ppp 1 ! interface ppp0 ppp ipcp dns request keepalive ppp username user@ispA ppp password isppasswdA ip address 10.0.0.1/32 ip tcp adjust-mss pmtu ! interface ppp1 ppp ipcp dns request keepalive ppp username user@ispB ppp password isppasswdB ip address 10.1.0.1/32 ip tcp adjust-mss pmtu ! vlan database vlan 10,20 state enable ! interface port1.0.1 switchport access vlan 10 ! interface port1.0.2 switchport access vlan 20 ! interface vlan10 ip address 192.168.10.1/24 ! interface vlan20 ip address 192.168.20.1/24 ! zone private network lan ip subnet 192.168.10.0/24 ip subnet 192.168.20.0/24 network peer ip subnet 192.168.11.0/24 ip subnet 192.168.21.0/24 network tunnel ip subnet 172.16.0.0/30 ip subnet 172.16.0.4/30 ! zone public network wan ip subnet 0.0.0.0/0 interface ppp0 ip subnet 0.0.0.0/0 interface ppp1 host ppp0 ip address 10.0.0.1 host ppp1 ip address 10.1.0.1 ! application esp protocol 50 ! application isakmp protocol udp dport 500 ! application nat-t protocol udp dport 4500 ! firewall rule 10 permit any from private to private no-state-enforcement rule 20 permit any from private to public rule 30 permit any from public.wan.ppp0 to public rule 40 permit any from public.wan.ppp1 to public rule 50 permit isakmp from public.wan to public.wan.ppp0 rule 60 permit isakmp from public.wan to public.wan.ppp1 rule 70 permit esp from public.wan to public.wan.ppp0 rule 80 permit esp from public.wan to public.wan.ppp1 rule 90 permit nat-t from public.wan to public.wan.ppp1 protect ! nat rule 10 masq any from private to public enable ! crypto isakmp key secret1 address 10.0.0.2 crypto isakmp key secret2 hostname RouterB ! interface tunnel0 mtu 1300 tunnel source ppp0 tunnel destination 10.0.0.2 tunnel protection ipsec tunnel mode ipsec ipv4 ip address 172.16.0.1/30 ip tcp adjust-mss 1260 ! interface tunnel1 mtu 1300 tunnel source ppp1 tunnel destination dynamic tunnel remote name RouterB tunnel protection ipsec tunnel mode ipsec ipv4 ip address 172.16.0.5/30 ip tcp adjust-mss 1260 ! ping-poll 1 ip 172.16.0.2 source-ip 172.16.0.1 normal-interval 10 up-count 5 sample-size 10 active ! trigger 1 type ping-poll 1 down script 1 tunnel0_down_01.scp trigger 2 type ping-poll 1 up script 1 tunnel0_up_01.scp ! ip route 0.0.0.0/0 ppp0 ip route 10.0.0.2/32 ppp0 ip route 192.168.11.0/24 tunnel0 ip route 192.168.11.0/24 null 254 ip route 192.168.21.0/24 tunnel0 ip route 192.168.21.0/24 null 254 ! ip dns forwarding ! end
! no spanning-tree rstp enable ! interface eth1 encapsulation ppp 0 ! interface ppp0 keepalive ppp username user@ispC ppp password isppasswdC ip address 10.0.0.2/32 ip tcp adjust-mss pmtu ! apn spmode name spmode.ne.jp carrier docomo ! sim enable sim1 ! interface wwan0 ip dhcp-client default-route distance 100 apn sim1 spmode ! vlan database vlan 11,21 state enable ! interface port1.0.1 switchport access vlan 11 ! interface port1.0.2 switchport access vlan 21 ! interface vlan11 ip address 192.168.11.1/24 ! interface vlan21 ip address 192.168.21.1/24 ! zone private network lan ip subnet 192.168.11.0/24 ip subnet 192.168.21.0/24 network peer ip subnet 192.168.10.0/24 ip subnet 192.168.20.0/24 network tunnel ip subnet 172.16.0.0/30 ip subnet 172.16.0.4/30 ip subnet 0.0.0.0/0 interface tunnel0 ip subnet 0.0.0.0/0 interface tunnel1 ! zone public network wan ip subnet 0.0.0.0/0 interface wwan0 ip subnet 0.0.0.0/0 interface ppp0 host ppp0 ip address 10.0.0.2 host wwan0 ip address dynamic interface wwan0 ! application esp protocol 50 ! application isakmp protocol udp dport 500 ! dpi provider procera counters detailed learning enable ! firewall rule 10 permit any from private to private no-state-enforcement rule 20 permit any from private to public rule 30 permit any from public.wan.ppp0 to public.wan rule 40 permit any from public.wan.wwan0 to public.wan rule 50 permit isakmp from public.wan to public.wan.ppp0 rule 60 permit isakmp from public.wan to public.wan.wwan0 rule 70 permit esp from public.wan to public.wan.ppp0 rule 80 permit esp from public.wan to public.wan.wwan0 protect ! nat rule 10 masq any from private to public rule 20 masq dns from private to private.tunnel rule 30 masq office from private to private.tunnel rule 40 masq micrsoft from private to private.tunnel enable ! crypto isakmp key secret1 address 10.0.0.1 crypto isakmp key secret2 address 10.1.0.1 ! linkmon probe name PROBE1 type icmp-ping destination 172.16.0.1 egress interface tunnel0 source 172.16.0.2 interval 1000 enable ! linkmon probe name PROBE2 type icmp-ping destination 172.16.0.5 egress interface tunnel1 source 172.16.0.6 interval 1000 enable ! linkmon group tunnelgroup member 10 destination 172.16.0.1 probe PROBE1 member 20 destination 172.16.0.5 probe PROBE2 load-balancing ! linkmon profile tunnelquality consecutive-probe-loss bad-when 5 consecutive-probe-loss good-when 2 consecutive-probe-loss unreachable-when 15 ! policy-based-routing application-decision once-only ip policy-route 10 match office to private.tunnel nexthop ppp0 wwan0 ip policy-route 20 match micrsoft to private.tunnel nexthop ppp0 wwan0 ip policy-route 30 match dns to private.tunnel nexthop ppp0 wwan0 ip policy-route 40 match http from private.lan to private.tunnel linkmon-group tunnelgroup linkmon-profile tunnelquality ip policy-route 50 match https from private.lan to private.tunnel linkmon-group tunnelgroup linkmon-profile tunnelquality policy-based-routing enable ! interface tunnel0 mtu 1300 tunnel source ppp0 tunnel destination 10.0.0.1 tunnel protection ipsec tunnel inline-processing tunnel mode ipsec ipv4 ip address 172.16.0.2/30 ip tcp adjust-mss 1260 ! interface tunnel1 mtu 1300 tunnel source wwan0 tunnel destination 10.1.0.1 tunnel local name RouterB tunnel protection ipsec tunnel inline-processing tunnel mode ipsec ipv4 ip address 172.16.0.6/30 ip tcp adjust-mss 1260 ! ip name-server preferred-order static ip name-server 8.8.8.8 ip name-server 8.8.4.4 ! ip dhcp pool pool11 network 192.168.11.0 255.255.255.0 range 192.168.11.201 192.168.11.250 dns-server 192.168.11.1 default-router 192.168.11.1 lease 0 2 0 subnet-mask 255.255.255.0 ! ip dhcp pool pool21 network 192.168.21.0 255.255.255.0 range 192.168.21.201 192.168.21.250 dns-server 192.168.21.1 default-router 192.168.21.1 lease 0 2 0 subnet-mask 255.255.255.0 ! service dhcp-server ! ping-poll 1 ip 172.16.0.1 source-ip 172.16.0.2 normal-interval 10 up-count 5 sample-size 10 active ! trigger 1 type ping-poll 1 down script 1 tunnel0_down_01.scp trigger 2 type ping-poll 1 up script 1 tunnel0_up_01.scp ! ip route 0.0.0.0/0 tunnel0 ip route 0.0.0.0/0 null 254 ip route 10.0.0.1/32 ppp0 ip route 10.1.0.1/32 wwan0 ! ip dns forwarding ! end
enable configure terminal no ip route 0.0.0.0/0 ppp0 no ip route 192.168.11.0/24 tunnel0 no ip route 192.168.21.0/24 tunnel0 ip route 0.0.0.0/0 ppp1 ip route 192.168.11.0/24 tunnel1 ip route 192.168.21.0/24 tunnel1 end
enable configure terminal no ip route 0.0.0.0/0 ppp1 no ip route 192.168.11.0/24 tunnel1 no ip route 192.168.21.0/24 tunnel1 ip route 0.0.0.0/0 ppp0 ip route 192.168.11.0/24 tunnel0 ip route 192.168.21.0/24 tunnel0 end
enable configure terminal no ip route 0.0.0.0/0 tunnel0 ip route 0.0.0.0/0 tunnel1 end
enable configure terminal no ip route 0.0.0.0/0 tunnel1 ip route 0.0.0.0/0 tunnel0 end
(C) 2015 - 2024 アライドテレシスホールディングス株式会社
PN: 613-002107 Rev.BD