#目的
- ルーター一台で複数のネットワークを使った演習を行いたかった。
- 対外接続をいい感じに配りたかった。
#仕様
- 7つの相互通信可能なネットワーク
- 運営用の1つのネットワーク(フィルタリングなし)
- DHCPが有効になっているポートで対外接続をNAT
- パブリックDNSをフォワード(各GW指定で利用可能)
- DNSを統一したい時用に、ループバックアドレス作成済み
#環境
- Cisco 892J
#コピペ可能なコンフィグ
vlan 10,20,30,40,50,60,70,100
exit
interface loopback 0
ip address 192.168.100.254 255.255.255.0
exit
interface fastEthernet 0
switchport mode access
switchport access vlan 100
no shutdown
exit
interface fastEthernet 1
switchport mode access
switchport access vlan 10
no shutdown
exit
interface fastEthernet 2
switchport mode access
switchport access vlan 20
no shutdown
exit
interface fastEthernet 3
switchport mode access
switchport access vlan 30
no shutdown
exit
interface fastEthernet 4
switchport mode access
switchport access vlan 40
no shutdown
exit
interface fastEthernet 5
switchport mode access
switchport access vlan 50
no shutdown
exit
interface fastEthernet 6
switchport mode access
switchport access vlan 60
no shutdown
exit
interface fastEthernet 7
switchport mode access
switchport access vlan 70
no shutdown
exit
interface gigabitEthernet 0
ip nat outside
ip address dhcp
exit
interface vlan 10
ip address 192.168.1.254 255.255.255.0
ip nat inside
no shutdown
exit
interface vlan 20
ip address 192.168.2.254 255.255.255.0
ip nat inside
no shutdown
exit
interface vlan 30
ip address 192.168.3.254 255.255.255.0
ip nat inside
no shutdown
exit
interface vlan 40
ip address 192.168.4.254 255.255.255.0
ip nat inside
no shutdown
exit
interface vlan 50
ip address 192.168.5.254 255.255.255.0
no shutdown
exit
interface vlan 60
ip address 192.168.6.254 255.255.255.0
ip nat inside
no shutdown
exit
interface vlan 70
ip address 192.168.7.254 255.255.255.0
ip nat inside
no shutdown
exit
interface vlan 100
ip address 192.168.10.254 255.255.255.0
ip nat inside
no shutdown
exit
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 permit 192.168.2.0 0.0.0.255
access-list 1 permit 192.168.3.0 0.0.0.255
access-list 1 permit 192.168.4.0 0.0.0.255
access-list 1 permit 192.168.5.0 0.0.0.255
access-list 1 permit 192.168.6.0 0.0.0.255
access-list 1 permit 192.168.7.0 0.0.0.255
access-list 1 permit 192.168.10.0 0.0.0.255
ip nat inside source list 1 interface gigabitEthernet 0 overload
ip route 0.0.0.0 0.0.0.0 dhcp
ip dns server
ip domain-lookup
ip dns view default
dns forwarding
dns forwarder 8.8.8.8
exit