【Cisco】IPアドレス作成 ルータの設定3
FORSE 9
ここの部分
※設定するIPアドレスは参加者毎に違います。構成図を確認してください
手順15
IPアドレスを設定して、結線をします
手順16検証します
RT-10#conf t
RT-10(config)#interface gigabitEthernet 8
RT-10(config-if)#ip address 172.16.14.1 255.255.255.252
RT-10(config-if)#no shutdown
RT-10(config-if)#exit
RT-10(config)#interface fastEthernet 0
RT-10(config-if)#ip address 172.16.12.1 255.255.255.252
RT-10(config-if)#no shutdown
RT-10(config-if)#end
RT-10#
RT-10#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Async3 unassigned YES unset down down
BRI0 unassigned YES unset administratively down down
BRI0:1 unassigned YES unset administratively down down
BRI0:2 unassigned YES unset administratively down down
FastEthernet0 172.16.12.1 YES manual down down
GigabitEthernet0 unassigned YES unset down down
GigabitEthernet1 unassigned YES unset down down
GigabitEthernet2 unassigned YES unset down down
GigabitEthernet3 unassigned YES unset down down
GigabitEthernet4 unassigned YES unset down down
GigabitEthernet5 unassigned YES unset down down
GigabitEthernet6 unassigned YES unset down down
GigabitEthernet7 unassigned YES unset up up
GigabitEthernet8 172.16.14.1 YES manual down down
Vlan1 unassigned YES unset down down
Vlan10 192.168.10.1 YES manual up up
RT-10#
RT-10#show interfaces vlan10 | include Internet
Internet address is 192.168.10.1/24
RT-10#
RT-10#show interfaces gigabitEthernet8 | include Internet
Internet address is 172.16.14.1/30
RT-10#
RT-10#show interfaces fastEthernet0 | include Internet
Internet address is 172.16.12.1/30
RT-10#
10.
【Cisco】リモートパスワードtelnet ルータの設定4
FORSE
手順17 リモートパスワードを設定します
手順18
確認します
|begin でそこから始まる文字列を表示します。最後のほうだけ確認
手順19
となりのルータにはpingが通ります
10
RT-10#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RT-10(config)#line vty 0 4
RT-10(config-line)#password vtypassword
RT-10(config-line)#login
RT-10(config-line)#exit
RT-10(config)#enable password cisco
RT-10(config)#end
RT-10#
RT-10>ping 172.16.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
RT-10>
RT-10>ping 172.16.14.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.14.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
RT-10>
RT-10#show running-config | include enable
enable password cisco
RT-10#show running-config | begin line vty
line vty 0 4
password vtypassword
login
transport input all
!
scheduler allocate 20000 1000
!
end
【Cisco】スタティックルート作成 ルータの設定6
FORSE 12
手順20
スタティックルートを設定します
手順21
スタティックルートを検証します
RT-10#conft
Enter configuration commands, one per line. End with CNTL/Z.
RT-10(config)#ip route 172.16.23.0 255.255.255.252 172.16.12.2
RT-10(config)#ip route 192.168.20.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 172.16.43.0 255.255.255.252 172.16.14.2
RT-10(config)#ip route 192.168.40.0 255.255.255.0 172.16.14.2
RT-10(config)#ip route 192.168.30.0 255.255.255.0 172.16.14.2
RT-10(config)#end
RT-10#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
C 172.16.12.0/30 is directly connected, FastEthernet0
L 172.16.12.1/32 is directly connected, FastEthernet0
C 172.16.14.0/30 is directly connected, GigabitEthernet8
L 172.16.14.1/32 is directly connected, GigabitEthernet8
S 172.16.23.0/30 [1/0] via 172.16.12.2
S 172.16.43.0/30 [1/0] via 172.16.14.2
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, Vlan10
L 192.168.10.1/32 is directly connected, Vlan10
S 192.168.20.0/24 [1/0] via 172.16.12.2
S 192.168.30.0/24 [1/0] via 172.16.14.2
S 192.168.40.0/24 [1/0] via 172.16.14.2
RT-10#
13.
【Cisco】スタティックルート作成その2 ルータの設定7
FORSE 13
手順20-2(6つの場合)
スタティックルートを設定します
手順21
スタティックルートを検証します
RT-10#conft
Enter configuration commands, one per line. End with CNTL/Z.
RT-10(config)#ip route 172.16.23.0 255.255.255.252 172.16.12.2
RT-10(config)#ip route 192.168.20.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 172.16.34.0 255.255.255.252 172.16.12.2
RT-10(config)#ip route 192.168.30.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 192.168.40.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 172.16.56.0 255.255.255.252 172.16.61.2
RT-10(config)#ip route 192.168.60.0 255.255.255.0 172.16.61.2
RT-10(config)#ip route 172.16.45.0 255.255.255.252 172.16.61.2
RT-10(config)#ip route 192.168.50.0 255.255.255.0 172.16.61.2
RT-10(config)#end
RT-10#show ip route
(省略)
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
C 172.16.12.0/30 is directly connected, FastEthernet0
L 172.16.12.1/32 is directly connected, FastEthernet0
C 172.16.16.0/30 is directly connected, GigabitEthernet8
L 172.16.16.1/32 is directly connected, GigabitEthernet8
S 172.16.23.0/30 [1/0] via 172.16.12.2
S 172.16.34.0/30 [1/0] via 172.16.12.2
S 172.16.45.0/30 [1/0] via 172.16.61.2
S 172.16.56.0/30 [1/0] via 172.16.61.2
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, Vlan10
L 192.168.10.1/32 is directly connected, Vlan10
S 192.168.20.0/24 [1/0] via 172.16.12.2
S 192.168.30.0/24 [1/0] via 172.16.12.2
S 192.168.40.0/24 [1/0] via 172.16.12.2
S 192.168.50.0/24 [1/0] via 172.16.61.2
S 192.168.60.0/24 [1/0] via 172.16.61.2
RT-10#
【Fortigate】ホスト名 Fortigateの設定1
FORSE
手順1
ホスト名確認をします
手順2
ホスト名を変更します
手順3
確認します
手順4
初期状態のハードウェアスイッチから、インターフェースを独立して使用し
ます。ハードウェアスイッチを確認します
15
FGT60D4614079145 #config system global
FGT60D4614079145 (global) # set hostname FG-50
FGT60D4614079145 (global) # set admintimeout 60
FGT60D4614079145 (global) # end
FG-50 #
FGT60D4614079145 # get system status | grep Hostname
Hostname: FGT60D4614079145 FG-50 # show system virtual-switch
config system virtual-switch
edit "internal"
set physical-switch "sw0"
config port
edit "internal1"
next
edit "internal2"
next
edit "internal3"
next
edit "internal4"
next
edit "internal5"
next
edit "internal6"
next
edit "internal7"
next
end
next
end
FG-50 #
FG-50 # get system status | grep Hostname
Hostname: FG-50
FG-50 # get system global | grep admintimeout
admintimeout : 60
16.
【Fortigate】インターフェース設定 Fortigateの設定2
FORSE
手順5 独立してインターフェースを使用したいので、ハードウェアス
イッチから切り離します
手順6確認します
手順7 インターフェースを確認します
16
FG-50 # show system virtual-switch
config system virtual-switch
edit "internal"
set physical-switch "sw0"
config port
edit "internal4"
next
edit "internal5"
next
edit "internal6"
next
edit "internal7"
next
end
next
end
FG-50 #
FG-50 # config system virtual-switch
FG-50 (virtual-switch) # edit "internal"
FG-50 (internal) # config port
FG-50 (port) # delete "internal1"
FG-50 (port) # delete "internal2"
FG-50 (port) # delete "internal3"
FG-50 (port) # end
FG-50 (internal) # end
FG-50 #
FG-50 # show system interface | grep -f internal
config system interface
edit "internal" <---
set vdom "root"
set ip 192.168.1.99 255.255.255.0
set allowaccess ping https ssh http fgfm capwap
set type hard-switch
set stp enable
set role lan
set snmp-index 6
next
edit "internal1" <---
set vdom "root"
set type physical
set snmp-index 7
next
edit "internal2" <---
set vdom "root"
set type physical
set snmp-index 8
next
edit "internal3" <---
set vdom "root"
set type physical
set snmp-index 9
next
end
FG-50 #
17.
【Fortigate】IPアドレス設定 Fortigateの設定3
FORSE
手順8
IPアドレスを設定します。internal1
手順9
確認します
手順10
intenal2のIPアドレスを設定し、確認します。
17
FG-50 #show system interface | grep -f internal1
config system interface
edit "internal1" <---
set vdom "root"
set ip 172.16.56.1 255.255.255.252
set allowaccess ping https ssh http
set type physical
set device-identification enable
set role lan
set snmp-index 7
next
end
FG-50 #
FG-50 # config system interface
FG-50 (interface) # edit internal1
FG-50 (internal1) # set mode static
FG-50 (internal1) # set ip 172.16.56.1 255.255.255.252
FG-50 (internal1) # set allowaccess ping https ssh http telnet
FG-50 (internal1) # set role lan
FG-50 (internal1) # end
FG-50 #
FG-50 # config system interface
FG-50 (interface) # edit internal2
FG-50 (internal2) # set mode static
FG-50 (internal2) # set ip 192.168.50.1 255.255.255.0
FG-50 (internal2) # set allowaccess ping https ssh http telnet
FG-50 (internal2) # set role lan
FG-50 (internal2) # end
FG-50 #
FG-50 # show system interface | grep -f internal2
config system interface
edit "internal2" <---
set vdom "root"
set ip 192.168.50.1 255.255.255.0
set allowaccess ping https ssh http
set type physical
set device-identification enable
set role lan
set snmp-index 8
next
end
FG-50 #
18.
【Fortigate】IPアドレスの設定 Fortigateの設定4
FORSE
手順11
intenal3のIPアドレスを設定し、確認します。
手順2
ホスト名を変更します
手順3
確認します
手順12
PCへの疎通確認
18
FG-50 #config system interface
FG-50 (interface) # edit internal3
FG-50 (internal3) # set mode static
FG-50 (internal3) # set ip 172.16.45.1 255.255.255.252
FG-50 (internal3) # set allowaccess ping https ssh http telnet
FG-50 (internal3) # set role lan
FG-50 (internal3) # end
FG-50 # show system interface | grep -f internal3
config system interface
edit "internal3" <---
set vdom "root"
set ip 172.16.45.1 255.255.255.252
set allowaccess ping https ssh http
set type physical
set device-identification enable
set role lan
set snmp-index 9
next
end
FG-50 #
FG-50 # execute ping 192.168.50.2
PING 192.168.50.2 (192.168.50.2): 56 data bytes
64 bytes from 192.168.50.2: icmp_seq=0 ttl=128 time=0.9 ms
64 bytes from 192.168.50.2: icmp_seq=1 ttl=128 time=0.5 ms
64 bytes from 192.168.50.2: icmp_seq=2 ttl=128 time=0.5 ms
64 bytes from 192.168.50.2: icmp_seq=3 ttl=128 time=0.6 ms
64 bytes from 192.168.50.2: icmp_seq=4 ttl=128 time=0.6 ms
--- 192.168.50.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.5/0.6/0.9 ms
FG-50 #
19.
【Fortigate】firewall許可 Fortigateの設定5
FORSE
手順13
ファイアウォールにinternal1←→2、の許可をします
手順14
PCのコマンドプロンプトから確認します
19
FG-50 #config firewall policy
FG-50 (policy) # edit 2
new entry '2' added
FG-50 (2) # set srcintf internal1
FG-50 (2) # set dstintf internal2
FG-50 (2) # set srcaddr all
FG-50 (2) # set dstaddr all
FG-50 (2) # set action accept
FG-50 (2) # set schedule always
FG-50 (2) # set service ALL ←小文字はエラーになります
FG-50 (2) # end
FG-50 # config firewall policy
FG-50 (policy) # edit 3
new entry '3' added
FG-50 (3) # set srcintf internal2
FG-50 (3) # set dstintf internal1
FG-50 (3) # set srcaddr all
FG-50 (3) # set dstaddr all
FG-50 (3) # set action accept
FG-50 (3) # set schedule always
FG-50 (3) # set service ALL
FG-50 (3) # end
FG-50 #
20.
【Fortigate】 firewall許可 Fortigateの設定6
FORSE
手順15
ファイアウォールにinternal1←→3を設定します
手順16
検証します
20
FG-50# config firewall policy
FG-50 (policy) # edit 4
new entry '4' added
FG-50 (4) # set srcintf internal1
FG-50 (4) # set dstintf internal3
FG-50 (4) # set srcaddr all
FG-50 (4) # set dstaddr all
FG-50 (4) # set action accept
FG-50 (4) # set schedule always
FG-50 (4) # set service ALL
FG-50 (4) # end
FG-50 #
FG-50 # config firewall policy
FG-50 (policy) # edit 5
new entry '5' added
FG-50 (5) # set srcintf internal3
FG-50 (5) # set dstintf internal1
FG-50 (5) # set srcaddr all
FG-50 (5) # set dstaddr all
FG-50 (5) # set action accept
FG-50 (5) # set schedule always
FG-50 (5) # set service ALL
FG-50 (5) # end
FG-50 # show firewall policy | grep -f "edit 4"
config firewall policy
edit 4 <---
set uuid 1d095346-d9e8-51ea-cc86-1aaf8390347c
set srcintf "internal1"
set dstintf "internal3"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end
FG-50 # show firewall policy | grep -f "edit 5"
config firewall policy
edit 5 <---
set uuid 55b66856-d9e7-51ea-18de-ab82ae73b7dd
set srcintf "internal3"
set dstintf "internal1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
21.
【Fortigate】 firewall許可 Fortigateの設定7
FORSE
手順17
ファイアウォールにinternal2←→3を設定します
手順18
PCのコマンドプロンプトから確認します
21
FG-50# config firewall policy
FG-50 (policy) # edit 6
new entry '6' added
FG-50 (6) # set srcintf internal2
FG-50 (6) # set dstintf internal3
FG-50 (6) # set srcaddr all
FG-50 (6) # set dstaddr all
FG-50 (6) # set action accept
FG-50 (6) # set schedule always
FG-50 (6) # set service ALL
FG-50 (6) # end
FG-50 #
FG-50 # config firewall policy
FG-50 (policy) # edit 7
new entry '7' added
FG-50 (7) # set srcintf internal3
FG-50 (7) # set dstintf internal2
FG-50 (7) # set srcaddr all
FG-50 (7) # set dstaddr all
FG-50 (7) # set action accept
FG-50 (7) # set schedule always
FG-50 (7) # set service ALL
FG-50 (7) # end
FG-50 #
22.
【Fortigate】ルーティング Fortigateの設定8
FORSE
手順19
ルーティングテーブルを表示させます
スタティックルートを表示させます
手順20
スタティックルートを追加します。
手順21 検証します
22
FG-50# get router info routing-table details
Routing table for VRF=0
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
C 172.16.45.0/30 is directly connected, internal3
C 172.16.56.0/30 is directly connected, internal1
C 192.168.1.0/24 is directly connected, internal
C 192.168.50.0/24 is directly connected, internal2
FG-50 #
FG-50 # show router static
config router static
end
FG-50 #
FG-50 # config router static
FG-50 (static) # edit 1
new entry '1' added
FG-50 (1) # set dst 192.168.60.0/24
FG-50 (1) # set gateway 172.16.56.2
FG-50 (1) # set device internal1
FG-50 (1) # end
FG-50 # show router static
config router static
edit 1
set dst 192.168.60.0 255.255.255.0
set gateway 172.16.56.2
set device "internal1"
next
end
FG-50 # get router info routing-table details
(省略)
C 172.16.45.0/30 is directly connected, internal3
C 172.16.56.0/30 is directly connected, internal1
C 192.168.1.0/24 is directly connected, internal
C 192.168.50.0/24 is directly connected, internal2
S 192.168.60.0/24 [10/0] via 172.16.56.2, internal1
FG-50 #
23.
【Fortigate】スタティックルート追加 Fortigateの設定9
FORSE
手順22
スタティックルートを追加します
つづき
23
FG-50 (static)# edit 6
FG-50 (6) # set dst 172.16.34.0/30
FG-50 (6) # set gateway 172.16.45.2
FG-50 (6) # set device internal3
FG-50 (6) # next
FG-50 (static) # edit 7
FG-50 (7) # set dst 192.168.40.0/24
FG-50 (7) # set gateway 172.16.45.2
FG-50 (7) # set device internal3
FG-50 (7) # next
FG-50 (static) # edit 8
FG-50 (8) # set dst 172.16.23.0/30
FG-50 (8) # set gateway 172.16.45.2
FG-50 (8) # set device internal3
FG-50 (8) # next
FG-50 (static) # edit 9
FG-50 (9) # set dst 192.168.30.0/24
FG-50 (9) # set gateway 172.16.45.2
FG-50 (9) # set device internal3
FG-50 (9) # end
FG-50 # config router static
FG-50 (static) # edit 2
new entry ‘2’ added
FG-50 (2) # set dst 172.16.61.0/30
FG-50 (2) # set gateway 172.16.56.2
FG-50 (2) # set device internal1
FG-50 (2) # next
FG-50 (static) # edit 3
FG-50 (3) # set dst 192.168.10.0/24
FG-50 (3) # set gateway 172.16.56.2
FG-50 (3) # set device internal1
FG-50 (3) # next
FG-50 (static) # edit 4
FG-50 (4) # set dst 172.16.12.0/30
FG-50 (4) # set gateway 172.16.56.2
FG-50 (4) # set device internal1
FG-50 (4) # next
FG-50 (static) # edit 5
FG-50 (5) # set dst 192.168.20.0/24
FG-50 (5) # set gateway 172.16.56.2
FG-50 (5) # set device internal1
FG-50 (5) # next
24.
【Fortigate】切り分け Fortigateの設定10
FORSE
手順23
疎通確認切り分け、FortigateからRT-10にログインしてping
24
FG-50 #execute telnet 172.16.61.1
Trying 172.16.61.1...
Connected to 172.16.61.1.
User Access Verification
Password:vtypassword
RT-10>
RT-10>ping 172.16.56.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.56.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
RT-10>enable
Password:cisco
RT-10#