
はじめに設定前の内容を確認します。各 I/F (Interface) の IP address と status は "show ip interface brief" で確認できます。
初期状態では IP address は未設定 (unassigned) となっています。
また、ルータの I/F の Status は初期状態が administratively down となっており、shutdown されています。
RT1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES TFTP administratively down down
Ethernet0/1 unassigned YES TFTP administratively down down
Ethernet0/2 unassigned YES TFTP administratively down down
Ethernet0/3 unassigned YES TFTP administratively down down
RT2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES TFTP administratively down down
Ethernet0/1 unassigned YES TFTP administratively down down
Ethernet0/2 unassigned YES TFTP administratively down down
Ethernet0/3 unassigned YES TFTP administratively down down
また、各機器の Routing table を "show ip route" で確認します。この時点では IP address が未設定のため、経路情報は何も登録されていません。
RT1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
RT2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
Cisco IOS-XE では以下の構文で IP address を設定できます。
(config-if)#ip address [IP address] [subnet mask]
今回は構成図に従い、各機器に以下の値を設定します。

実際の設定内容は以下の通りです。
IP address の設定と合わせて、"no shutdown" を設定することで I/F を開放しておきます。
RT1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT1(config)#interface ethernet0/0
RT1(config-if)#ip address 10.1.1.1 255.255.255.0
RT1(config-if)#no shutdown
RT1(config-if)#end
RT2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT2(config)#interface ethernet0/0
RT2(config-if)#ip address 10.1.1.2 255.255.255.0
RT2(config-if)#no shutdown
RT2(config-if)#end
設定が完了したため "show running-config" を実行します。
すると、設定内容が running-config に反映されていることがわかります。
また、"show running-config" は次のようにオプションを指定することで、指定した箇所のみの running-config を確認することも可能です。
設定変更箇所のみを確認する際はこのように対象を指定したほうが便利です。(何が指定できるかは ? コマンドで都度確認してみてください。)
出力を確認すると、設定内容が反映されていることがわかります。
※ "no shutdown" を設定したことで "shutdown" が running-config から消えています。
RT1#show run interface ethernet0/0
Building configuration...
Current configuration : 64 bytes
!
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
end
RT2#show run interface ethernet0/0
Building configuration...
Current configuration : 64 bytes
!
interface Ethernet0/0
ip address 10.1.1.2 255.255.255.0
end
次に "show ip interface brief" を再度実行します。
すると設定通りに表記が変更となっていることがわかります。
RT1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 10.1.1.1 YES manual up up
Ethernet0/1 unassigned YES TFTP administratively down down
Ethernet0/2 unassigned YES TFTP administratively down down
Ethernet0/3 unassigned YES TFTP administratively down down
RT2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 10.1.1.2 YES manual up up
Ethernet0/1 unassigned YES TFTP administratively down down
Ethernet0/2 unassigned YES TFTP administratively down down
Ethernet0/3 unassigned YES TFTP administratively down down
また、"show ip interface brief" ではサブネットは確認できないため、詳細な情報を確認したい場合は "show ip interface" command を実行します。
オプションとして対象の I/F を指定することで、その I/F の情報のみを表示できます。
RT1#show ip interface ethernet0/0
Ethernet0/0 is up, line protocol is up
Internet address is 10.1.1.1/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Outgoing Common access list is not set
Outgoing access list is not set
Inbound Common access list is not set
Inbound access list is not set
Proxy ARP is enabled
Local Proxy ARP is disabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP Flow switching is disabled
IP CEF switching is enabled
IP CEF switching turbo vector
IP Null turbo vector
Associated unicast routing topologies:
Topology "base", operation state is UP
IP multicast fast switching is enabled
IP multicast distributed fast switching is disabled
IP route-cache flags are Fast, CEF
Router Discovery is disabled
IP output packet accounting is disabled
IP access violation accounting is disabled
TCP/IP header compression is disabled
RTP/IP header compression is disabled
Probe proxy name replies are disabled
Policy routing is disabled
Network address translation is disabled
BGP Policy Mapping is disabled
Input features: MCI Check
IPv4 WCCP Redirect outbound is disabled
IPv4 WCCP Redirect inbound is disabled
IPv4 WCCP Redirect exclude is disabled
IP Clear Dont Fragment is disabled
RT2#show ip interface ethernet0/0
Ethernet0/0 is up, line protocol is up
Internet address is 10.1.1.2/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Outgoing Common access list is not set
Outgoing access list is not set
Inbound Common access list is not set
Inbound access list is not set
Proxy ARP is enabled
Local Proxy ARP is disabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP Flow switching is disabled
IP CEF switching is enabled
IP CEF switching turbo vector
IP Null turbo vector
Associated unicast routing topologies:
Topology "base", operation state is UP
IP multicast fast switching is enabled
IP multicast distributed fast switching is disabled
IP route-cache flags are Fast, CEF
Router Discovery is disabled
IP output packet accounting is disabled
IP access violation accounting is disabled
TCP/IP header compression is disabled
RTP/IP header compression is disabled
Probe proxy name replies are disabled
Policy routing is disabled
Network address translation is disabled
BGP Policy Mapping is disabled
Input features: MCI Check
IPv4 WCCP Redirect outbound is disabled
IPv4 WCCP Redirect inbound is disabled
IPv4 WCCP Redirect exclude is disabled
IP Clear Dont Fragment is disabled
続いて "show ip route" を実行します。IP address を持つ I/F が up したことで、その I/F が持つネットワークとアドレスが routing table に登録されていることがわかります。
RT1 を例に説明すると
C (Connected) でネットワーク (/24) が
L (Local) でアドレス (/32) が
登録されています。
RT1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Ethernet0/0
L 10.1.1.1/32 is directly connected, Ethernet0/0
RT2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Ethernet0/0
L 10.1.1.2/32 is directly connected, Ethernet0/0
最後に RT1 (10.1.1.1) と RT2 (10.1.1.2) で疎通確認を行います。
ping を実行すると、"ICMP request" が指定した IP address 宛てに生成されます。
また、送信元 IP address はオプションで指定しない場合、routing table を確認して出力 I/F のアドレスが使用されます。
"ping" command は以下の構文で実行できます。
#ping [宛先 IP address]
今回は RT1 (10.1.1.1) から RT2 (10.1.1.2) に対して ping を実行します。すると、ping 成功を示す "!" が表示され、対象機器間で問題なく通信が成立したことが確認できました。
RT1#ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
※1つ目が "." となり失敗しているのは、初めての通信では ARP の処理が行われるためです。
今回は I/F に対する IP address の設定方法及び確認方法、設定後の疎通確認を紹介しました。
同一ネットワーク間での通信はネットワークの超基礎であるため、ハンズオンを繰り返し一連の流れと TCP/IP の階層モデルに従った通信フローをしっかりと理解しましょう。
また、ハンズオンで理解を深めた後は以下の Workbook で何も見ずに設定/確認できるよう理解度チェックを行ってください。
ハンズオンで理解を深め、Workbook で理解度を確認する
このプロセスを繰り返すことで思考力と設定力と確認力が身に付きます。
ログインすると、進捗を保存できます。
← ロードマップ に戻る