現在位置: ホーム / みらくるブログ / GNS3 活用 - Cisco スイッチ VLAN 編 その3 (VLAN間ルーティング)

GNS3 活用 - Cisco スイッチ VLAN 編 その3 (VLAN間ルーティング)

まずは、「ルーター・オン・ア・スティック」で、VLAN間ルーティングをやってみます。

お疲れさまです。ニックネーム たいちょう です。

2017年1月から、GNS3 活用 - Cisco スイッチ VLAN 編を連載しています。

 

今回は、以下のようなタスクを実行してみます。

タスク

  • 2つのスイッチを配置する。それぞれに VLAN100,200 の端末を収容する。
  • 同じ VLAN 同士で接続を確立する。IP アドレスは任意とする。
  • VLANを、VLAN間ルーティングで接続する。
  • 接続に使用するのは、ルータとする。
  • 接続方式は、「ルーター・オン・ア・スティック」とする。
  • 異なるVLAN同士の端末の疎通を確認する。
  • 結果を図に記入する。

図に記入しました。

作業記録です。

前回までのトポロジを使いますので、新たに設定するのは、fa1/10をトランクに設定するのを追加します。

Sw1(config)#int fa1/10
Sw1(config-if)#switchport trunk enc dot
Sw1(config-if)#switchport mode trunk
Sw1(config-if)#no shut
Sw1(config-if)#end

ルーターの設定です。サブインターフェースを作成して、IPアドレスを設定します。

R1(config)#int fa0/0.100
R1(config-subif)#encapsulation dot1Q 100
R1(config-subif)#ip address 192.168.100.254 255.255.255.0
R1(config-subif)#int fa0/0.200
R1(config-subif)#enc dot 200         
R1(config-subif)#ip address 192.168.200.254 255.255.255.0
R1(config-subif)#exit
R1(config)#int fa0/0
R1(config-if)#no shut
R1(config-if)#end
R1#sho int fa0/0.100
FastEthernet0/0.100 is up, line protocol is up
  Hardware is Gt96k FE, address is c401.2378.0000 (bia c401.2378.0000)
  Internet address is 192.168.100.254/24
  MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID  100.
  ARP type: ARPA, ARP Timeout 04:00:00
  Last clearing of "show interface" counters never
R1#sho int fa0/0.200
FastEthernet0/0.200 is up, line protocol is up
  Hardware is Gt96k FE, address is c401.2378.0000 (bia c401.2378.0000)
  Internet address is 192.168.200.254/24
  MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID  200.
  ARP type: ARPA, ARP Timeout 04:00:00
  Last clearing of "show interface" counters never
R1#wri
Building configuration...
[OK]

VPCですが、前回はデフォルト・ゲートウェイを設定していなかったので、設定し直します。

C1> ip 192.168.100.1/24 192.168.100.254
Checking for duplicate address...
PC1 : 192.168.100.1 255.255.255.0 gateway 192.168.100.254

PC1> ping 192.168.200.254
84 bytes from 192.168.200.254 icmp_seq=1 ttl=255 time=8.431 ms
84 bytes from 192.168.200.254 icmp_seq=2 ttl=255 time=4.380 ms
84 bytes from 192.168.200.254 icmp_seq=3 ttl=255 time=4.409 ms
84 bytes from 192.168.200.254 icmp_seq=4 ttl=255 time=4.863 ms
84 bytes from 192.168.200.254 icmp_seq=5 ttl=255 time=5.180 ms

PC2> ip 192.168.200.1/24 192.168.200.254
Checking for duplicate address...
PC1 : 192.168.200.1 255.255.255.0 gateway 192.168.200.254

PC2> ping 192.168.100.254
84 bytes from 192.168.100.254 icmp_seq=1 ttl=255 time=9.563 ms
84 bytes from 192.168.100.254 icmp_seq=2 ttl=255 time=4.483 ms
84 bytes from 192.168.100.254 icmp_seq=3 ttl=255 time=4.508 ms
84 bytes from 192.168.100.254 icmp_seq=4 ttl=255 time=4.543 ms
84 bytes from 192.168.100.254 icmp_seq=5 ttl=255 time=4.737 ms

PC2> ping 192.168.100.1  
192.168.100.1 icmp_seq=1 timeout
192.168.100.1 icmp_seq=2 timeout
84 bytes from 192.168.100.1 icmp_seq=3 ttl=63 time=10.786 ms
84 bytes from 192.168.100.1 icmp_seq=4 ttl=63 time=14.435 ms
84 bytes from 192.168.100.1 icmp_seq=5 ttl=63 time=14.929 ms

PC3> ip 192.168.100.2/24 192.168.100.254
Checking for duplicate address...
PC1 : 192.168.100.2 255.255.255.0 gateway 192.168.100.254

PC3> ping 192.168.200.254
84 bytes from 192.168.200.254 icmp_seq=1 ttl=255 time=9.253 ms
84 bytes from 192.168.200.254 icmp_seq=2 ttl=255 time=5.235 ms
84 bytes from 192.168.200.254 icmp_seq=3 ttl=255 time=5.466 ms
84 bytes from 192.168.200.254 icmp_seq=4 ttl=255 time=4.346 ms
84 bytes from 192.168.200.254 icmp_seq=5 ttl=255 time=4.373 ms

PC3> ping 192.168.200.1  
84 bytes from 192.168.200.1 icmp_seq=1 ttl=63 time=16.866 ms
84 bytes from 192.168.200.1 icmp_seq=2 ttl=63 time=14.263 ms
84 bytes from 192.168.200.1 icmp_seq=3 ttl=63 time=14.929 ms
84 bytes from 192.168.200.1 icmp_seq=4 ttl=63 time=14.429 ms
84 bytes from 192.168.200.1 icmp_seq=5 ttl=63 time=15.108 ms

PC4> ip 192.168.200.2/24 192.168.200.254
Checking for duplicate address...
PC1 : 192.168.200.2 255.255.255.0 gateway 192.168.200.254

PC4> ping 192.168.100.254
84 bytes from 192.168.100.254 icmp_seq=1 ttl=255 time=9.636 ms
84 bytes from 192.168.100.254 icmp_seq=2 ttl=255 time=4.446 ms
84 bytes from 192.168.100.254 icmp_seq=3 ttl=255 time=4.340 ms
84 bytes from 192.168.100.254 icmp_seq=4 ttl=255 time=4.595 ms
84 bytes from 192.168.100.254 icmp_seq=5 ttl=255 time=4.640 ms

PC4> ping 192.168.100.2  
84 bytes from 192.168.100.2 icmp_seq=1 ttl=63 time=19.022 ms
84 bytes from 192.168.100.2 icmp_seq=2 ttl=63 time=15.483 ms
84 bytes from 192.168.100.2 icmp_seq=3 ttl=63 time=14.775 ms
84 bytes from 192.168.100.2 icmp_seq=4 ttl=63 time=14.380 ms
84 bytes from 192.168.100.2 icmp_seq=5 ttl=63 time=14.592 ms


お疲れさまでした。ニックネーム たいちょう でした。

次回もお楽しみに。

タグ: