次のような、3つのネットワークを2台のルータで接続し、サーバーと無線 LANを設置したネットワークを構築する実験を行います。
ネットワークはOSPFで経路制御され、172.30.11.0/24 と 172.30.12.0/24 ネッ トワークはDHCPによりアドレスを自動配布しています。 WWWサーバーとDNSサーバーを有し、WWWサーバへは名前でアクセスできます。
YAMAHA RTX1210 の LAN1 はローカルエリアに設定されています。 ここは DHCP が設定されて、機器が接続されれば自動的に 172.30.11.0/24 のアドレスが設定されるようになっています。 ここに、無線LANのアクセスポイントである、 CISCO Aironet 2602i を接続 します。
CISCO Catalyst 3560 は FastEthernet 0/5-8 がローカルエリアとして設定 されています。 ここに赤のRaspberryPi を接続すると自動的に IP アドレスが 172.30.12.1 に設定されます。
ルータ間は同じポート番号同士をつなぐと接続できるように、アドレスが正 しく設定されています。 RTX1210 の LAN2 と Catalyst 3560 の FastEther 0/2 を接続すれば完了で す。
YAMAHA RTX1210 のルーター番号を1とします。 基本的には枝番号などはすべて 1 にちなんだ番号になります。 LAN1 は複数ポートあり、ローカルで使うように設計されているので、外部接 続には LAN2 と LAN3 を使います。
# show config
# RTX1210 Rev.14.01.05 (Thu Nov 6 08:45:55 2014)
# MAC Address : 00:a0:de:cb:09:ca, 00:a0:de:cb:09:cb, 00:a0:de:cb:09:cc
# Memory 256Mbytes, 3LAN, 1BRI
# main: RTX1210 ver=00 serial=S4H031220 MAC-Address=00:a0:de:cb:09:ca MAC-Addr
# ess=00:a0:de:cb:09:cb MAC-Address=00:a0:de:cb:09:cc
# Reporting Date: Jun 10 13:34:34 2016
#login password *
#administrator password *
ip lan1 address 172.30.11.254/24
ip lan1 ospf area backbone
ip lan2 address 172.30.2.1/24
ip lan2 ospf area backbone
ip lan3 address 172.30.3.1/24
ip lan3 ospf area backbone
ospf use on
ospf area backbone
ospf configure refresh
dhcp service server
dhcp scope 1 172.30.11.129-172.30.11.191/24
dhcp scope option 1 dns=172.30.12.1
ルータ番号を2としています。 すべてのポートは公平なので、FastEther0/1からFastEther0/4 を外部接続と し、FastEther 0/5 から FastEther 0/8 をローカルで使います。
サーバへのアドレス割り振りは固有番号を用いた DHCP の割り当てで行いま す。
configure terminal
ip routing
vlan 12
exit
interface FastEthernet0/1
no switchport
ip address 172.30.1.2 255.255.255.0
no shutdown
exit
interface FastEthernet0/2
no switchport
ip address 172.30.2.2 255.255.255.0
no shutdown
exit
interface FastEthernet0/3
no switchport
ip address 172.30.3.2 255.255.255.0
no shutdown
exit
interface FastEthernet0/4
no switchport
ip address 172.30.4.2 255.255.255.0
no shutdown
exit
interface FastEthernet0/5
switchport access vlan 12
switchport mode access
no shutdown
exit
interface FastEthernet0/6
switchport access vlan 12
switchport mode access
no shutdown
exit
interface FastEthernet0/7
switchport access vlan 12
switchport mode access
no shutdown
exit
interface FastEthernet0/8
switchport access vlan 12
switchport mode access
no shutdown
exit
interface Vlan12
ip address 172.30.12.254 255.255.255.0
no shutdown
exit
router ospf 109
network 172.30.0.0 255.255.0.0 area 0
exit
service dhcp
ip dhcp pool lan12
network 172.30.12.0 255.255.255.0
default-router 172.30.12.254
dns-server 172.30.12.1
exit
ip dhcp pool server
host 172.30.12.1
client-identifier 01b8.27eb.0398.99
client-name red
default-router 172.30.12.254
dns-server 127.0.0.1
end
ip dhcp pool server
host 172.30.12.1
client-identifier 01b8.27eb.0398.99
client-name red
default-router 172.30.12.254
dns-server 127.0.0.1
end
dot11 ssid netlab2600
authentication open
authentication key-management wpa version 2
guest-mode
wpa-psk ascii tdunetlab
exit
interface Dot11Radio 0
speed basic-1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 m0. m1. m2. m3. m4. m8. m9. m10. m11. m12. m13. m14. m15.
encryption mode ciphers aes-ccm
no ssid PWL
ssid netlab2600
bridge-group 1
bridge-group 1 subscriber-loop-control
bridge-group 1 spanning-disabled
bridge-group 1 block-unknown-source
no bridge-group 1 source-learning
no bridge-group 1 unicast-flooding
exit
interface Dot11Radio 1
speed basic-6.0 9.0 12.0 18.0 24.0 36.0 48.0 54.0 m0. m1. m2. m3. m4. m8. m9. m10. m11. m12. m13. m14. m15.
encryption mode ciphers aes-ccm
no ssid PWL
ssid netlab2600
bridge-group 1
bridge-group 1 subscriber-loop-control
bridge-group 1 spanning-disabled
bridge-group 1 block-unknown-source
no bridge-group 1 source-learning
no bridge-group 1 unicast-flooding
exit
interface GigabitEthernet0
no ip address
no ip route-cache
duplex auto
speed auto
bridge-group 1
bridge-group 1 spanning-disabled
no bridge-group 1 source-learning
exit
interface BVI1
ip address dhcp
no ip route-cache
end
OS は Raspbian jessie を採用。
#! /bin/sh rsync -auvzb -e ssh --exclude='*~' --keep-dirlinks p5.net.c.dendai.ac.jp:doc/dendai/lab/red ~/doc/dendai/lab/ rsync -auvzb -e ssh --exclude='*~' --copy-links p5.net.c.dendai.ac.jp:edu/WWW ~/edu/ rsync -auvzb -e ssh --exclude='*~' p5.net.c.dendai.ac.jp:doc/dendai/lab/www ~/doc/dendai/lab/ rsync -auvzb -e ssh --exclude='*~' p5.net.c.dendai.ac.jp:doc/dendai/lab/home ~/doc/dendai/lab/
#! /bin/sh rsync -auvzb -e ssh --exclude='*~' --copy-links ~/doc/dendai/lab/red p5.net.c.dendai.ac.jp:doc/dendai/lab/
namedconf.options で auth-nxdomain no; を設定する。
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "net.c.dendai.ac.jp" {
type master;
file "/etc/bind/local/db.net";
};
zone "30.172.in-addr.arpa" {
type master;
file "/etc/bind/local/db.172.30";
};
zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "16.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "17.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "18.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "19.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "20.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "21.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "22.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "23.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "24.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "25.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "26.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "27.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "28.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
;
; Zone file for linux.bogus
;
; The full zone file
;
$TTL 3D
@ IN SOA red.net.c.dendai.ac.jp. hostmaster.red.net.c.dendai.ac.jp. (
201606121 ; serial, todays date + todays serial #
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds
;
NS red.net.c.dendai.ac.jp.
;
localhost A 127.0.0.1
red A 172.30.12.1
edu cname red
www cname red
$TTL 3D
@ IN SOA red.net.c.dendai.ac.jp. hostmaster.red.net.c.dendai.ac.jp. (
201606121 ; serial, todays date + todays serial #
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds
;
NS red.net.c.dendai.ac.jp.
;
1.12 PTR red.net.c.dendai.ac.jp.
本サーバと同一