ip route 0.0.0.0 0.0.0.0 pppoe 1 access-list 1 permit any access-list 111 permit udp any host 192.168.0.2 eq domain access-list 111 permit tcp any host 192.168.0.3 eq www access-list 111 permit tcp any host 192.168.0.3 eq pop3 access-list 111 permit tcp any host 192.168.0.3 eq smtp access-list 111 permit icmp any host 192.168.0.2 access-list 111 permit icmp any host 192.168.0.3 access-list 111 deny ip any any access-list 121 dynamic permit ip 192.168.0.0 0.0.0.255 any interface pppoe 1 ip address 192.0.2.1 ip access-group 111 in ip access-group 121 out ip nat inside source list 1 interface ip nat inside destination static 192.0.2.1 53 53 192.168.0.2 53 ip nat inside destination static 192.0.2.1 25 25 192.168.0.3 25 ip nat inside destination static 192.0.2.1 110 110 192.168.0.3 110 ip nat inside destination static 192.0.2.1 80 80 192.168.0.3 80 pppoe server internet pppoe account ********@***.***.ne.jp ****** pppoe type host exit ! interface lan 1 ip address 192.168.0.1 255.255.255.0 exit end
設定内容 | 画面表示例 |
---|---|
特権ユーザモードへの移行 パスワードの入力 設定情報の初期化 設定モードの変更 設定入力 設定保存 装置再起動 |
Router>enable Enter password: Router# Router#clear working.cfg Router# Router#configure terminal Router(config)#ip route 0.0.0.0 0.0.0.0 pppoe 1 Router(config)#access-list 1 permit any Router(config)#access-list 111 permit udp any host 192.168.0.2 eq domain Router(config)#access-list 111 permit tcp any host 192.168.0.3 eq www Router(config)#access-list 111 permit tcp any host 192.168.0.3 eq pop3 Router(config)#access-list 111 permit tcp any host 192.168.0.3 eq smtp Router(config)#access-list 111 permit icmp any host 192.168.0.2 Router(config)#access-list 111 permit icmp any host 192.168.0.3 Router(config)#access-list 111 deny ip any any Router(config)#access-list 121 dynamic permit ip 192.168.0.0 0.0.0.255 any Router(config)#interface pppoe 1 Router(config-if pppoe 1)# ip address 192.0.2.1 Router(config-if pppoe 1)# ip access-group 111 in Router(config-if pppoe 1)# ip access-group 121 out Router(config-if pppoe 1)# ip nat inside source list 1 interface Router(config-if pppoe 1)# ip nat inside destination static 192.0.2.1 53 53 192.168.0.2 53 Router(config-if pppoe 1)# ip nat inside destination static 192.0.2.1 25 25 192.168.0.3 25 Router(config-if pppoe 1)# ip nat inside destination static 192.0.2.1 110 110 192.168.0.3 110 Router(config-if pppoe 1)# ip nat inside destination static 192.0.2.1 80 80 192.168.0.3 80 Router(config-if pppoe 1)# pppoe server internet Router(config-if pppoe 1)# pppoe account ********@***.***.ne.jp ****** Router(config-if pppoe 1)# pppoe type host Router(config-if pppoe 1)#exit Router(config)#interface lan 1 Router(config-if lan 1)# ip address 192.168.0.1 255.255.255.0 Router(config-if lan 1)#exit Router(config)# Router(config)#end Router# Router#save SIDE-A % saving working-config % finished saving Router#reset Going to reset with SIDE-A.frm and SIDE-A.cfg. Boot-back not scheduled for next boot. Next rebooting firmware SIDE-A.frm is fine. Are you OK to cold start?(y/n)y |
アクセスリストを確認します。
確認内容 | 画面表示例 |
---|---|
アクセスリスト情報を表示 設定が正しいことを確認 設定が正しいことを確認 設定が正しいことを確認 |
Router#show access-lists Standard IP access list 1 permit any Extended IP access list 111 permit udp any host 192.168.0.2 eq domain permit tcp any host 192.168.0.3 eq www permit tcp any host 192.168.0.3 eq pop3 permit tcp any host 192.168.0.3 eq smtp permit icmp any host 192.168.0.2 permit icmp any host 192.168.0.3 deny ip any any Extended IP access list 121 dynamic permit ip 192.168.0.0 0.0.0.255 any |
中継パケットを確認します。
設定内容 | 画面表示例 |
---|---|
access-list コマンドのlog を設定する |
access-list 111 permit tcp any host 192.168.0.3 eq smtp log access-list 121 dynamic permit ip 192.168.0.0 0.0.0.255 any log |
※:access-listコマンドの設定は追加形式であるため、現在設定されているアクセスリスト番号に適用する場合は、設定を一度削除して再度設定し直して下さい。
access-listのlog オプションを使用する場合は、中継性能が下がります。一時的なパケット確認にご使用して下さい。
パケットlogを確認します。
確認内容 | 画面表示例 |
---|---|
パケットlog を表示 アクセスリストの121番に適用したパケット情報 アクセスリストの111番に適用したパケット情報 |
Router> show flog 000 0000:00:00.00 2011/09/05 (mon) 17:50:41 0 00000000 4e1bff00 #BOOT[V02.10(04)-082211] SIDE-A.frm SIDE-B.cfg 001 0000:00:44.83 2011/09/05 (mon) 17:51:25 15 00000000 00000000 121 P PPPoE1 out TCP 192.168.0.3:3930 198.51.100.2:21 002 0000:01:28.28 2011/09/05 (mon) 17:52:09 15 00000000 00000000 111 P PPPoE1 in TCP 198.51.100.1:49339 192.168.0.3:25 003 0000:01:28.28 2011/09/05 (mon) 17:52:09 15 00000000 00000000 121 P PPPoE1 out TCP 192.168.0.3:25 198.51.100.1:49339 004 0000:01:28.28 2011/09/05 (mon) 17:52:09 15 00000000 00000000 111 P PPPoE1 in TCP 198.51.100.1:49339 192.168.0.3:25 005 0000:01:28.45 2011/09/05 (mon) 17:52:09 15 00000000 00000000 111 P PPPoE1 in TCP 198.51.100.1:49339 192.168.0.3:25 006 0000:01:32.08 2011/09/05 (mon) 17:52:13 15 00000000 00000000 111 P PPPoE1 in TCP 198.51.100.1:49339 192.168.0.3:25 |
設定内容 | 画面表示例 |
---|---|
access-list コマンドのcount を設定する | access-list 111 permit tcp any host 192.168.0.3 eq smtp log count |
※:access-listコマンドの設定は追加形式であるため、現在設定されているアクセスリスト番号に適用する場合は、設定を一度削除して再度設定し直して下さい。
"log"と"count"は同時に設定することもできます。
カウント情報を確認します。
確認内容 | 画面表示例 |
---|---|
カウント情報を表示 pppoe1 のアクセスリスト111 番のカウントを表示 |
Router>show access-lists statistics Interface number frames bytes pppoe 1 111 4 173 Router> |
確認内容 | 画面表示例 |
---|---|
学習フィルタリングテーブルを表示 最大セッション数 セッション数 |
Router#show ip stateful-packet Session summary (equipment total): Max sessions: 2048 Active sessions: 2 PPPoE1 Source Address Port Dest Address Port Id Seq Prot Age --------------------+-----------------+------+----+----- 192.168.0.3 1731 198.51.100.1 20 tcp 53 192.168.0.3 1729 198.51.100.1 21 tcp 54 |