いよいよネットワークの構築に着手する。
上流→下流に向けて構築していく。
まずはネットワークの入り口からだが、さっそく注意書きをしなければならない。
・このネットワークの入り口は、共通L3SW#1,2である。
・ISPL3SW#1はネットワークの外、つまりISPである(実際は自宅LAN)。
一般的に、ネットワークの入り口は複数のISPと接続して冗長性と経路最適化を図るらしい。
ISP#1 ISP#2
| |
共通L3SW#1 ― 共通L3SW#2
しかし、複数のISPを用意するのは困難であるためこの構成は却下した。実際の構成は以下のよう。
Internet
|
みなしISP(自宅LAN)
| |
共通L3SW#1 ― 共通L3SW#2
さて、前置きが長くなってしまった。
作業概要
・Internet向け経路の設定
設定項目
・デフォルトルート
設定投入
開始
ISPSW01#configure terminal
!--- ルーティングを有効化
ISPSW01(config)#ip routing
!--- Internet向けインターフェースの設定
ISPSW01(config)#interface vlan 1000
ISPSW01(config-if)#ip address 192.168.0.254 255.255.255.0
ISPSW01(config-if)#exit
ISPSW01(config)#interface GigabitEthernet 0/9
ISPSW01(config-if)#switchport mode access
ISPSW01(config-if)#switchport access vlan 1000
ISPSW01(config-if)#exit
!--- デフォルトルートの設定
ISPSW01(config)#ip route 0.0.0.0 0.0.0.0 192.168.0.1
ISPSW01(config)#exit
設定確認
現在のコンフィグ
ISPSW01#show running-config
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISPSW01
!
!
!
no aaa new-model
ip routing
!
〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜
!
interface GigabitEthernet0/9
switchport access vlan 1000
switchport mode access
!
interface Vlan100
ip address 10.0.0.252 255.255.255.0
!
interface Vlan1000
ip address 192.168.0.254 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.0.1
ip http server
ip http secure-server
!
end
ルーティングテーブル
ISPSW01#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 routeGateway of last resort is 192.168.0.1 to network 0.0.0.0
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Vlan100
C 192.168.0.0/24 is directly connected, Vlan1000
S* 0.0.0.0/0 [1/0] via 192.168.0.1