! ! ! 特権ユーザモードに移行します。 ! Router> enable Enter password: Router# ! ! ! 既存(工場出荷)の設定を初期化します。 ! Router#clear working.cfg ! ! ! 基本設定モードに移行します。 ! Router# configure terminal Router(config)#! Router(config)#! Router(config)#hostname Router_A ! ! ! デフォルトルートをIPv4Ether網ゲートウェイIPアドレスに向けます。 ! Router_A(config)#ip route 0.0.0.0 0.0.0.0 198.51.100.254 ! ! ! EWAN 1 インタフェースの設定を行います。 ! Router_A(config)#interface ewan 1 Router_A(config-if ewan 1)# ip address 198.51.100.1 255.255.255.0 Router_A(config-if ewan 1)#exit ! ! ! NATとフィルタリングの設定を行います。 ! Router_A(config)#access-list 1 permit 192.168.0.0 0.0.0.255 Router_A(config)#access-list 110 dynamic permit ip any any Router_A(config)#access-list 190 deny ip any any ! Router_A(config)#interface ewan 1 Router_A(config-if ewan 1)# ip access-group 110 out Router_A(config-if ewan 1)# ip access-group 190 in Router_A(config-if ewan 1)# ip nat inside source list 1 interface Router_A(config-if ewan 1)#exit ! ! ! ProxyDNSとDHCPサーバの設定を行います。 ! Router_A(config)#proxydns mode v4 Router_A(config)#service dhcp-server Router_A(config)#ip dhcp pool lan 1 Router_A(config-dhcp-pool)# dns-server 0.0.0.0 Router_A(config-dhcp-pool)# default-router 0.0.0.0 Router_A(config-dhcp-pool)#exit ! ! ! LAN 1 インタフェースの設定を行います。 ! Router_A(config)#interface lan 1 Router_A(config-if lan 1)# ip address 192.168.0.1 255.255.255.0 Router_A(config-if lan 1)#exit ! ! ! EWAN 1インターフェースにPPPoEパススルーの設定を行います。 ! Router_A(config)#mac access-list 20000 permit any ethertype pppoe-discovery ! PPPoE Discovery Stage EtherType の透過を許可します。 Router_A(config)#mac access-list 20000 permit any ethertype pppoe-session ! PPPoE Session Stage EtherType の透過を許可します。 Router_A(config)#mac access-list 20000 permit any ethertype arp ! ARP EtherType の透過を許可します。 Router_A(config)#mac access-list 20000 permit any ethertype ip ! IP EtherType の透過を許可します。 Router_A(config)#mac access-list 20000 deny any ! 上記以外のEtherTypeは遮断します。 Router_A(config)#interface ewan 1 Router_A(config-if ewan 1)# internal-bridge 1 terminate Router_A(config-if ewan 1)# mac access-group 20000 in Router_A(config-if ewan 1)# mac access-group 20000 out Router_A(config-if ewan 1)#exit ! ! ! VLAN 1インターフェースにPPPoEパススルーの設定を行います。 ! Router_A(config)#mac access-list 20001 permit any ethertype pppoe-discovery ! PPPoE Discovery Stage EtherType の透過を許可します。 Router_A(config)#mac access-list 20001 permit any ethertype pppoe-session ! PPPoE Session Stage EtherType の透過を許可します。 Router_A(config)#mac access-list 20001 deny any ! 上記以外のEtherTypeは遮断します。 ! Router_A(config)#interface vlanif 1 Router_A(config-if vlanif 1)# internal-bridge 1 terminate Router_A(config-if vlanif 1)# bridge-group lan 1 Router_A(config-if vlanif 1)# vlan-id 100 Router_A(config-if vlanif 1)# mac access-group 20001 in Router_A(config-if vlanif 1)# mac access-group 20001 out Router_A(config-if vlanif 1)#exit Router_A(config)#line lan Router_A(config-line lan)# vlan 1 bridge-group 1 Router_A(config-line lan)# vlan 1 port-vlan 100 Router_A(config-line lan)#exit ! ! 特権ユーザモードに戻ります。 ! Router_A(config)# end ! ! ! 設定を保存します。 ! Router_A# save SIDE-A.cfg % saving working-config % finished saving Router_A# ! ! ! 設定を有効にするために再起動します。 ! Router_A# reset Are you OK to cold start?(y/n) y
Router_Aのブリッジ状態の確認します。
確認内容 | 画面表示例 |
---|---|
ブリッジ状態を表示 |
Router_A>show port-membership [internal-bridge 1] address-learning: disable Tx VID interface |
ewan1とvlanif1が同じインターナルブリッジであることを確認 |
* 0 ewan 1 * 0 vlanif 1 |
Router_AのPPPoEの接続状況を確認します。
確認内容 | 画面表示例 |
---|---|
PPPoEの接続状況を表示 |
Router_A>show ip interface ewan 1 EWAN1 is up IPv4 is enabled |
アドレスが有効であることを確認 |
IP address is 198.51.100.1, subnet mask is 255.255.255.0 Broadcast address is 198.51.100.255 MTU is 1454 bytes Proxy ARP is disabled ICMP redirects are always sent ICMP unreachables are always sent ICMP mask-replies are always sent Directed broadcast forwarding is disabled IEEE802.1p priority value of ARP is 0 |
Router_Aのルーティング情報を確認します。
確認内容 | 画面表示例 |
---|---|
ルーティング情報を表示 |
Router_A>show ip route Max entry: 10000 (Commonness in IPv4 and IPv6) Active entry:4 (IPv4), 2 (IPv6) Peak:4 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF B - BGP, I - IKE, U - SA-UP, D - REDUNDANCY, E - EventAction A - AutoConfig, > - selected route, * - FIB route, p - stale info. |
* 印があることを確認 * 印があることを確認 |
S> * 0.0.0.0/0 [1/0] via 198.51.100.254, EWAN1 C> * 127.0.0.0/8 is directly connected, LOOP0 C> * 192.168.0.0/24 is directly connected, LAN C> * 198.51.100.0/24 is directly connected, EWAN1 |
Router_AのLANインターフェースからIPv4Ether網ゲートウェイIPアドレス宛にping通信を実施
確認内容 | 画面表示例 |
---|---|
ping を実行する ping 応答あり |
Router_A#ping 198.51.100.254 source-interface lan 1 Sending 5, 100-byte ICMP Echos to 198.51.100.254, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 0/10/50 ms |