VALNを3つ構成してルーティングしてみる
図のようなネットワーク構成をCisco Catalyst3550で取ってみます。
Catalyst3550の各ポートは下記のように定義します。
f0/1 192.168.11.201 192.168.11.0のネットワークへの接続
f0/2 〜f0/16 vlan10 192.168.12.0/24のネットワーク
f0/17〜f0/32 vlan20 192.168.13.0/24のネットワーク
f0/32〜f0/48 vlan30 192.168.14.0/24のネットワーク
192.168.11.1のダイアルアップルータには下記のルーティングをしておきます。
192.168.12.0/24 GW 192.168.11.201
192.168.13.0/24 GW 192.168.11.201
192.168.14.0/24 GW 192.168.11.201
Switch>enable Switch#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch(vlan)#vlan 10 name vlan10 VLAN 10 added: Name: vlan10 Switch(vlan)#vlan 20 name vlan20 VLAN 20 added: Name: vlan20 Switch(vlan)#vlan 30 name vlan30 VLAN 30 added: Name: vlan30 Switch(vlan)#exit APPLY completed. Exiting.... Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#ip routing Switch(config)#interface vlan 10 Switch(config-if)#ip address 192.168.12.1 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#interface vlan 20 Switch(config-if)#ip address 192.168.13.1 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#interface vlan 30 Switch(config-if)#ip address 192.168.14.1 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#interface FastEthernet 0/1 Switch(config-if)#no switchport Switch(config-if)#ip address 192.168.11.201 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.1 Switch(config)#int f0/2 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/3 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/4 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/5 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/6 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/7 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/8 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/9 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/10 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/11 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/12 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/13 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/14 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/15 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/16 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#int f0/17 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/18 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/19 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/20 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/21 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/22 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/23 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/24 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/25 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/26 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/27 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/28 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/29 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/30 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/31 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/32 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#int f0/33 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/34 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/35 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/36 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/37 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/38 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/39 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/40 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/41 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/42 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/43 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/44 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/45 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/46 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/47 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config)#int f0/48 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exit Switch(config-if)#exit Switch(config)#exit Switch#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi0/1, Gi0/2 10 vlan10 active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/12, Fa0/13 Fa0/14, Fa0/15, Fa0/16 20 vlan20 active Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Fa0/25, Fa0/26, Fa0/27, Fa0/28 Fa0/29, Fa0/30, Fa0/31, Fa0/32 30 vlan30 active Fa0/33, Fa0/34, Fa0/35, Fa0/36 Fa0/37, Fa0/38, Fa0/39, Fa0/40 Fa0/41, Fa0/42, Fa0/43, Fa0/44 Fa0/45, Fa0/46, Fa0/47, Fa0/48 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup Switch#show ip route Codes: 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 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 o - ODR, P - periodic downloaded static route Gateway of last resort is 192.168.11.1 to network 0.0.0.0 C 192.168.12.0/24 is directly connected, Vlan10 C 192.168.13.0/24 is directly connected, Vlan20 C 192.168.14.0/24 is directly connected, Vlan30 C 192.168.11.0/24 is directly connected, FastEthernet0/1 S* 0.0.0.0/0 [1/0] via 192.168.11.1 Switch#exit