はじめに
この記事は、私が主催している『CCNA頑張ろうの会』のパケトレを使ったオリジナル問題を解説するための記事になります。ファイルはリンクからダウンロード出来ますので、
チャレンジしてみてください。
問題
RT1のGi0/0とRT2のGi0/0に以下の条件を満たすアドレスを割り振り、PC-AからPC-Bにpingを成功させてください。ただし、他に必要な設定はすでに完了できているものとする。
条件
範囲
10.0.0.64/26
RT1はホストに割り振れる最小のアドレスを使用する
RT2はホストに割り振れる最大のアドレスを使用する
設定が完了したらstartup-configにrunning-configにコピーすること。
解説
解き方の手順
① 10.0.0.64/26をサブネット表記を求める
② 上記のネットワークが取りうるホストのアドレス範囲を求める
③ 1番小さいホストアドレスと1番大きいアドレスを求める
④ 各インターフェイスに求めたアドレスをそれぞれ適用する
⑤ pingする
① 第3オクテットと第4オクテットの境目が/24なので、/26は第4オクテットの8ビット目と7ビット目に1が入りその合計値は192になる。よってサブネットは255.255.255.192になる
② アドレス範囲は
ネットワークアドレス+ホスト部が全部0の時
~
ネットワークアドレス+ホスト部の値が全部1の時
よって10.0.0.64/26の場合は
10.0.0.64
~
10.0.0.127
となる。ただし、ブロードキャストアドレスとネットワークアドレスはホストに割り振れないため、ホストに割り振れるアドレス範囲は
10.0.0.65
~
10.0.0.126 となる。
③ ②よりRT1のGi0/0には
10.0.0.65
RT2のGi0/0には
10.0.0.127を適用する。
RT1>en
RT1#conf t
RT1(config)interface gigabitethernet 0/0
RT1(config-if)ip address 10.0.0.65 255.255.255.192
RT1(config-if)no shutdown
RT1(config-if)end
RT1#copy running-config startup-config
RT2>en
RT2#conf t
RT2(config)interface gigabitethernet 0/0
RT2(config-if)ip address 10.0.0.126 255.255.255.192
RT2(config-if)no shutdown
RT2(config-if)end
RT2#copy running-config startup-config
⑤ PC-Aをクリックしデスクトップタブからコマンドプロンプトを選択し以下のコマンドを入力
ping 192.168.10.1
各RTのRunning-config
RT1
Building configuration...
Current configuration : 681 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname RT1
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX15249DW7-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 10.0.0.65 255.255.255.192
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.1.254 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 192.168.10.0 255.255.255.0 10.0.0.126
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
RT2
Building configuration...
Current configuration : 681 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname RT2
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX15245JVO-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 10.0.0.126 255.255.255.192
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.10.254 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 192.168.1.0 255.255.255.0 10.0.0.65
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end