## CentreCOM AR550S 設定例集 2.9
##  148 QoS基本設定例（PPPoEインターネット接続環境における2点間IPsec VPN、両側アドレス固定）
##  ルーターAのコンフィグ
##
## 「#」で始まる行は、コンソールから入力しないと意味を持たないコマンドです。

ADD USER=secoff PASSWORD=PasswordS PRIVILEGE=SECURITYOFFICER
CREATE PPP=0 OVER=eth0-ANY
SET PPP=0 OVER=eth0-ANY USER=user@ispA PASSWORD=isppasswdA LQR=OFF BAP=OFF ECHO=ON
ENABLE IP
ADD IP INT=vlan1 IP=192.168.10.1 MASK=255.255.255.0
ADD IP INT=ppp0 IP=10.100.10.1 MASK=255.255.255.255
ADD IP ROUTE=0.0.0.0 INT=ppp0 NEXTHOP=0.0.0.0
ENABLE FIREWALL
CREATE FIREWALL POLICY=net
ENABLE FIREWALL POLICY=net ICMP_F=PING,UNREACHABLE
DISABLE FIREWALL POLICY=net IDENTPROXY
ADD FIREWALL POLICY=net INT=vlan1 TYPE=PRIVATE
ADD FIREWALL POLICY=net INT=ppp0 TYPE=PUBLIC
ADD FIREWALL POLICY=net NAT=ENHANCED INT=vlan1 GBLINT=ppp0
ADD FIREWALL POLICY=net RULE=1 AC=ALLOW INT=ppp0 PROT=UDP PORT=500 IP=10.100.10.1 GBLIP=10.100.10.1 GBLPORT=500
ADD FIREWALL POLICY=net RULE=2 AC=NONAT INT=vlan1 PROT=ALL IP=192.168.10.1-192.168.10.254
SET FIREWALL POLICY=net RULE=2 REMOTEIP=192.168.20.1-192.168.20.254
ADD FIREWALL POLICY=net RULE=3 AC=NONAT INT=ppp0 PROT=ALL IP=192.168.10.1-192.168.10.254 ENCAP=IPSEC
# CREATE ENCO KEY=1 TYPE=GENERAL VALUE="secret"
CREATE ISAKMP POLICY="i" PEER=10.100.20.1 KEY=1 SENDN=TRUE HEARTBEATMODE=BOTH
CREATE IPSEC SASPEC=1 KEYMAN=ISAKMP PROTOCOL=ESP ENCALG=DES HASHALG=SHA
CREATE IPSEC BUNDLE=1 KEYMAN=ISAKMP STRING="1"
CREATE IPSEC POLICY="isa" INT=ppp0 ACTION=PERMIT LPORT=500 RPORT=500 TRANSPORT=UDP
CREATE IPSEC POLICY="vpn" INT=ppp0 ACTION=IPSEC KEYMAN=ISAKMP BUNDLE=1 PEER=10.100.20.1
SET IPSEC POLICY="vpn" LAD=192.168.10.0 LMA=255.255.255.0 RAD=192.168.20.0 RMA=255.255.255.0
CREATE IPSEC POLICY="inet" INT=ppp0 ACTION=PERMIT
ENABLE IPSEC
ENABLE ISAKMP
ENABLE SQOS
CREATE CLASSIFIER=109 IPPROTOCOL=ICMP
CREATE CLASSIFIER=111 IPPROTOCOL=TCP TCPDPORT=21
CREATE CLASSIFIER=112 IPPROTOCOL=TCP TCPDPORT=20
CREATE CLASSIFIER=113 IPPROTOCOL=TCP TCPDPORT=80
CREATE CLASSIFIER=119 IPPROTOCOL=TCP
CREATE CLASSIFIER=121 IPPROTOCOL=UDP UDPDPORT=161
CREATE CLASSIFIER=129 IPPROTOCOL=UDP
CREATE SQOS TRAFFICCLASS=11 WEIGHT=20
CREATE SQOS TRAFFICCLASS=12 WEIGHT=30 RED=1
CREATE SQOS TRAFFICCLASS=13 WEIGHT=10
CREATE SQOS TRAFFICCLASS=19 WEIGHT=20
CREATE SQOS TRAFFICCLASS=21
CREATE SQOS TRAFFICCLASS=22 VIRTBW=10M
CREATE SQOS TRAFFICCLASS=29 WEIGHT=20
CREATE SQOS TRAFFICCLASS=131 PRIORITY=2 MAXQLEN=100
CREATE SQOS TRAFFICCLASS=132 PRIORITY=1 MAXQLEN=100 QLIMITEXCEED=LOG VIRTBW=10M
CREATE SQOS TRAFFICCLASS=211 WEIGHT=10
CREATE SQOS TRAFFICCLASS=212 WEIGHT=10 MAXQLEN=100 RED=0
CREATE SQOS TRAFFICCLASS=213 WEIGHT=10 MAXQLEN=100 RED=2
CREATE SQOS POLICY=1 DEFAULTTRAFFICCLASS=19
CREATE SQOS POLICY=2 DEFAULTTRAFFICCLASS=29
CREATE SQOS POLICY=3
ADD SQOS POLICY=1 TRAFFICCLASS=11-13
ADD SQOS POLICY=2 TRAFFICCLASS=21-22
ADD SQOS TRAFFICCLASS=13 SUBCLASS=131-132
ADD SQOS TRAFFICCLASS=21 SUBCLASS=211-213
ADD SQOS TRAFFICCLASS=11 CLASSIFIER=109
ADD SQOS TRAFFICCLASS=12 CLASSIFIER=119
ADD SQOS TRAFFICCLASS=131 CLASSIFIER=121
ADD SQOS TRAFFICCLASS=132 CLASSIFIER=129
ADD SQOS TRAFFICCLASS=211 CLASSIFIER=109
ADD SQOS TRAFFICCLASS=212 CLASSIFIER=111-112
ADD SQOS TRAFFICCLASS=213 CLASSIFIER=113
ADD SQOS TRAFFICCLASS=22 CLASSIFIER=129
SET SQOS INTERFACE=ipsec-vpn TUNNELPOLICY=1
SET SQOS INTERFACE=ppp0 OUTPOLICY=2
SET SQOS INTERFACE=eth0 OUTPOLICY=3
# LOGIN secoff
# ENABLE SYSTEM SECURITY_MODE
