LoginSignup
0
1

More than 5 years have passed since last update.

MacOS X+GNS3(2.1.9)によるネットワーク構築練習③[複数のサブネット環境構築]

Last updated at Posted at 2018-10-30

MacOS X+GNS3(2.1.9)によるネットワーク構築練習③[複数のサブネット環境構築]

リンク

  1. MacOS X+GNS3(2.1.9)によるネットワーク構築練習①[環境構築]
  2. MacOS X+GNS3(2.1.9)によるネットワーク構築練習②[新規プロジェクト作成〜小規模ネットワーク構築]
  3. MacOS X+GNS3(2.1.9)によるネットワーク構築練習③[複数のサブネット環境構築]

目指す環境

今回のネットワーク構築練習で目指す環境は以下のイメージです。
gns3-01.png

192.168.50.0/24 ネットワークの設定

ルータR1側の設定

R1#
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#vlan 50
R1(config-vlan)#exit
R1(config)#int vlan 50
R1(config-if)#ip address 192.168.50.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface FastEthernet1/1
R1(config-if)#switchport access vlan 50
R1(config-if)#end
R1#
*Mar  1 00:06:43.789: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up
R1#
*Mar  1 00:06:44.939: %SYS-5-CONFIG_I: Configured from console by console
R1#copy running-config startup-config
Destination filename [startup-config]? 
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
R1#
ルータ側設定の補足
  • vlanを定義しているのは、vlanを定義せずにFastEthernet1/1のポートに192.168.50.1の設定をしようとしても設定できないからです。そのため、vlanを定義する必要があるようです。(詳しい理由がいまいちわからず。。。)

    R1#configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    R1(config)#interface FastEthernet1/6
    R1(config-if)#ip address 192.168.90.1 255.255.255.0
    
    % IP addresses may not be configured on L2 links.
    
  • copy running-config startup-configは、GNS3を一度落として起動し直したときでも、設定が消えないようにするために実行しています。

PC-01-1 / PC-02-2側の設定

PC-01-1のconsoleを起動して以下のコマンドを実行し、IPアドレスを設定する。

VPCS> ip 192.168.50.11
Checking for duplicate address...
PC1 : 192.168.50.11 255.255.255.0

VPCS> save
Saving startup configuration to startup.vpc
.  done

PC-01-2のconsoleを起動して以下のコマンドを実行し、IPアドレスを設定する。

VPCS> ip 192.168.50.12
Checking for duplicate address...
PC1 : 192.168.50.12 255.255.255.0

VPCS> save
Saving startup configuration to startup.vpc
.  done

疎通確認

この時点で、192.168.50.11192.168.50.12のVPCS間でpingなどが通るようになっている。
以下は192.168.50.12のconsoleからpingした結果

VPCS> ping 192.168.50.11
84 bytes from 192.168.50.11 icmp_seq=1 ttl=64 time=0.090 ms
84 bytes from 192.168.50.11 icmp_seq=2 ttl=64 time=0.119 ms
84 bytes from 192.168.50.11 icmp_seq=3 ttl=64 time=0.136 ms
84 bytes from 192.168.50.11 icmp_seq=4 ttl=64 time=0.112 ms
84 bytes from 192.168.50.11 icmp_seq=5 ttl=64 time=0.106 ms

# もちろんルータにもpingが通る

VPCS> ping 192.168.50.1
84 bytes from 192.168.50.1 icmp_seq=1 ttl=255 time=19.222 ms
84 bytes from 192.168.50.1 icmp_seq=2 ttl=255 time=4.380 ms
84 bytes from 192.168.50.1 icmp_seq=3 ttl=255 time=4.763 ms
84 bytes from 192.168.50.1 icmp_seq=4 ttl=255 time=4.736 ms
84 bytes from 192.168.50.1 icmp_seq=5 ttl=255 time=4.538 ms

192.168.60.0/24 と 192.168.70.0/24 ネットワークの設定

上記までの手順を同じように繰り返し設定することで、ネットワークの設定が可能です。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1